yuansh 2 周之前
父節點
當前提交
77efd63fc5
共有 21 個文件被更改,包括 2098 次插入620 次删除
  1. 17 0
      src/components/Form/src/jeecg/components/modal/JPopupOnlReportModal.vue
  2. 6 0
      src/views/afterCode/AfterComplaint/AfterComplaint.api.ts
  3. 61 4
      src/views/afterCode/AfterComplaint/AfterComplaint.data.ts
  4. 90 3
      src/views/afterCode/AfterComplaint/components/AfterComplaintForm.vue
  5. 121 7
      src/views/afterCode/AfterComplaint/components/AfterComplaintFormDeal.vue
  6. 31 2
      src/views/dashboard/workbench/components/ProjectCard.vue
  7. 714 0
      src/views/publicComponents/SelectSaleOrderAfterModal.vue
  8. 3 2
      src/views/purchase/payment/components/paymentForm.vue
  9. 1 1
      src/views/purchase/purPaymentRequest/components/purPaymentRequestForm.vue
  10. 21 21
      src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue
  11. 1 0
      src/views/purchase/purchaseQuotationFrm/PurchaseQuotationForm.data.ts
  12. 60 2
      src/views/saleCode/deliveryNotice/components/deliveryNoticeForm.vue
  13. 5 3
      src/views/saleCode/quotation/components/quotationFormForm.vue
  14. 27 1
      src/views/saleCode/quotation/quotation.vue
  15. 4 0
      src/views/saleCode/quotation/quotationForm.api.ts
  16. 34 18
      src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue
  17. 10 10
      src/views/saleCode/saleInterfaceSync/SaleInterfaceSync.data.ts
  18. 8 0
      src/views/saleCode/saleInterfaceSync/SaleInterfaceSyncList.vue
  19. 695 544
      src/views/saleCode/salesInvoice/salesInvoiceList.vue
  20. 187 0
      src/views/saleCode/salesOrder/SaleOrderForm.data.ts
  21. 2 2
      src/views/saleCode/salesOrder/components/SlaeOrderFormForm.vue

+ 17 - 0
src/components/Form/src/jeecg/components/modal/JPopupOnlReportModal.vue

@@ -221,6 +221,23 @@
        *确认提交
        */
       function handleSubmit() {
+		  
+		// if(props.code.startsWith("alert_")){
+		// 	  handleCancel();
+		// 	  return;
+		// }
+		if(props.code == "quotationNum"
+		||props.code == "SaleOrderFormListNum"
+		||props.code == "deliveryNoticeListNum"
+		||props.code == "purchaseInquiryFormListNum"
+		||props.code == "purchaseQuotationFormListNum"
+		||props.code == "selectionQuotationFormListNum"
+		||props.code == "PurchaseOrderFormListNum"
+		){
+			  handleCancel();
+			  return;
+		}
+		 
         filterUnuseSelect();
         if (!props.multi && unref(selectRows) && unref(selectRows).length > 1) {
           createMessage.warning('只能选择一条记录');

+ 6 - 0
src/views/afterCode/AfterComplaint/AfterComplaint.api.ts

@@ -13,6 +13,7 @@ enum Api {
   exportXls = '/afterCode/afterComplaint/exportXls',
   queryDataById = '/afterCode/afterComplaint/queryById',
   afterComplaintShipList = '/afterCode/afterComplaint/queryAfterComplaintShipByMainId', 
+  afterComplaintProductList = '/afterCode/afterComplaint/queryAfterComplaintProductByMainId',
   submitBatch='/afterCode/afterComplaint/submitBatch',
   returnSubmitBatch='/afterCode/afterComplaint/returnSubmitBatch',
 }
@@ -32,6 +33,11 @@ export const getImportUrl = Api.importExcel;
  * @param params
  */
 export const queryAfterComplaintShipListByMainId = (id) => defHttp.get({url: Api.afterComplaintShipList, params:{ id }});
+/**
+ * 查询子表数据
+ * @param params
+ */
+export const queryAfterComplaintProductListByMainId = (id) => defHttp.get({url: Api.afterComplaintProductList, params:{ id }});
 
 /**
  * 列表接口

+ 61 - 4
src/views/afterCode/AfterComplaint/AfterComplaint.data.ts

@@ -62,17 +62,17 @@ export const columns: BasicColumn[] = [
    {
     title: '是否过保(warranty expired)',
     align:"center",
-    dataIndex: 'warrantyExpired'
+    dataIndex: 'warrantyExpired_dictText'
    },
    {
     title: '实际是否过保(actual warranty expired)',
     align:"center",
-    dataIndex: 'actualWarrantyExpired'
+    dataIndex: 'actualWarrantyExpired_dictText'
    },
    {
     title: '重要等级(Important level)',
     align:"center",
-    dataIndex: 'importantLevel'
+    dataIndex: 'importantLevel_dictText'
    },
    {
     title: '业务员(salesman)',
@@ -90,7 +90,7 @@ export const columns: BasicColumn[] = [
     dataIndex: 'attsch',
    },
    {
-    title: '投诉原因(reason)',
+    title: '客户投诉原因(reason)',
     align:"center",
     dataIndex: 'reason'
    },
@@ -200,8 +200,65 @@ export const afterComplaintShipColumns: JVxeColumn[] = [
       // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
       slotName: 'action',
     },
+  ];
+
+  export const afterComplaintProductColumns: JVxeColumn[] = [
+    {
+      title: '产品编码',
+      key: 'productCode',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '产品中文名',
+      key: 'chineseName',
+      type: JVxeTypes.normal,
+      width:"300px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '产品英文名',
+      key: 'englishName',
+      type: JVxeTypes.normal,
+      width:"300px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    
+    {
+      title: '供应商名称',
+      key: 'supplierName',
+      type: JVxeTypes.normal,
+      width:"350px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '备注',
+      key: 'remarks',
+      type: JVxeTypes.input,
+      width:"450px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },{
+      title: '操作(operation)',
+      key: 'action',
+      width:"140px",
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
+    },
   ]
 
+
 // 高级查询数据
 export const superQuerySchema = {
   submit: {title: '提交(submit)1是0否',order: 0,view: 'number', type: 'number',dictCode: '',},

+ 90 - 3
src/views/afterCode/AfterComplaint/components/AfterComplaintForm.vue

@@ -90,7 +90,7 @@
 						</a-col>
 						
 						<a-col :span="12">
-							<a-form-item label="投诉原因(reason)" v-bind="validateInfos.reason" id="AfterComplaintForm-reason" name="reason">
+							<a-form-item label="客户投诉原因(reason)" v-bind="validateInfos.reason" id="AfterComplaintForm-reason" name="reason">
 								<a-textarea v-model:value="formData.reason" :rows="4" placeholder="请输入投诉原因(reason)" />
 							</a-form-item>
 						</a-col>
@@ -132,12 +132,43 @@
 		</j-vxe-table>
 		  
       </a-tab-pane>
+	  
+      <a-tab-pane tab="客户投诉-产品" key="afterComplaintProduct" :forceRender="true">
+		  <a-button
+		    type="primary"
+		    style="margin-right: 1%; margin-bottom: 1%"
+		    @click="selectSaleOrderList"
+		  >
+		    选择问题产品(select product)</a-button
+		  >
+        <j-vxe-table
+          :keep-source="true"
+          resizable
+          ref="afterComplaintProductTableRef"
+          :loading="afterComplaintProductTable.loading"
+          :columns="afterComplaintProductTable.columns"
+          :dataSource="afterComplaintProductTable.dataSource"
+          :height="340"
+          :disabled="disabled"
+          :rowNumber="true"
+          :toolbar="false">
+		  
+		  <template #action="props">
+		    <a-popconfirm title="确定删除吗?" @confirm="handleDeleteProduct(props)" v-if="!disabled">
+		      <a>删除(delete)</a>
+		    </a-popconfirm>
+		  </template>
+		</j-vxe-table>
+		  
+      </a-tab-pane>
+	  
     </a-tabs>
 	
 	
 	<SelectShipSModal ref="SelectShipSModalRef" @select="addShip" />
 	<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef" />
 	
+	<SelectSaleOrderModal ref="SelectSaleOrderModalRef" @select-sale-order="addFormSaleOrder" />
   </a-spin>
 </template>
 
@@ -145,9 +176,9 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryAfterComplaintShipListByMainId, queryDataById, saveOrUpdate } from '../AfterComplaint.api';
+  import { queryAfterComplaintShipListByMainId,queryAfterComplaintProductListByMainId, queryDataById, saveOrUpdate } from '../AfterComplaint.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import {afterComplaintShipColumns} from '../AfterComplaint.data';
+  import {afterComplaintShipColumns, afterComplaintProductColumns} from '../AfterComplaint.data';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import { Form, message  } from 'ant-design-vue';
@@ -158,6 +189,7 @@
   import SelectShipSModal from '../../../publicComponents/SelectShipSModal.vue';
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
   
+  import SelectSaleOrderModal from '../../../publicComponents/SelectSaleOrderAfterModal.vue';
   const useForm = Form.useForm;
 
   export default defineComponent({
@@ -171,6 +203,7 @@
       JSelectMultiple,
       SelectShipSModal,
       BaseShipArchiveAccessoriesModal,
+      SelectSaleOrderModal,
     },
     props:{
       formDisabled:{
@@ -188,12 +221,22 @@
 	  
 	  var SelectShipSModalRef = ref();
 	  var BaseShipArchiveAccessoriesListRef = ref();
+      const SelectSaleOrderModalRef = ref();
 	  
       const afterComplaintShipTable = reactive<Record<string, any>>({
         loading: false,
         columns: afterComplaintShipColumns,
         dataSource: []
       });
+	  
+      const afterComplaintProductTableRef = ref();
+	  
+	  const afterComplaintProductTable = reactive<Record<string, any>>({
+	    loading: false,
+	    columns: afterComplaintProductColumns,
+	    dataSource: []
+	  });
+			
       const activeKey = ref('afterComplaintShip');
       const formData = reactive<Record<string, any>>({
         id: '',
@@ -250,6 +293,39 @@
       });
 
       
+      // 选择销售订单
+      function selectSaleOrderList() {
+		  if(formData.orderNumber == null || formData.orderNumber == ''){
+			  message.error("请先输入订单编号");
+			  return;
+		  }
+		  if(formData.orderId == null || formData.orderId == ''){
+			  message.error("请先验证输入的订单编号");
+			  return;
+		  }
+        SelectSaleOrderModalRef.value.getTable(formData, 'purOrder');
+      }
+	  
+	  function addFormSaleOrder(data) {
+	  
+		  data.map((item) => {
+			item.pkSupplier = item.supplierId;
+			item.id = null;
+		  });
+		  var xTable = afterComplaintProductTableRef.value!.getXTable();
+		  var arr = xTable.data.concat(data);
+		  afterComplaintProductTable.dataSource = arr;
+		  
+	  }
+	  
+	  //产品明细-删除行
+	  async function handleDeleteProduct(prop) {
+	    var xTable = afterComplaintProductTableRef.value!.getXTable();
+	    var newArray = [...xTable.data];
+	    newArray.splice(prop.rowIndex, 1);
+	    afterComplaintProductTable.dataSource = newArray;
+	  }
+	  
       //查询船
       function selectShip() {
         SelectShipSModalRef.value.getTable();
@@ -329,6 +405,7 @@
       function add() {
         resetFields();
         afterComplaintShipTable.dataSource = [];
+        afterComplaintProductTable.dataSource = [];
       }
 
       async function edit(row) {
@@ -337,6 +414,9 @@
         //子表数据
         const afterComplaintShipDataList = await queryAfterComplaintShipListByMainId(row['id']);
         afterComplaintShipTable.dataSource = [...afterComplaintShipDataList];
+		
+        const afterComplaintProductDataList = await queryAfterComplaintProductListByMainId(row['id']);
+        afterComplaintProductTable.dataSource = [...afterComplaintProductDataList];
       }
 
       async function queryMainData(id) {
@@ -354,6 +434,7 @@
 
       const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
         'afterComplaintShip': afterComplaintShipTableRef,
+        'afterComplaintProduct': afterComplaintProductTableRef,
       });
 
       async function getFormData() {
@@ -420,11 +501,17 @@
         formRef,
 		SelectShipSModalRef,
         BaseShipArchiveAccessoriesListRef,
+        afterComplaintProductTableRef,
+        afterComplaintProductTable,
         selectShip,
         addShip,
         viewAccessory,
         handleDelete,
 		onSearchOrderNumber,
+        SelectSaleOrderModalRef,
+        selectSaleOrderList,
+        addFormSaleOrder,
+		handleDeleteProduct
       }
     }
   });

+ 121 - 7
src/views/afterCode/AfterComplaint/components/AfterComplaintFormDeal.vue

@@ -28,7 +28,7 @@
 						</a-col>
 						
 						<a-col :span="12">
-							<a-form-item label="投诉原因(reason)" v-bind="validateInfos.reason" id="AfterComplaintForm-reason" name="reason">
+							<a-form-item label="客户投诉原因(reason)" v-bind="validateInfos.reason" id="AfterComplaintForm-reason" name="reason">
 								<a-textarea v-model:value="formData.reason" disabled :rows="4" placeholder="请输入投诉原因(reason)" />
 							</a-form-item>
 						</a-col>
@@ -57,16 +57,30 @@
 								<j-dict-select-tag v-model:value="formData.dealResult" dictCode="deal_result"  allow-clear />
 							</a-form-item>
 						</a-col>
+						
+						<a-col :span="12">
+							<a-form-item label="投诉原因分类(Classification of complaint reasons)" v-bind="validateInfos.complaintType" id="AfterComplaintForm-complaintType" name="complaintType">
+								<!-- <j-dict-select-tag mode="multiple" v-model:value="formData.complaintType" dictCode="complaint_type" placeholder="请选择投诉原因分类(Classification of complaint reasons)"  allow-clear /> -->
+								<!-- <a-input v-model:value="formData.complaintType" placeholder="投诉原因分类(Classification of complaint reasons)"  allow-clear ></a-input> -->
+							  <JSelectMultiple v-model:value="formData.complaintType" placeholder="请选择投诉原因分类(Classification of complaint reasons)" dictCode="complaint_type"></JSelectMultiple>
+							</a-form-item>
+						</a-col>
 						<a-col :span="12">
 							<a-form-item label="接单时间(acceptance time)" v-bind="validateInfos.acceptanceTime" id="AfterComplaintForm-acceptanceTime" name="acceptanceTime">
 								<a-date-picker placeholder="请选择接单时间(acceptance time)"  v-model:value="formData.acceptanceTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" disabled allow-clear />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="投诉原因分类(Classification of complaint reasons)" v-bind="validateInfos.complaintType" id="AfterComplaintForm-complaintType" name="complaintType">
-								<!-- <j-dict-select-tag v-model:value="formData.complaintType" dictCode="" placeholder="请选择投诉原因分类(Classification of complaint reasons)"  allow-clear /> -->
-								<a-input v-model:value="formData.complaintType" placeholder="投诉原因分类(Classification of complaint reasons)"  allow-clear ></a-input>
-							
+							<a-form-item label="投诉原因(reason)" v-bind="validateInfos.reason1" id="AfterComplaintForm-reason1" name="reason1">
+								<a-textarea v-model:value="formData.reason1" :rows="4" placeholder="请输入投诉原因(reason)" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="投诉供应商(supplier)" v-bind="validateInfos.pkSupplier" id="AfterComplaintForm-dealman" name="pkSupplier">
+								<!-- <a-input v-model:value="formData.supplier" placeholder="请输入供应商(supplier)" allow-clear ></a-input> -->
+								<JSelectMultiple v-model:value="formData.pkSupplier" placeholder="请选择投"
+								:dictCode="dynamicDictCode">
+								</JSelectMultiple>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -108,12 +122,44 @@
 		</j-vxe-table>
 		  
       </a-tab-pane>
+	  
+	  
+	  <a-tab-pane tab="客户投诉-产品" key="afterComplaintProduct" :forceRender="true">
+	  		 <!-- <a-button
+	  		    type="primary"
+	  		    style="margin-right: 1%; margin-bottom: 1%"
+	  		    @click="selectSaleOrderList"
+	  		  >
+	  		    选择问题产品(select product)</a-button
+	  		  > -->
+	    <j-vxe-table
+	      :keep-source="true"
+	      resizable
+	      ref="afterComplaintProductTableRef"
+	      :loading="afterComplaintProductTable.loading"
+	      :columns="afterComplaintProductTable.columns"
+	      :dataSource="afterComplaintProductTable.dataSource"
+	      :height="340"
+	      :disabled="disabled"
+	      :rowNumber="true"
+	      :toolbar="false">
+	  		  
+	  		  <template #action="props">
+	  		    <a-popconfirm title="确定删除吗?" @confirm="handleDeleteProduct(props)" v-if="!disabled">
+	  		      <a>删除(delete)</a>
+	  		    </a-popconfirm>
+	  		  </template>
+	  		</j-vxe-table>
+	  		  
+	  </a-tab-pane>
+	  
     </a-tabs>
 	
 	
 	<SelectShipSModal ref="SelectShipSModalRef" @select="addShip" />
 	<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef" />
 	
+	<SelectSaleOrderModal ref="SelectSaleOrderModalRef" @select-sale-order="addFormSaleOrder" />
   </a-spin>
 </template>
 
@@ -121,9 +167,9 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryAfterComplaintShipListByMainId, queryDataById, saveOrUpdate } from '../AfterComplaint.api';
+  import { queryAfterComplaintShipListByMainId,queryAfterComplaintProductListByMainId, queryDataById, saveOrUpdate } from '../AfterComplaint.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import {afterComplaintShipColumns} from '../AfterComplaint.data';
+  import {afterComplaintShipColumns, afterComplaintProductColumns} from '../AfterComplaint.data';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import { Form, message  } from 'ant-design-vue';
@@ -134,6 +180,7 @@
   import SelectShipSModal from '../../../publicComponents/SelectShipSModal.vue';
   import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
   
+  import SelectSaleOrderModal from '../../../publicComponents/SelectSaleOrderAfterModal.vue';
   import { useUserStore } from '/@/store/modules/user';
   const userStore = useUserStore();
   const useForm = Form.useForm;
@@ -149,6 +196,7 @@
       JSelectMultiple,
       SelectShipSModal,
       BaseShipArchiveAccessoriesModal,
+      SelectSaleOrderModal,
     },
     props:{
       formDisabled:{
@@ -164,6 +212,8 @@
       const formRef = ref();
       const afterComplaintShipTableRef = ref();
 	  
+      const SelectSaleOrderModalRef = ref();
+	  
 	  var SelectShipSModalRef = ref();
 	  var BaseShipArchiveAccessoriesListRef = ref();
 	  
@@ -172,6 +222,15 @@
         columns: afterComplaintShipColumns,
         dataSource: []
       });
+	  
+	  const afterComplaintProductTableRef = ref();
+	  
+	  const afterComplaintProductTable = reactive<Record<string, any>>({
+	    loading: false,
+	    columns: afterComplaintProductColumns,
+	    dataSource: []
+	  });
+	  
       const activeKey = ref('afterComplaintShip');
       const formData = reactive<Record<string, any>>({
         id: '',
@@ -191,6 +250,7 @@
         saleDepartment: '',   
         attsch: '',   
         reason: '',   
+        reason1: '',   
         deal: '处理中',   
         dealman: userStore.getUserInfo.username,   
         dealTime: dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss'), 
@@ -199,6 +259,8 @@
         complaintType: '',   
         processRecord: '',   
         dealNotes: '',   
+        pkSupplier: '',   
+        supplierName: '',   
       });
 
       //表单验证
@@ -228,6 +290,46 @@
         return props.formDisabled;
       });
 
+      const dynamicDictCode = computed(() => {
+		  if(afterComplaintProductTable.dataSource.length == 0){
+			  return 'cusp_supplier_profile,name,id'; // 示例:返回一个不带过滤条件的默认字典编码
+		  }else{
+			  return 'after_complaint_product,supplier_name,pk_supplier,head_id = '+formData.id+' group by pk_supplier';
+		  }
+           
+      });
+      // 选择销售订单
+      function selectSaleOrderList() {
+      		  if(formData.orderNumber == null || formData.orderNumber == ''){
+      			  message.error("请先输入订单编号");
+      			  return;
+      		  }
+      		  // if(formData.orderId == null || formData.orderId == ''){
+      			 //  message.error("请先验证输入的订单编号");
+      			 //  return;
+      		  // }
+        SelectSaleOrderModalRef.value.getTable(formData, 'purOrder');
+      }
+      
+      function addFormSaleOrder(data) {
+      
+      		  data.map((item) => {
+      			item.pkSupplier = item.supplierId;
+      			item.id = null;
+      		  });
+      		  var xTable = afterComplaintProductTableRef.value!.getXTable();
+      		  var arr = xTable.data.concat(data);
+      		  afterComplaintProductTable.dataSource = arr;
+      		  
+      }
+      
+      //产品明细-删除行
+      async function handleDeleteProduct(prop) {
+        var xTable = afterComplaintProductTableRef.value!.getXTable();
+        var newArray = [...xTable.data];
+        newArray.splice(prop.rowIndex, 1);
+        afterComplaintProductTable.dataSource = newArray;
+      }
       
       //查询船
       function selectShip() {
@@ -305,6 +407,7 @@
       function add() {
         resetFields();
         afterComplaintShipTable.dataSource = [];
+        afterComplaintProductTable.dataSource = [];
       }
 
       async function edit(row) {
@@ -313,6 +416,9 @@
         //子表数据
         const afterComplaintShipDataList = await queryAfterComplaintShipListByMainId(row['id']);
         afterComplaintShipTable.dataSource = [...afterComplaintShipDataList];
+		
+        const afterComplaintProductDataList = await queryAfterComplaintProductListByMainId(row['id']);
+        afterComplaintProductTable.dataSource = [...afterComplaintProductDataList];
       }
 
       async function queryMainData(id) {
@@ -330,6 +436,7 @@
 
       const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
         'afterComplaintShip': afterComplaintShipTableRef,
+        'afterComplaintProduct': afterComplaintProductTableRef,
       });
 
       async function getFormData() {
@@ -401,6 +508,13 @@
         viewAccessory,
         handleDelete,
 		onSearchOrderNumber,
+        afterComplaintProductTableRef,
+        afterComplaintProductTable,
+        SelectSaleOrderModalRef,
+        selectSaleOrderList,
+        addFormSaleOrder,
+		handleDeleteProduct,
+		dynamicDictCode
       }
     }
   });

+ 31 - 2
src/views/dashboard/workbench/components/ProjectCard.vue

@@ -8,10 +8,33 @@
       <CardGrid class="!md:w-1/3 !w-full">
         <span class="flex">
           <Icon :icon="item.icon" :color="item.color" size="30" />
-          <span class="ml-4">{{ item.name }}</span>
+          <!-- <span style="color: cadetblue;" class="ml-4">{{ item.name }}</span> -->
+          <span style="color: cadetblue;" class="ml-4">{{ item.componentName }}</span>
         </span>
         <div class="mt-2 h-10 text-secondary">
-          <a :href="item.url">您当前有{{ item.description }}条订单数据待处理!</a>
+			<!-- <j-popup 
+			  style="border:none;"
+			  :placeholder="item.description"
+			  :code="item.name === '采购询价单(Create Purchase Inquiry)' ? 'cg' : 
+			         (item.name === '销售订单' ? 'xs' :
+			         (item.name === '发货单' ? 'fh' :
+			         (item.name === '配送单' ? 'ps' : 'alert_xm')))"
+			  :value="`您当前有${item.description}条订单数据待处理!`"
+			  :fieldConfig="[
+			    { source: 'code', target: 'name', color: 'red' }
+			  ]"
+			/> -->
+			<j-popup 
+			  style="border:none;"
+			  :placeholder="item.description"
+			  :code="item.permsType"
+			  :value="`您当前有${item.description}条订单数据待处理!`"
+			  :fieldConfig="[
+			    { source: 'code', target: 'name', color: 'red' }
+			  ]"
+			/> 
+												 
+         <!-- <a :href="item.url">您当前有{{ item.description }}条订单数据待处理!</a> -->
         </div>
          <div class="flex justify-between text-secondary">
           <span></span>
@@ -21,10 +44,16 @@
     </template>
   </Card>
 </template>
+
+
+<style lang="less" scoped>
+	
+</style>
 <script lang="ts">
   import { defineComponent } from 'vue';
   import { Card } from 'ant-design-vue';
   import { Icon } from '/@/components/Icon';
+  import JPopup from '/@/components/Form/src/jeecg/components/JPopup.vue';
   // import { groupItems } from './data';
 
   export default defineComponent({

+ 714 - 0
src/views/publicComponents/SelectSaleOrderAfterModal.vue

@@ -0,0 +1,714 @@
+<template>
+    <a-modal
+      title="选择产品(Select product)"
+      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"  @keyup.enter.native="searchQuery" :label-col="{ style: 'width: 200px' }">
+                <a-row :gutter="24">
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="订单编号(bill code)">
+                            <j-input placeholder="请输入" readonly v-model:value="queryParams.billCode"></j-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="billDate"  @change="changeBillDate" class="query-group-cust"/>
+                        </a-form-item>
+                    </a-col> -->
+                   
+                        <template v-if="toggleSearchStatus">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="产品英文名(English name)" >
+                                <j-input placeholder="请输入" v-model:value="queryParams.englishName"></j-input>
+                            </a-form-item>
+                        </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="产品编码(product code)">
+                                <j-input placeholder="请输入" v-model:value="queryParams.productCode"></j-input>
+                            </a-form-item>
+                        </a-col>
+                       <!--  <a-col :md="6" :sm="8">
+                            <a-form-item label="型号(model)">
+                                <j-input placeholder="请输入" v-model:value="queryParams.childModel"></j-input>
+                            </a-form-item>
+                        </a-col> 
+                        
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="项目(project)">
+                                    <ApiSelect
+                                        :api="ProjectOption"
+                                        showSearch
+                                        v-model:value="queryParams.project"
+                                        optionFilterProp="label"
+                                        resultField="records"
+                                        labelField="code"
+                                        valueField="id"
+                                        :params='{pageSize:-1,status:1}'
+                                        :disabled="fatherProject!==''"
+                                        />
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="产品分类(production class)" >
+                                    <ApiSelect
+                                        :api="ClassList"
+                                        showSearch
+                                        v-model:value="queryParams.productionClass"
+                                        optionFilterProp="label"
+                                        resultField="records"
+                                        labelField="name"
+                                        valueField="id"
+                                        :params='{pageSize:-1}'
+                                        />
+                                </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="12" :sm="16" v-if="showCustomer=='no'">
+                                <a-form-item label="供应商(supplier)" >
+                                    <JSelect   v-model:value="queryParams.supplierId" :get-option-url="supplierOption" :showField="showField" :param="{status:1}"  :disabled="fatherSupplier!==''"></JSelect>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="12" :sm="16" v-if="showCustomer=='yes'">
+                                <a-form-item label="客户(customer)">
+                                    <JSelect   v-model:value="queryParams.customer" :get-option-url="CustomerOption" :showField="showField"  @change="changeCustmer" :param="{status:1}"></JSelect>
+                                </a-form-item>
+                            </a-col>
+                            <a-col :md="6" :sm="8">
+                                <a-form-item label="机型(model)">
+                                    <JDictSelectTag v-model:value="queryParams.headModel" placeholder="请选择" dictCode="model_typer" style="width: 100%;"/>
+                                </a-form-item>
+                            </a-col>
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="业务员(salesman)">
+                                <j-input placeholder="请输入" v-model:value="queryParams.salesman"></j-input>
+                            </a-form-item>
+                        </a-col>   
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="销售部门(sale department)" > 
+                                <j-input placeholder="请输入" v-model:value="queryParams.saleDepartment"></j-input>
+                            </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: 1000, y: 400 }"
+                :rowSelection="{ onSelect: onSelect, onSelectAll: onSelectAll, 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,ApiSelect,JInput,JSelect} from '/@/components/Form';
+    import {ProjectOption,ClassList,supplierOption} from '../saleCode/deliveryNotice/delivertNoticeForm.api';
+    import {CustomerOption} from '../saleCode/saleContract/SaleContract.api';
+    const emit = defineEmits([ 'selectSaleOrder']); //定义emit
+    var showField = ref('currency_dictText+name');
+    var visible = ref(false)
+    var fatherProject = ref('')
+    var fatherSourceCode = ref('')
+    var fatherSupplier =ref('')
+    var fatherType = ref('')
+    var fatherCustomer=ref('')
+    var showCustomer = ref('no')
+    var getListUrl =ref('')
+    var columns1=[]
+    var columns = [
+        { 
+            type: 'selection',
+            fixed: 'left',
+            width:0
+        },
+        // {
+        //     title: '订单编号(bill code)',
+        //     dataIndex: 'billCode',
+        //     key: 'billCode',
+        //     align:"center",
+        //     width:250,
+            
+        // },
+        // {
+        //     title: '单据日期(bill date)',
+        //     dataIndex: 'billDate',
+        //     key: 'billDate',
+        //     align:"center"
+        // },
+		
+		{
+		    title: '产品编码(product code)',
+		    dataIndex: 'productCode',
+		    key: 'productCode',
+		    align:"center",
+		    width:150,
+		},
+		{
+		    title: '产品英文名(English name)',
+		    key: 'englishName',
+		    dataIndex: 'englishName',
+		    align:"center",
+		    width:200,
+		    ellipsis: true,
+		},
+		{
+		    title: '产品分类(production class)',
+		    dataIndex: 'productionClass_dictText',
+		    key: 'productionClass_dictText',
+		    align:"center",
+		    width:150,
+		},
+        {
+            title: '项目(project)',
+            dataIndex: 'projectName',
+            key: 'projectName',
+            align:"center",
+            width:150,
+            ellipsis: true,
+        },
+        {
+            title: '供应商(supplier)',
+            dataIndex: 'supplierName',
+            key: 'supplierName',
+            align:"center",
+            ellipsis: true,
+            width:200,
+            ifShow:showCustomer.value=='no'?true:false,
+            // className:showCustomer.value=='no'?'tableShow':'tableHiddle'
+        },
+        // {
+        //     title: '客户(customer)',
+        //     dataIndex: 'customerName',
+        //     key: 'customerName',
+        //     align:"center",
+        //     width:250,
+        //     // ellipsis: true,
+        //     // className:showCustomer.value=='yes'?'tableShow':'tableHiddl
+        // },
+        // {
+        //     title: '优先级(priority)',
+        //     dataIndex: 'priority_dictText',
+        //     key: 'priority_dictText',
+        //     align:"center"
+        // },
+       
+        // {
+        //     title: '机型(model)',
+        //     dataIndex: 'headModel',
+        //     key: 'headModel',
+        //     align:"center"
+        // },
+        // {
+        //     title: '销售部门(sale department)',
+        //     dataIndex: 'saleDepartment',
+        //     key: 'saleDepartment',
+        //     align:"center",
+        //     width:150,
+        // },
+        {
+            title: '业务员(salesman)',
+            dataIndex: 'salesman',
+            key: 'salesman',
+            align:"center",
+            width:150,
+        },
+        // {
+        //     title: '型号(childModel)',
+        //     key: 'childModel',
+        //     dataIndex: 'childModel',
+        //     align:"center"
+        // },
+        // {
+        //     title: '备件号(partno)',
+        //     key: 'partno',
+        //     dataIndex: 'partno',
+        //     align:"center"
+        // },
+        // {
+        //     title: '订货号(orderno)',
+        //     key: 'orderno',
+        //     dataIndex: 'partno',
+        //     align:"center",
+        // },
+        // {
+        //     title: '图号(drawingno)',
+        //     key: 'drawingno',
+        //     dataIndex: 'drawingno',
+        //     align:"center"
+        // },
+        // {
+        //     title: '厂家(factory)',
+        //     key: 'factory',
+        //     dataIndex: 'factory',
+        //     align:"center",
+        //     width:250
+        // },
+        // {
+        //     title: '质量等级(quantity grade)',
+        //     key: 'quantityGrade',
+        //     dataIndex: 'quantityGrade',
+        //     align:"center",
+        //     width:250,
+        // },
+        // {
+        //     title: '数量(quantity)',
+        //     key: 'quantity',
+        //     dataIndex: 'quantity',
+        //     align:"center",
+        //     width:250,
+        // },
+        // {
+        //     title: '单价(price)',
+        //     key: 'taxPrice',
+        //     dataIndex: 'taxPrice',
+        //     align:"center",
+        //     width:250,
+        // },
+        // {
+        //     title: '金额(tax money)',
+        //     key: 'taxAmount',
+        //     dataIndex: 'taxAmount',
+        //     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 selectionRows = ref([]);
+    const toggleSearchStatus = ref(false);
+    var billDate = ref([])
+    const queryParams = ref({
+        billCode:'',
+        project:'',
+        projectName:'',
+        productionClass:'',
+        priority:'',
+        supplierId:'',
+        supplier:'',
+        headModel:'',
+        englishName:'',
+        productCode:'',
+        childModel:'',
+        billDate_begin:'',
+        billDate_end:'',
+        saleDepartment:'',
+        salesman:'',
+        customer:'',
+    });
+    let pagination = ref({
+      current: 1,
+      pageSize: 100,
+      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: getListUrl.value ,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(fatherProject.value&&fatherProject.value!==''){
+            queryParams.value.project = fatherProject.value
+        }else {
+            queryParams.value.project = params.project
+        }
+        if(fatherSupplier.value&&fatherSupplier.value!==''){
+            queryParams.value.supplierId = fatherSupplier.value
+        }else {
+            queryParams.value.supplierId = params.supplierId
+        }
+        if(fatherCustomer.value&&fatherCustomer.value!==''){
+            queryParams.value.customer = fatherCustomer.value
+        }else {
+            queryParams.value.customer = params.customer
+        }
+        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 searchQuery(){
+        pagination.value.current = 1
+        selectedRowKeys.value = []
+        selectionRows.value=[]
+        loadData();
+    }
+    function searchReset(){
+        billDate.value = []
+        queryParams.value = {
+            billCode:'',
+            project:'',
+            projectName:'',
+            productionClass:'',
+            priority:'',
+            supplierId:'',
+            supplier:'',
+            headModel:'',
+            englishName:'',
+            productCode:'',
+            childModel:'',
+            billDate_begin:'',
+            billDate_end:'',
+            saleDepartment:'',
+            salesman:'',
+            customer:'',
+        }
+        pagination.value.current =1;
+        pagination.value.pageSize = 100; 
+        selectedRowKeys.value = []
+        selectionRows.value=[]
+        loadData();
+    }
+    function handleToggleSearch(){
+        toggleSearchStatus.value = !toggleSearchStatus.value;
+    }
+    function onSelectChange(selectedRowKeys1, selectionRows1) {
+        var arr = []
+        selectionRows.value.map(item=>{
+            arr.push(item.childId)
+        })
+        selectedRowKeys.value =  arr
+    }
+    function onSelect(record, selected, selectionRows1, nativeEvent) {
+        if (selected) {
+            selectionRows.value.push(record)
+            console.log( selectionRows.value);
+        }else{
+            const delIndex = selectionRows.value.findIndex((val) => {
+            return val.childId === record.childId
+            })
+            selectionRows.value.splice(delIndex, 1)
+        }
+    }
+    function onSelectAll(selected, selectionRows1, changeRows) {
+        if (selected) {
+            selectionRows.value = selectionRows.value.concat(changeRows)
+        }
+        if (!selected) {
+            let selectionRows2 = JSON.parse(JSON.stringify(selectionRows.value))
+            const delIndex = []
+            selectionRows2.forEach((item, index) => {
+            changeRows.forEach((val, itemIndex) => {
+                if (item.childId === val.childId) {
+                delIndex.push(index)
+                }
+            })
+            })
+            delIndex.forEach((item) => {
+            delete selectionRows2[item]
+            })
+            selectionRows2 = selectionRows2.filter((item) => {
+                return item !== undefined
+            })
+            selectionRows.value = selectionRows2
+        }
+    }
+    function handleOk(){
+        if(fatherType.value=='payRequest'){
+            emit('selectSaleOrder', selectionRows.value)
+            handleCancel()
+        }else if(fatherType.value=='purOrder'){
+            var 
+            arrSupplier=[],
+            arrProject=[]
+            selectionRows.value.map(item=>{
+				if(item.supplierId != null && item.supplierId != ''){
+					
+					arrSupplier.push(item.supplierId)
+				}
+                arrProject.push(item.project)
+            })
+            if(fatherSupplier.value&&fatherSupplier.value!==''){
+                arrSupplier.push(fatherSupplier.value)
+            }
+            if(fatherProject.value&&fatherProject.value!==''){
+                arrProject.push(fatherProject.value)
+            }
+			if(new Set(arrSupplier).size==0){
+				 message.error('所勾选数据供应商不能全都为空');
+				 return;
+			}
+            if(selectedRowKeys.value.length==0){
+                message.error('请勾选数据');
+            }else if(new Set(arrSupplier).size!==1){
+                message.error('请勾选供应商相同的数据');
+            }else if(new Set(arrProject).size!==1){
+                message.error('请勾选项目相同的数据');
+            }else{
+                emit('selectSaleOrder', selectionRows.value)
+                handleCancel()
+            }
+
+        }else if(fatherType.value=='saleOrder'){
+            var arr = [],
+            arrSupplier=[]
+            selectionRows.value.map(item=>{
+                arr.push(item.billCode)
+                arrSupplier.push(item.supplierId)
+            })
+            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('selectSaleOrder', selectionRows.value)
+                handleCancel()
+            }
+
+        }else{
+            var arr = [],
+            arrSupplier=[]
+            selectionRows.value.map(item=>{
+                arr.push(item.billCode)
+                arrSupplier.push(item.supplierId)
+            })
+            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 if(new Set(arrSupplier).size!==1){
+                message.error('请勾选供应商相同的数据');
+            }else{
+                emit('selectSaleOrder', selectionRows.value)
+                handleCancel()
+            }
+        }
+        
+    }
+    function handleCancel(){
+        visible.value = false
+        selectedRowKeys.value = []
+        selectionRows.value=[]
+        billDate.value = []
+        queryParams.value = {
+            billCode:'',
+            project:'',
+            projectName:'',
+            productionClass:'',
+            priority:'',
+            supplierId:'',
+            supplier:'',
+            headModel:'',
+            englishName:'',
+            productCode:'',
+            childModel:'',
+            billDate_begin:'',
+            billDate_end:'',
+            saleDepartment:'',
+            salesman:'',
+            customer:'',
+        }
+        pagination.value.current =1;
+        pagination.value.pageSize = 100; 
+    }
+    function getTable(formData,data){
+		if(formData.orderNumber == null || formData.orderNumber == ''){
+			return;
+		}
+		queryParams.value.billCode = formData.orderNumber;
+        visible.value = true
+        // if(formData.projectName&&formData.projectName!==''){
+        //     fatherProject.value = formData.project
+        // }else{
+        //     fatherProject.value = ''
+        // }formData.orderNumber
+        getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlert'
+        //发货通知单里使用不显示供应商
+        // if(data=='delivery'){
+        //     if(formData.sourceCode&&formData.sourceCode!==''){
+        //         fatherSourceCode.value = formData.sourceCode2
+        //     }else{
+        //         fatherSourceCode.value = ''
+        //     }
+        //     // fatherType.value='other'
+        //     fatherType.value='saleOrder'//此处变更为 发货通知单选择销售订单时 不在限制是否同一供应商
+        //     showCustomer.value = 'yes'
+        //     getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlertDelivery'
+        //     columns= columns1.filter(function(value, i) {
+        //         return i !== 4;
+        //     });
+        //     if(formData.customer&&formData.customer!==''){            
+        //         fatherCustomer.value = formData.customer
+        //     }else{
+        //         fatherCustomer.value = ''
+        //     }
+        // }else  if(data=='purOrder'){       
+        //     fatherType.value='purOrder'                 
+        //     showCustomer.value = 'no'
+        //     columns= columns1.filter(function(value, i) {
+        //         return i !== 5;
+        //     });
+        //     if(formData.supplierName&&formData.supplierName!==''){
+        //         fatherSupplier.value = formData.supplier
+        //     }else{
+        //         fatherSupplier.value = ''
+        //     }
+        //     getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlertExistSup'
+        // }else  if(data=='purOrderAfter'){       
+        //     fatherType.value='purOrder'                 
+        //     showCustomer.value = 'no'
+        //     columns= columns1.filter(function(value, i) {
+        //         return i !== 5;
+        //     });
+        //     if(formData.supplierName&&formData.supplierName!==''){
+        //         fatherSupplier.value = formData.supplier
+        //     }else{
+        //         fatherSupplier.value = ''
+        //     }
+        //     getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlertExistSup?after=1'
+        // }else  if(data=='saleOrder'){   
+        //     fatherType.value='saleOrder'                 
+        //     showCustomer.value = 'yes'
+        //     columns= columns1.filter(function(value, i) {
+        //         return i !== 5;
+        //     });
+        //     if(formData.supplierName&&formData.supplierName!==''){
+        //         fatherSupplier.value = formData.supplier
+        //     }else{
+        //         fatherSupplier.value = ''
+        //     }
+        //     getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAfter'
+        // }
+        loadData()
+    }
+    function getTableFromSalePayRequestForm(){
+        visible.value = true
+        fatherProject.value = ''
+        fatherSourceCode.value = ''
+        fatherType.value='payRequest'
+        showCustomer.value = 'no'
+        columns= columns1.filter(function(value, i) {
+            return i !== 4;
+        });
+        getListUrl.value ='/saleCode/saleOrder/selectSaleOrderDetailAlert'
+        loadData()
+    }
+
+    function changeBillDate(prop){
+       if(prop){
+            billDate.value = prop
+            queryParams.value.billDate_begin = prop[0]
+            queryParams.value.billDate_end = prop[1]
+       }else{
+            billDate.value = []
+            queryParams.value.billDate_begin = ''
+            queryParams.value.billDate_end = ''
+       }
+       
+    }
+    function changeCustmer(value){
+        queryParams.value.customer = queryParams.value.customer
+        fatherCustomer.value=''
+    }
+    defineExpose({
+      getTable,
+      getTableFromSalePayRequestForm
+    });
+</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;
+// }
+/deep/.tableHiddle {
+  display: none;
+}
+/deep/.tableShow{
+  display: revert;
+}
+</style>

+ 3 - 2
src/views/purchase/payment/components/paymentForm.vue

@@ -25,13 +25,14 @@
                   :api="applyBillList"
                   showSearch
                   v-model:value="formData.applyBill"
-                  :filterOption="false"
+                  :filterOption="true"
                   resultField="records"
                   labelField="billCode"
                   valueField="billCode"
-                  :params='{pageSize:-1}'
+                  :params='{pageSize:-1,submit:1}'
                   @change="changeApplyBill"
                 />
+				
                  <a-button type="primary" style="width: 35%;" @click="viewDetail"> 查看详情(view detail)</a-button>
 							</a-form-item>
 						</a-col>

+ 1 - 1
src/views/purchase/purPaymentRequest/components/purPaymentRequestForm.vue

@@ -326,7 +326,7 @@
           // item.orderMoney =  item.totalAmount
           item.orderMoney = item.discountAmount;
           item.applyedMoney = item.totalAmountUsed;
-          item.applyMoney = item.discountAmount - item.totalAmountUsed;
+          item.applyMoney = (item.discountAmount - item.totalAmountUsed).toFixed(2);
           item.id = undefined;
           item.notes = '';
         });

+ 21 - 21
src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

@@ -986,29 +986,29 @@
         },
         { deep: true }
       );
-      // 监听币种变化,获取汇率
-      watch(() => formData.currency, 
-        async (newVal, oldVal) => {
+   //    // 监听币种变化,获取汇率
+   //    watch(() => formData.currency, 
+   //      async (newVal, oldVal) => {
 			
-          if (newVal && newVal !== oldVal && oldVal!=null && oldVal!='') {
-            // setExchangeRate();
-            await handleChangeCurrency(newVal, oldVal);
-          }
-        },
-        { immediate: true }
-      );
-      // 监听日期变化,获取汇率
-      watch(() => formData.billDate,
-        async (newDate, oldDate) => {
-        const currentCurrency = formData.currency;
-        if (currentCurrency && newDate !== oldDate) {
-          // 保留当前币种不变,但重新获取汇率并刷新子表
+   //        if (newVal && newVal !== oldVal && oldVal!=null && oldVal!='') {
+   //          // setExchangeRate();
+   //          await handleChangeCurrency(newVal, oldVal);
+   //        }
+   //      },
+   //      { immediate: true }
+   //    );
+   //    // 监听日期变化,获取汇率
+   //    watch(() => formData.billDate,
+   //      async (newDate, oldDate) => {
+   //      const currentCurrency = formData.currency;
+   //      if (currentCurrency && newDate !== oldDate) {
+   //        // 保留当前币种不变,但重新获取汇率并刷新子表
 		   
-          await handleChangeCurrency(currentCurrency, currentCurrency);
-        }
-      },
-      { immediate: false }
-      );
+   //        await handleChangeCurrency(currentCurrency, currentCurrency);
+   //      }
+   //    },
+   //    { immediate: false }
+   //    );
       async function handleChangeCurrency (newCurrency?: string, oldCurrency?: string) {
 		  if (!newCurrency || !oldCurrency){
 			  

+ 1 - 0
src/views/purchase/purchaseQuotationFrm/PurchaseQuotationForm.data.ts

@@ -337,6 +337,7 @@ export const PuechaseQuotationFormProductColumns: JVxeColumn[] = [
       placeholder: '请输入${title}',
       defaultValue:'',  
       width:"200px",
+      statistics:['sum'],
     },
     {
       title: '折后金额(discount amount)',

+ 60 - 2
src/views/saleCode/deliveryNotice/components/deliveryNoticeForm.vue

@@ -293,6 +293,7 @@
         <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectVirtualProducts" :disabled="disabled">
           选择虚拟产品(select virtual products)</a-button
         >
+		<span style="font-size:17px;font-weight:500  "> 总数量:{{allNum}}  总金额:{{allMoney}}</span>
         <j-vxe-table
           :keep-source="true"
           resizable
@@ -339,7 +340,7 @@
 </template>
 
 <script lang="ts">
-  import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
+  import { defineComponent, ref, reactive, computed, toRaw, onMounted , watch} from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import {
@@ -389,6 +390,8 @@
     setup(props, { emit }) {
       const loading = ref(false);
       const formRef = ref();
+      let allNum = ref(0);
+      let allMoney = ref(0);
       const SelectSaleOrderModalRef = ref();
       const SelectPrpductModalRef = ref();
       var SelectProjectModalRef = ref();
@@ -487,7 +490,12 @@
         formData.saleDepartment = userStore.getUserInfo.orgCode;
         formData.saleDepartmentName = userStore.getUserInfo.orgName;
         notAllowEdit.value = false;
+		allNum.value = 0;
+		allMoney.value = 0;
       }
+	  
+	  
+	  
       //编辑方法
       async function edit(row) {
         //主表数据
@@ -496,6 +504,13 @@
         const deliveryNoticeFormShipDataList = await querydeliveryNoticeFormShipListByMainId(row['id']);
         deliveryNoticeFormShipTable.dataSource = [...deliveryNoticeFormShipDataList];
         const deliveryDetailFormProductDataList = await querydeliveryNoticeFormProductListByMainId(row['id']);
+		allNum.value = 0;
+		allMoney.value = 0;
+		deliveryDetailFormProductDataList.forEach((item) => {
+			allNum.value = allNum.value+item.quantity;
+			allMoney.value = allMoney.value+item.money;
+		});
+		
         deliveryDetailFormProductTable.dataSource = [...deliveryDetailFormProductDataList];
         getOptiom();
         getCustomerOptions();
@@ -664,8 +679,25 @@
         obj.sourceCode2 = formData.sourceCode;
         SelectSaleOrderModalRef.value.getTable(obj, 'delivery');
       }
+	  
+	  // 监听 count 的变化
+	  watch(
+	    deliveryDetailFormProductTable,
+	    (newValue, oldValue) => {
+	      let data = newValue.dataSource;
+	      let total = 0;
+	      let total2 = 0;
+	      data.map((item) => {
+	          total += Number(item.quantity) || 0;
+	          total2 += Number(item.money) || 0;
+	      });
+	     allNum.value = Number(total).toFixed(2);
+	     allMoney.value = Number(total2).toFixed(2);
+	    },
+	    { deep: true }
+	  );
+	  
       function addFormSaleOrder(data) {
-		  
 		  //由于发货单主子表备注字段均为notes,故此处赋值后清空源值(不放入子表)
 		formData.notes = data[0].notes;
         data.map((item) => {
@@ -676,6 +708,9 @@
           item.money = item.discountedAmount;
           item.taxPrice = item.discountedPrice;
           item.notes = '';
+		  
+		  allNum.value = allNum.value+item.quantity;
+		  allMoney.value = allMoney.value+item.money;
         });
         var xTable = deliveryDetailFormProductTableRef.value!.getXTable(); //关键代码 如果不更新 重新加载表格即可
         var arrProduct = xTable.data.concat(data);
@@ -714,17 +749,38 @@
           }
         });
       }
+	  
+	  function changeNum(){
+		  var xTable = deliveryDetailFormProductTableRef.value!.getXTable();
+		  var newArray = [...xTable.data];
+		  allNum.value = 0;
+		  allMoney.value = 0;
+		  let total = 0;
+		  let total2 = 0;
+		   
+		  newArray.forEach((item) => {
+		  			  total += Number(item.quantity) || 0;
+		  			  total2 += Number(item.money) || 0;
+		  });
+		  		 
+		  allNum.value = Number(total).toFixed(2);
+		  allMoney.value = Number(total2).toFixed(2);
+	  }
+	  
       function changeValues(prop) {
+		  
         if (prop.col.key == 'quantity') {
           if (prop.row.quantity == 0 || prop.row.quantity) {
             var num = prop.row.quantity * Number(prop.row.taxPrice);
             prop.row.money = isNaN(num) ? '' : num.toFixed(2);
+			changeNum();
           }
         }
         if (prop.col.key == 'taxPrice') {
           if (prop.row.taxPrice == 0 || prop.row.taxPrice) {
             var num = prop.row.quantity * Number(prop.row.taxPrice);
             prop.row.money = isNaN(num) ? '' : num.toFixed(2);
+			changeNum();
           }
         }
       }
@@ -781,6 +837,8 @@
         selectVirtualProducts,
         SelectPrpductModalRef,
         addProduct,
+		allNum,
+		allMoney,
       };
     },
   });

+ 5 - 3
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -985,9 +985,11 @@
         formData.quotationCustomer = obj.length == 0 ? '' : obj[0].customerId;
         formData.quotationCustomerName = obj.length == 0 ? '' : obj[0].customerId_dictText;
         for (const item of data) {
-          var obj = await getRowRate(item);
-          item.taxRate = obj.rateNumber;
-          item.grossMargin = obj.grossMargin;
+          // var obj = await getRowRate(item);
+          // item.taxRate = obj.rateNumber;
+          // item.grossMargin = obj.grossMargin;
+          item.taxRate = item.taxRate;
+          item.grossMargin = item.grossMargin;
           item.productClass = item.productClass;
           item.productCode = item.productCode;
           item.sourceId = item.childId;

+ 27 - 1
src/views/saleCode/quotation/quotation.vue

@@ -120,6 +120,30 @@
                 <JDictSelectTag v-model:value="queryParam.status" placeholder="请选择" dictCode="quotation_status" />
               </a-form-item>
             </a-col>
+			
+			<a-col :lg="8">
+			  <a-form-item name="saleDepartment" :label-col="{ style: 'width: 200px' }">
+			    <template #label><span title="销售部门(sale department)">销售部门(sale department)</span></template>
+			    <JSelectDept rowKey="orgCode" v-model:value="queryParam.saleDepartment" :multiple="false" />
+			  </a-form-item>
+			</a-col>
+			<a-col :lg="8">
+			  <a-form-item name="salesman" :label-col="{ style: 'width: 200px' }">
+			    <template #label><span title="业务员(salesman)">业务员(salesman)</span></template>
+			    <ApiSelect
+			      :api="SaleManOption"
+			      showSearch
+			      v-model:value="queryParam.salesman"
+			      :filterOption="true"
+			      resultField="records"
+			      labelField="realname"
+			      valueField="username"
+			      :params="{ pageSize: -1 }"
+			      optionFilterProp="label"
+			    />
+			    <!-- <JSelectUser v-model:value="queryParam.salesman" placeholder="请选择" :multiple="false" /> -->
+			  </a-form-item>
+			</a-col>
           </template>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
@@ -195,6 +219,7 @@
     cancelBatchSubmit,
     ProjectOption,
     CustomerOption,
+	SaleManOption
   } from './quotationForm.api';
   import { cloneDeep } from 'lodash-es';
   import { JDictSelectTag, ApiSelect, JInput ,JSelect} from '/@/components/Form';
@@ -203,6 +228,7 @@
   import ViewHistoryVersionModal from './components/ViewHistoryVersionModal.vue';
   import { message } from 'ant-design-vue';
   import { useMethods } from '/@/hooks/system/useMethods';
+  import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
   const { handleExportXlsx, } = useMethods();
   const formRef = ref();
   const queryParam = reactive<any>({});
@@ -288,7 +314,7 @@
     });
     reload();
   }
-
+  
   /**
    * 新增事件
    */

+ 4 - 0
src/views/saleCode/quotation/quotationForm.api.ts

@@ -29,6 +29,7 @@ enum Api {
   editExamine = '/baseCode/baseApproverHead/actionApprove',
   linkOption = '/cuspCode/cuspCustomerProfile/queryCuspCustomerProfileManByMainId',
   queryByProject = '/saleCode/saleInquiryForm/queryByProject',
+  salemanOption = 'sys/user/list',
 }
 /**
  * 导出api
@@ -165,3 +166,6 @@ export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, par
 export const queryRate = (params) => defHttp.get({url: Api.getRate, params});
 export const LinkOption = (params) => defHttp.get({ url: Api.linkOption, params });
 export const queryByProject = (params) => defHttp.get({ url: Api.queryByProject, params });
+
+//获取业务员下拉框
+export const SaleManOption = (params) => defHttp.get({ url: Api.salemanOption, params });

+ 34 - 18
src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue

@@ -7,8 +7,9 @@
           <a-col :lg="8">
             <a-form-item name="billDate" >
               <template #label><span title="单据日期(bill date)">单据日期(bill date)</span></template>
-              <a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.billDate" class="query-group-cust" />
-            </a-form-item>
+              <a-range-picker :format="['YYYY-MM-DD', 'YYYY-MM-DD']" v-model:value="queryParam.billDate1" @change="onChangequotationPeriod"  class="query-group-cust" />
+            
+			</a-form-item>
           </a-col>
           <a-col :lg="8">
               <a-form-item name="inquiryProject" >
@@ -95,7 +96,7 @@
             <a-col :lg="8">
               <a-form-item name="saleDepartment" >
                 <template #label><span title="销售部门(sale department)">销售部门(sale department)</span></template>
-                <JSelectDept v-model:value="queryParam.saleDepartment" :multiple="false" />
+                <JSelectDept rowKey="orgCode" v-model:value="queryParam.saleDepartment" :multiple="false" />
               </a-form-item>
             </a-col>
 
@@ -451,6 +452,19 @@
       },
     ];
   }
+  
+  
+  function onChangequotationPeriod(data) {
+  	  
+  	  if(data == null){
+  		  queryParam.billDate_begin = null;
+  		  queryParam.billDate_end = null;
+  	  }else{
+  		  queryParam.billDate_begin = data[0].format('YYYY-MM-DD');
+  		  queryParam.billDate_end = data[1].format('YYYY-MM-DD');
+  	  }
+  	
+  }
   function setStatus() {
     if (selectedRowKeys.value.length == 0) {
       message.warning('请选择数据');
@@ -494,7 +508,9 @@
   /**
    * 重置
    */
-  function searchReset() {
+  function searchReset() {queryParam.billDate1 = null;
+	  		  queryParam.billDate_begin = null;
+	  		  queryParam.billDate_end = null;
     formRef.value.resetFields();
     selectedRowKeys.value = [];
     //刷新数据
@@ -508,20 +524,20 @@
    */
   async function setRangeQuery() {
     let queryParamClone = cloneDeep(queryParam);
-    if (rangeField) {
-      let fieldsValue = rangeField.split(',');
-      fieldsValue.forEach((item) => {
-        if (queryParamClone[item]) {
-          let range = queryParamClone[item];
-          queryParamClone[item + '_begin'] = range[0];
-          queryParamClone[item + '_end'] = range[1];
-          delete queryParamClone[item];
-        } else {
-          queryParamClone[item + '_begin'] = '';
-          queryParamClone[item + '_end'] = '';
-        }
-      });
-    }
+    // if (rangeField) {
+    //   let fieldsValue = rangeField.split(',');
+    //   fieldsValue.forEach((item) => {
+    //     if (queryParamClone[item]) {
+    //       let range = queryParamClone[item];
+    //       queryParamClone[item + '_begin'] = range[0];
+    //       queryParamClone[item + '_end'] = range[1];
+    //       delete queryParamClone[item];
+    //     } else {
+    //       queryParamClone[item + '_begin'] = '';
+    //       queryParamClone[item + '_end'] = '';
+    //     }
+    //   });
+    // }
     return queryParamClone;
   }
 </script>

+ 10 - 10
src/views/saleCode/saleInterfaceSync/SaleInterfaceSync.data.ts

@@ -327,21 +327,21 @@ export const formSchema: FormSchema[] = [
     label: '客户号',
     field: 'buyerTnId',
     component: 'Input',
-    dynamicRules: ({model,schema}) => {
-          return [
-                 { required: true, message: '请输入客户号!'},
-          ];
-     },
+    // dynamicRules: ({model,schema}) => {
+    //       return [
+    //              { required: true, message: '请输入客户号!'},
+    //       ];
+    //  },
   },
   {
     label: '客户名称',
     field: 'buyerName',
     component: 'Input',
-    dynamicRules: ({model,schema}) => {
-          return [
-                 { required: true, message: '请输入客户名称!'},
-          ];
-     },
+    // dynamicRules: ({model,schema}) => {
+    //       return [
+    //              { required: true, message: '请输入客户名称!'},
+    //       ];
+    //  },
   },
   // {
   //   label: '供应商号',

+ 8 - 0
src/views/saleCode/saleInterfaceSync/SaleInterfaceSyncList.vue

@@ -45,6 +45,9 @@
               <a-menu-item key="10">
                 <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="handleImportExcel10">10-ANGLO.pdf导入</j-upload-button>
               </a-menu-item>
+              <a-menu-item key="11">
+                <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="handleImportExcel11">11-产品导入</j-upload-button>
+              </a-menu-item>
             </a-menu>
           </template>
           <a-button v-auth="'saleCode:sale_interface_sync:importClass'"
@@ -357,6 +360,11 @@
       handleSuccess();
     });
   }
+  function handleImportExcel11(file) {
+    handleImportXls(file, '/saleCode/saleInterfaceSync/importProduct', '').then(() => {
+      handleSuccess();
+    });
+  }
 
   /**
    * 下拉操作栏

+ 695 - 544
src/views/saleCode/salesInvoice/salesInvoiceList.vue

@@ -1,563 +1,714 @@
 <template>
-  <div class="p-2">
-    <!--查询区域-->
-    <div class="jeecg-basic-table-form-container">
-      <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="{ style: 'width: 240px' }">
-        <a-row :gutter="24">
-          <a-col :lg="8">
-            <a-form-item name="billDate">
-              <template #label><span title="发票日期(bill date)">发票日期(bill date)</span></template>
-              <a-range-picker value-format="YYYY-MM-DD" v-model:value="queryParam.billDate" class="query-group-cust" />
-            </a-form-item>
-          </a-col>
-          <a-col :lg="8">
-            <a-form-item name="project">
-              <template #label><span title="项目(project)">项目(project)</span></template>
-              <ApiSelect
-                :api="ProjectOption"
-                showSearch
-                v-model:value="queryParam.project"
-                :filterOption="true"
-                resultField="records"
-                labelField="code"
-                valueField="id"
-                :params="{ pageSize: -1, status: 1 }"
-                optionFilterProp="label"
-              />
-            </a-form-item>
-          </a-col>
+	<div class="p-2">
+		<!--查询区域-->
+		<div class="jeecg-basic-table-form-container">
+			<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam"
+				:label-col="{ style: 'width: 240px' }">
+				<a-row :gutter="24">
+					<a-col :lg="8">
+						<a-form-item name="billDate">
+							<template #label><span title="发票日期(bill date)">发票日期(bill date)</span></template>
+							<a-range-picker :format="['YYYY-MM-DD', 'YYYY-MM-DD']" v-model:value="queryParam.billDate1"
+								@change="onChangequotationPeriod" class="query-group-cust" />
+						</a-form-item>
+					</a-col>
+					<a-col :lg="8">
+						<a-form-item name="project">
+							<template #label><span title="项目(project)">项目(project)</span></template>
+							<ApiSelect :api="ProjectOption" showSearch v-model:value="queryParam.project"
+								:filterOption="true" resultField="records" labelField="code" valueField="id"
+								: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">
-                <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 }" />
-              </a-form-item>
-            </a-col>
-            <a-col :lg="8">
-              <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">
-                <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">
-                <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>
-            </a-col>
-            <a-col :lg="8">
-              <a-form-item name="organize">
-                <template #label><span title="组织(organize)">组织(organize)</span></template>
-                <a-select v-model:value="queryParam.organize">
-                  <a-select-option value="上海">上海</a-select-option>
-                  <a-select-option value="香港">香港</a-select-option>
-                </a-select>
-              </a-form-item>
-            </a-col>
-            <a-col :lg="8">
-              <a-form-item name="submit">
-                <template #label><span title="提交(submit)">提交(submit)</span></template>
-                <JDictSelectTag v-model:value="queryParam.submit" placeholder="请选择" dictCode="yes_or_no" style="width: 100%" />
-              </a-form-item>
-            </a-col>
-            <a-col :lg="8">
-              <a-form-item name="close">
-                <template #label><span title="作废(nullify)">作废(nullify)</span></template>
-                <JDictSelectTag v-model:value="queryParam.close" placeholder="请选择" dictCode="yes_or_no" style="width: 100%" />
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
-              <a-col :lg="6">
-                <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
-                <a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
-                <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
-                  {{ toggleSearchStatus ? '收起' : '展开' }}
-                  <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
-                </a>
-              </a-col>
-            </span>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!--引用表格-->
-    <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small">
-      <!--插槽:table标题-->
-      <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"> -->
-          导出(export)</a-button
-        >
-        <a-button type="primary" v-auth="'saleCode:sale_invoice:submit'" @click="submit"> 提交(submit)</a-button>
-        <a-button type="primary" v-auth="'saleCode:sale_invoice:cancelSubmit'" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
-        <a-button type="primary" v-auth="'saleCode:sale_invoice:nullify'" @click="handleNullify"> 作废(nullify)</a-button>
-        <a-dropdown v-if="selectedRowKeys.length > 0">
-          <template #overlay>
-            <a-menu>
-              <a-menu-item key="1" @click="batchHandleDelete" v-auth="'saleCode:sale_invoice:deleteBatch'">
-                <Icon icon="ant-design:delete-outlined" />
-                删除(delete)
-              </a-menu-item>
-            </a-menu>
-          </template>
-          <a-button v-auth="'saleCode:sale_invoice:deleteBatch'"
-            >批量操作
-            <Icon icon="mdi:chevron-down" />
-          </a-button>
-        </a-dropdown>
-      </template>
-      <!--操作栏-->
-      <template #action="{ record }">
-        <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
-      </template>
-      <!--字段回显插槽-->
-      <template #bodyCell="{ column, record, index, text }"> </template>
+					<template v-if="toggleSearchStatus">
+						<a-col :lg="8">
+							<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 }" />
+							</a-form-item>
+						</a-col>
+						<a-col :lg="8">
+							<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">
+								<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">
+								<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>
+						</a-col>
+						<a-col :lg="8">
+							<a-form-item name="organize">
+								<template #label><span title="组织(organize)">组织(organize)</span></template>
+								<a-select v-model:value="queryParam.organize">
+									<a-select-option value="上海">上海</a-select-option>
+									<a-select-option value="香港">香港</a-select-option>
+								</a-select>
+							</a-form-item>
+						</a-col>
+						<a-col :lg="8">
+							<a-form-item name="submit">
+								<template #label><span title="提交(submit)">提交(submit)</span></template>
+								<JDictSelectTag v-model:value="queryParam.submit" placeholder="请选择" dictCode="yes_or_no"
+									style="width: 100%" />
+							</a-form-item>
+						</a-col>
+						<a-col :lg="8">
+							<a-form-item name="close">
+								<template #label><span title="作废(nullify)">作废(nullify)</span></template>
+								<JDictSelectTag v-model:value="queryParam.close" placeholder="请选择" dictCode="yes_or_no"
+									style="width: 100%" />
+							</a-form-item>
+						</a-col>
+					</template>
+					<a-col :xl="6" :lg="7" :md="8" :sm="24">
+						<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
+							<a-col :lg="6">
+								<a-button type="primary" preIcon="ant-design:search-outlined"
+									@click="reload">查询</a-button>
+								<a-button preIcon="ant-design:reload-outlined" @click="searchReset"
+									style="margin-left: 8px">重置</a-button>
+								<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
+									{{ toggleSearchStatus ? '收起' : '展开' }}
+									<Icon
+										:icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
+								</a>
+							</a-col>
+						</span>
+					</a-col>
+				</a-row>
+			</a-form>
+		</div>
+		<!--引用表格-->
+		<BasicTable @register="registerTable" :rowSelection="rowSelection" size="small">
+			<!--插槽:table标题-->
+			<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"> -->
+					导出(export)</a-button>
+				<a-button type="primary" v-auth="'saleCode:sale_invoice:submit'" @click="submit"> 提交(submit)</a-button>
+				<a-button type="primary" v-auth="'saleCode:sale_invoice:cancelSubmit'" @click="cancelSubmit">
+					取消提交(cancelSubmit)</a-button>
+				<a-button type="primary" v-auth="'saleCode:sale_invoice:nullify'" @click="handleNullify">
+					作废(nullify)</a-button>
+				<a-dropdown v-if="selectedRowKeys.length > 0">
+					<template #overlay>
+						<a-menu>
+							<a-menu-item key="1" @click="batchHandleDelete"
+								v-auth="'saleCode:sale_invoice:deleteBatch'">
+								<Icon icon="ant-design:delete-outlined" />
+								删除(delete)
+							</a-menu-item>
+						</a-menu>
+					</template>
+					<a-button v-auth="'saleCode:sale_invoice:deleteBatch'">批量操作
+						<Icon icon="mdi:chevron-down" />
+					</a-button>
+				</a-dropdown>
+			</template>
+			<!--操作栏-->
+			<template #action="{ record }">
+				<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
+			</template>
+			<!--字段回显插槽-->
+			<template #bodyCell="{ column, record, index, text }"> </template>
 
-      <template #jumpToAndExport="props">
-        <a @click="handleView(props)" v-auth="'saleCode:sale_invoice:viewOrder'">查看(view)</a>
-        <a-divider type="vertical" />
-        <a @click="handleRowExport(props)" v-auth="'saleCode:sale_invoice:viewOrder'">导出(export)</a>
-      </template>
+			<template #jumpToAndExport="props">
 
-      <template #jumpTo="props">
-        <a @click="handleView(props)">查看(view)</a>
-      </template>
-      <template #viewFile="props">
-        <a @click="handleViewFile(props, '1')">查看</a>
-      </template>
+				<a-dropdown trigger="click">
+					<template #overlay>
+						<a-menu>
+							<a-menu-item title="点击单号查看详情" @click="handleViewPur(props,item)" v-for="(item, index) in item1List" :key="item">
+								{{ item }}
+							</a-menu-item>
+						</a-menu>
+					</template>
+					<a @click="handleView(props)" v-auth="'saleCode:sale_invoice:viewOrder'">查看(view)</a>
+				</a-dropdown>
 
-      <template #signFile="props">
-        <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" />
-    <SaleContractList @register="registerModal3" @visible-change="changeVisi" />
-  </div>
+				<!-- <a @click="handleView(props)" v-auth="'saleCode:sale_invoice:viewOrder'">查看1(view)</a> -->
+				<a-divider type="vertical" />
+				
+				<a-dropdown trigger="click">
+					<template #overlay>
+						<a-menu>
+							<a-menu-item title="点击单号导出" @click="handleRowExportPur(props,item)" v-for="(item, index) in item1List" :key="item">
+								{{ item }}
+							</a-menu-item>
+						</a-menu>
+					</template>
+					<a @click="handleRowExport(props)" v-auth="'saleCode:sale_invoice:viewOrder'">导出(export)</a>
+				</a-dropdown>
+				
+				<!-- <a @click="handleRowExport(props)" v-auth="'saleCode:sale_invoice:viewOrder'">导出(export)</a> -->
+			</template>
+
+			<template #jumpTo="props">
+				<a @click="handleView(props)">查看(view)</a>
+			</template>
+			<template #viewFile="props">
+				<a @click="handleViewFile(props, '1')">查看</a>
+			</template>
+
+			<template #signFile="props">
+				<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" />
+		<SaleContractList @register="registerModal3" @visible-change="changeVisi" />
+	</div>
 </template>
 
 <script lang="ts" name="saleCode-saleInquiryForm" setup>
-  import { ref, reactive, computed, unref, onMounted } from 'vue';
-  import { BasicTable, useTable, TableAction } from '/@/components/Table';
-  import { useListPage } from '/@/hooks/system/useListPage';
-  import { columns } from './salesInvoiceForm.data';
-  import {
-    list,
-    deleteOne,
-    batchDelete,
-    getImportUrl,
-    getExportUrl,
-    batchSubmit,
-    cancelBatchSubmit,
-    batchClose,
-    editSignSing,
-    getListDetail,
-    ProjectOption,
-    CustomerOption,
-    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 saleInvoiceFormModal from './components/saleInvoiceFormModal.vue';
-  import SaleOrderFormList from '../salesOrder/components/SaleOrderFormModal.vue';
-  import PurchaseOrderFormList from '../../purchase/purchaseOrder/components/PurchaseOrderFormModal.vue';
-  import SaleContractList from '../saleContract/components/SaleContractModal.vue';
-  import ViewFileListModal from './components/ViewFileListModal.vue';
-  import { useModal } from '/@/components/Modal';
-  import { message } from 'ant-design-vue';
-  import { useMethods } from '/@/hooks/system/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 classOption = ref([]);
-  var showField = ref('currency_dictText+name');
-  var ViewFileListModalRef = ref();
-  //注册table数据
-  const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
-    tableProps: {
-      title: '销售发票',
-      api: list,
-      columns,
-      canResize: false,
-      useSearchForm: false,
-      actionColumn: {
-        width: 300,
-        fixed: 'right',
-      },
-      scroll: {
-        x: '3500px',
-        y: 'calc(100vh - 400px)',
-      },
-      beforeFetch: async (params) => {
-        let rangerQuery = await setRangeQuery();
-        return Object.assign(params, rangerQuery);
-      },
-    },
-    exportConfig: {
-      name: '销售发票',
-      url: getExportUrl,
-      params: queryParam,
-    },
-    importConfig: {
-      url: getImportUrl,
-      success: handleSuccess,
-    },
-  });
+	import { ref, reactive, computed, unref, onMounted } from 'vue';
+	import { BasicTable, useTable, TableAction } from '/@/components/Table';
+	import { useListPage } from '/@/hooks/system/useListPage';
+	import { columns } from './salesInvoiceForm.data';
+	import {
+		list,
+		deleteOne,
+		batchDelete,
+		getImportUrl,
+		getExportUrl,
+		batchSubmit,
+		cancelBatchSubmit,
+		batchClose,
+		editSignSing,
+		getListDetail,
+		ProjectOption,
+		CustomerOption,
+		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 saleInvoiceFormModal from './components/saleInvoiceFormModal.vue';
+	import SaleOrderFormList from '../salesOrder/components/SaleOrderFormModal.vue';
+	import PurchaseOrderFormList from '../../purchase/purchaseOrder/components/PurchaseOrderFormModal.vue';
+	import SaleContractList from '../saleContract/components/SaleContractModal.vue';
+	import ViewFileListModal from './components/ViewFileListModal.vue';
+	import { useModal } from '/@/components/Modal';
+	import { message } from 'ant-design-vue';
+	import { useMethods } from '/@/hooks/system/useMethods';
+	const { handleExportXlsx } = useMethods();
+	const item1List = [];
+	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 classOption = ref([]);
+	var showField = ref('currency_dictText+name');
+	var ViewFileListModalRef = ref();
+	//注册table数据
+	const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
+		tableProps: {
+			title: '销售发票',
+			api: list,
+			columns,
+			canResize: false,
+			useSearchForm: false,
+			actionColumn: {
+				width: 300,
+				fixed: 'right',
+			},
+			scroll: {
+				x: '3500px',
+				y: 'calc(100vh - 400px)',
+			},
+			beforeFetch: async (params) => {
+				let rangerQuery = await setRangeQuery();
+				return Object.assign(params, rangerQuery);
+			},
+		},
+		exportConfig: {
+			name: '销售发票',
+			url: getExportUrl,
+			params: queryParam,
+		},
+		importConfig: {
+			url: getImportUrl,
+			success: handleSuccess,
+		},
+	});
+
+	const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
+
+	// 自动请求并暴露内部方法
+	onMounted(() => {
+		getOptiom();
+	});
+
+	/**
+	 * 新增事件
+	 */
+	function handleAdd() {
+		openModal(true, {
+			isUpdate: false,
+			showFooter: true,
+			isRevise: false,
+		});
+	}
+	/**
+	 * 编辑事件
+	 */
+	async function handleEdit(record : Recordable) {
+		openModal(true, {
+			record,
+			isUpdate: true,
+			showFooter: true,
+			isRevise: false,
+		});
+	}
+	//  产品分类
+	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 handleDetail(record : Recordable) {
+		openModal(true, {
+			record,
+			isUpdate: true,
+			showFooter: false,
+		});
+	}
+	/**
+	 * 删除事件
+	 */
+	async function handleDelete(record) {
+		await deleteOne({ id: record.id }, handleSuccess);
+	}
+	/**
+	 * 批量删除事件
+	 */
+	async function batchHandleDelete() {
+		await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
+	}
+	/**
+	 * 成功回调
+	 */
+	function handleSuccess() {
+		(selectedRowKeys.value = []) && reload();
+	}
+	/**
+	 * 操作栏
+	 */
+	function getTableAction(record) {
+		return [
+			{
+				label: '导出(export)',
+				onClick: handleExportRow.bind(null, record),
+			},
+			{
+				label: '编辑(edit)',
+				onClick: handleEdit.bind(null, record),
+				auth: 'saleCode:sale_invoice:edit',
+				ifShow: record.submit == '0' || !record.submit,
+			},
+			{
+				label: '详情(detail)',
+				onClick: handleDetail.bind(null, record),
+				ifShow: record.submit == '1',
+			},
+		];
+	}
+	/**
+	 * 下拉操作栏
+	 */
+	function getDropDownAction(record) {
+		return [
+			{
+				label: '详情(detail)',
+				onClick: handleDetail.bind(null, record),
+				ifShow: record.submit == '0' || !record.submit,
+			},
+
+			{
+				label: '下载信用证(Doenload letter of Credit)',
+				auth: 'saleCode:sale_inquiry_form:delete',
+				ifShow: record.submit == '1',
+			},
+			{
+				label: '上传盖章发票(upload stamp in invoice)',
+				auth: 'saleCode:sale_inquiry_form:delete',
+				ifShow: record.submit == '1',
+			},
+			{
+				label: '删除(delete)',
+				popConfirm: {
+					title: '是否确认删除',
+					confirm: handleDelete.bind(null, record),
+					placement: 'topLeft',
+				},
+				auth: 'saleCode:sale_invoice:delete',
+				ifShow: record.submit == '0' || !record.submit,
+			},
+		];
+	}
+	async function handleExportRow(record) {
+		var obj = {
+			id: record.id,
+		};
+		handleExportXlsx(record.invoiceCode, getExportUrlRow, obj);
+	}
+	function submit() {
+		if (selectedRowKeys.value.length == 0) {
+			message.warning('请选择数据');
+		} else {
+			var ids = selectedRowKeys.value.join(',');
+			batchSubmit({ ids: ids }, handleSuccess);
+		}
+	}
+	function cancelSubmit() {
+		if (selectedRowKeys.value.length == 0) {
+			message.warning('请选择数据');
+		} else {
+			var ids = selectedRowKeys.value.join(',');
+			cancelBatchSubmit({ ids: ids }, handleSuccess);
+		}
+	}
+	// 作废
+	function handleNullify() {
+		if (selectedRowKeys.value.length == 0) {
+			message.warning('请选择数据');
+		} else {
+			var ids = selectedRowKeys.value.join(',');
+			batchClose({ ids: ids }, handleSuccess);
+		}
+	}
+
 
-  const [registerTable, { reload }, { rowSelection, selectedRowKeys }] = tableContext;
+	//修改报价有效期
+	function onChangequotationPeriod(data) {
 
-  // 自动请求并暴露内部方法
-  onMounted(() => {
-    getOptiom();
-  });
+		if (data == null) {
+			queryParam.billDate_begin = null;
+			queryParam.billDate_end = null;
+		} else {
+			queryParam.billDate_begin = data[0].format('YYYY-MM-DD');
+			queryParam.billDate_end = data[1].format('YYYY-MM-DD');
+		}
 
-  /**
-   * 新增事件
-   */
-  function handleAdd() {
-    openModal(true, {
-      isUpdate: false,
-      showFooter: true,
-      isRevise: false,
-    });
-  }
-  /**
-   * 编辑事件
-   */
-  async function handleEdit(record: Recordable) {
-    openModal(true, {
-      record,
-      isUpdate: true,
-      showFooter: true,
-      isRevise: false,
-    });
-  }
-  //  产品分类
-  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 handleDetail(record: Recordable) {
-    openModal(true, {
-      record,
-      isUpdate: true,
-      showFooter: false,
-    });
-  }
-  /**
-   * 删除事件
-   */
-  async function handleDelete(record) {
-    await deleteOne({ id: record.id }, handleSuccess);
-  }
-  /**
-   * 批量删除事件
-   */
-  async function batchHandleDelete() {
-    await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
-  }
-  /**
-   * 成功回调
-   */
-  function handleSuccess() {
-    (selectedRowKeys.value = []) && reload();
-  }
-  /**
-   * 操作栏
-   */
-  function getTableAction(record) {
-    return [
-      {
-        label: '导出(export)',
-        onClick: handleExportRow.bind(null, record),
-      },
-      {
-        label: '编辑(edit)',
-        onClick: handleEdit.bind(null, record),
-        auth: 'saleCode:sale_invoice:edit',
-        ifShow: record.submit == '0' || !record.submit,
-      },
-      {
-        label: '详情(detail)',
-        onClick: handleDetail.bind(null, record),
-        ifShow: record.submit == '1',
-      },
-    ];
-  }
-  /**
-   * 下拉操作栏
-   */
-  function getDropDownAction(record) {
-    return [
-      {
-        label: '详情(detail)',
-        onClick: handleDetail.bind(null, record),
-        ifShow: record.submit == '0' || !record.submit,
-      },
+	}
+	async function handleViewPur(prop,item) {
 
-      {
-        label: '下载信用证(Doenload letter of Credit)',
-        auth: 'saleCode:sale_inquiry_form:delete',
-        ifShow: record.submit == '1',
-      },
-      {
-        label: '上传盖章发票(upload stamp in invoice)',
-        auth: 'saleCode:sale_inquiry_form:delete',
-        ifShow: record.submit == '1',
-      },
-      {
-        label: '删除(delete)',
-        popConfirm: {
-          title: '是否确认删除',
-          confirm: handleDelete.bind(null, record),
-          placement: 'topLeft',
-        },
-        auth: 'saleCode:sale_invoice:delete',
-        ifShow: record.submit == '0' || !record.submit,
-      },
-    ];
-  }
-  async function handleExportRow(record) {
-    var obj = {
-      id: record.id,
-    };
-    handleExportXlsx(record.invoiceCode, getExportUrlRow, obj);
-  }
-  function submit() {
-    if (selectedRowKeys.value.length == 0) {
-      message.warning('请选择数据');
-    } else {
-      var ids = selectedRowKeys.value.join(',');
-      batchSubmit({ ids: ids }, handleSuccess);
-    }
-  }
-  function cancelSubmit() {
-    if (selectedRowKeys.value.length == 0) {
-      message.warning('请选择数据');
-    } else {
-      var ids = selectedRowKeys.value.join(',');
-      cancelBatchSubmit({ ids: ids }, handleSuccess);
-    }
-  }
-  // 作废
-  function handleNullify() {
-    if (selectedRowKeys.value.length == 0) {
-      message.warning('请选择数据');
-    } else {
-      var ids = selectedRowKeys.value.join(',');
-      batchClose({ ids: ids }, handleSuccess);
-    }
-  }
-  async function handleView(prop) {
-    var param = {
-      id: '',
-      type: '',
-    };
-    if (prop.column.dataIndex == 'saleOrder') {
-      viewType.value = 'saleOrder';
-      param.id = prop.record.id;
-      param.type = 'saleOrder';
-      var record = await getListDetail(param);
-      openSaleOrder(true, {
-        record,
-        isUpdate: true,
-        showFooter: false,
-      });
-    } else if (prop.column.dataIndex == 'purchaseOrder') {
-      viewType.value = 'purchaseOrder';
-      param.id = prop.record.id;
-      param.type = 'purchaseOrder';
-      var record = await getListDetail(param);
-      openPurOrder(true, {
-        record,
-        isUpdate: true,
-        showFooter: false,
-      });
-    } else if (prop.column.dataIndex == 'saleContract') {
-      viewType.value = 'saleContract';
-      param.id = prop.record.id;
-      param.type = 'saleContract';
-      var record = await getListDetail(param);
-      openSaleContract(true, {
-        record,
-        isUpdate: true,
-        showFooter: false,
-      });
-    }
-  }
+		var param = {
+			id: '',
+			type: '',
+		};
+		viewType.value = 'purchaseOrder';
+		param.id = prop.record.id;
+		param.type = 'purchaseOrder';
+		
+		param.pur = item;
+		var record = await getListDetail(param);
+		openPurOrder(true, {
+			record,
+			isUpdate: true,
+			showFooter: false,
+		});
+		
+	}
+	async function handleView(prop) {
+		
+		this.item1List = [];
+		var param = {
+			id: '',
+			type: '',
+		};
+		if (prop.column.dataIndex == 'saleOrder') {
+			viewType.value = 'saleOrder';
+			param.id = prop.record.id;
+			param.type = 'saleOrder';
+			var record = await getListDetail(param);
+			openSaleOrder(true, {
+				record,
+				isUpdate: true,
+				showFooter: false,
+			});
+		} else if (prop.column.dataIndex == 'purchaseOrder') {
+			let st = false;
+			viewType.value = 'purchaseOrder';
+			param.id = prop.record.id;
+			param.type = 'purchaseOrder';
+			
+			let params = {
+				id: prop.record.id,
+				pur: 'pur',
+				type: 'purchaseOrder'
+			};
+			
+			 await defHttp.get({ url: '/saleCode/saleInvoice/queryBySourceId', params }, { isTransformResponse: false }).then((res) => {
+				if (res) {
+					if (res.success) {
+						if(res.result.id == undefined || res.result.id == null){
+							st = true;
+							res.result.forEach((element) => {
+								this.item1List.push(element.billCode);
+							});
+							return false;
+						}
+					}
+				}
+			});
+			if(!st){
+				
+				param.pur = '';
+				var record = await getListDetail(param);
+				openPurOrder(true, {
+					record,
+					isUpdate: true,
+					showFooter: false,
+				});
+			}
+		} else if (prop.column.dataIndex == 'saleContract') {
+			viewType.value = 'saleContract';
+			param.id = prop.record.id;
+			param.type = 'saleContract';
+			var record = await getListDetail(param);
+			openSaleContract(true, {
+				record,
+				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);
-    }
-  }
+	async function handleRowExportPur(prop,item) {
 
-  function changeVisi(data) {
-    if (!data) {
-      viewType.value = '';
-    }
-  }
-  function handleViewFile(prop, data) {
-    if (data == '1') {
-      ViewFileListModalRef.value.getTable(prop.record);
-    } else {
-      ViewFileListModalRef.value.viewFile(prop.record);
-    }
-  }
-  async function preProcessingExport() {
-    if (queryParam.billDate && queryParam.billDate.length !== 0) {
-      var bv = Object.assign({}, queryParam);
-      var obj = await setRangeQuery();
-      Object.assign(queryParam, obj);
-      delete queryParam.billDate;
-      await onExportXls();
-      queryParam.billDate = [bv.billDate[0], bv.billDate[1]];
-    } else {
-      await onExportXls();
-    }
-  }
-  /* ----------------------以下为原生查询需要添加的-------------------------- */
-  const toggleSearchStatus = ref<boolean>(false);
-  const labelCol = reactive({
-    xs: 24,
-    sm: 8,
-  });
-  const wrapperCol = reactive({
-    xs: 24,
-    sm: 16,
-  });
-  const labelCol1 = reactive({
-    xs: 24,
-    sm: 11,
-  });
-  const wrapperCol1 = reactive({
-    xs: 24,
-    sm: 13,
-  });
-  /**
-   * 重置
-   */
-  function searchReset() {
-    formRef.value.resetFields();
-    selectedRowKeys.value = [];
-    //刷新数据
-    reload();
-  }
+		var param = {
+			id: '',
+			type: '',
+		};
+		viewType.value = 'purchaseOrder';
+		param.id = prop.record.id;
+		param.type = 'purchaseOrder';
+		
+		param.pur = item;
+		var record = await getListDetail(param);
+		let obj = {
+			id: record.id,
+		};
+		handleExportXlsx(record.billCode, getExportPurOrderUrl, obj);
+		
+	}
+	async function handleRowExport(prop) {
+		
+		this.item1List = [];
+		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') {
+			
+			let st = false;
+			
+			viewType.value = 'purchaseOrder';
+			param.id = prop.record.id;
+			param.type = 'purchaseOrder';
+			
+			let params = {
+				id: prop.record.id,
+				pur: 'pur',
+				type: 'purchaseOrder'
+			};
+			
+			 await defHttp.get({ url: '/saleCode/saleInvoice/queryBySourceId', params }, { isTransformResponse: false }).then((res) => {
+				if (res) {
+					if (res.success) {
+						if(res.result.id == undefined || res.result.id == null){
+							st = true;
+							res.result.forEach((element) => {
+								this.item1List.push(element.billCode);
+							});
+							return false;
+						}
+					}
+				}
+			});
+			if(!st){
+				
+				param.pur = '';
+				
+				var record = await getListDetail(param);
+				let obj = {
+					id: record.id,
+				};
+				handleExportXlsx(record.billCode, getExportPurOrderUrl, obj);
+				
+			}
+			
+		}
+	}
 
-  let rangeField = 'billDate,';
+	function changeVisi(data) {
+		if (!data) {
+			viewType.value = '';
+		}
+	}
+	function handleViewFile(prop, data) {
+		if (data == '1') {
+			ViewFileListModalRef.value.getTable(prop.record);
+		} else {
+			ViewFileListModalRef.value.viewFile(prop.record);
+		}
+	}
+	async function preProcessingExport() {
+		if (queryParam.billDate && queryParam.billDate.length !== 0) {
+			var bv = Object.assign({}, queryParam);
+			var obj = await setRangeQuery();
+			Object.assign(queryParam, obj);
+			delete queryParam.billDate;
+			await onExportXls();
+			queryParam.billDate = [bv.billDate[0], bv.billDate[1]];
+		} else {
+			await onExportXls();
+		}
+	}
+	/* ----------------------以下为原生查询需要添加的-------------------------- */
+	const toggleSearchStatus = ref<boolean>(false);
+	const labelCol = reactive({
+		xs: 24,
+		sm: 8,
+	});
+	const wrapperCol = reactive({
+		xs: 24,
+		sm: 16,
+	});
+	const labelCol1 = reactive({
+		xs: 24,
+		sm: 11,
+	});
+	const wrapperCol1 = reactive({
+		xs: 24,
+		sm: 13,
+	});
+	/**
+	 * 重置
+	 */
+	function searchReset() {
+		queryParam.billDate1 = null;
+		queryParam.billDate_begin = null;
+		queryParam.billDate_end = null;
+		formRef.value.resetFields();
+		selectedRowKeys.value = [];
+		//刷新数据
+		reload();
+	}
 
-  /**
-   * 设置范围查询条件
-   */
-  async function setRangeQuery() {
-    let queryParamClone = cloneDeep(queryParam);
+	let rangeField = 'billDate,';
 
-    if (rangeField) {
-      let fieldsValue = rangeField.split(',');
-      fieldsValue.forEach((item) => {
-        if (queryParamClone[item]) {
-          let range = queryParamClone[item];
-          queryParamClone[item + '_begin'] = range[0];
-          queryParamClone[item + '_end'] = range[1];
-          delete queryParamClone[item];
-        } else {
-          queryParamClone[item + '_begin'] = '';
-          queryParamClone[item + '_end'] = '';
-        }
-      });
-    }
-    return queryParamClone;
-  }
+	/**
+	 * 设置范围查询条件
+	 */
+	async function setRangeQuery() {
+		let queryParamClone = cloneDeep(queryParam);
+
+		// if (rangeField) {
+		//   let fieldsValue = rangeField.split(',');
+		//   fieldsValue.forEach((item) => {
+		//     if (queryParamClone[item]) {
+		//       let range = queryParamClone[item];
+		//       queryParamClone[item + '_begin'] = range[0];
+		//       queryParamClone[item + '_end'] = range[1];
+		//       delete queryParamClone[item];
+		//     } else {
+		//       queryParamClone[item + '_begin'] = '';
+		//       queryParamClone[item + '_end'] = '';
+		//     }
+		//   });
+		// }
+		return queryParamClone;
+	}
 </script>
 <style lang="less" scoped>
-  .jeecg-basic-table-form-container {
-    padding: 0;
-    .table-page-search-submitButtons {
-      display: block;
-      margin-bottom: 8px;
-      white-space: nowrap;
-    }
-    .query-group-cust {
-      min-width: 100px !important;
-    }
-    .query-group-split-cust {
-      width: 30px;
-      display: inline-block;
-      text-align: center;
-    }
-    .ant-form-item:not(.ant-form-item-with-help) {
-      margin-bottom: 8px;
-      height: 32px;
-    }
-    :deep(.ant-picker),
-    :deep(.ant-input-number) {
-      width: 100%;
-    }
-  }
-</style>
+	.jeecg-basic-table-form-container {
+		padding: 0;
+
+		.table-page-search-submitButtons {
+			display: block;
+			margin-bottom: 8px;
+			white-space: nowrap;
+		}
+
+		.query-group-cust {
+			min-width: 100px !important;
+		}
+
+		.query-group-split-cust {
+			width: 30px;
+			display: inline-block;
+			text-align: center;
+		}
+
+		.ant-form-item:not(.ant-form-item-with-help) {
+			margin-bottom: 8px;
+			height: 32px;
+		}
+
+		:deep(.ant-picker),
+		:deep(.ant-input-number) {
+			width: 100%;
+		}
+	}
+</style>

+ 187 - 0
src/views/saleCode/salesOrder/SaleOrderForm.data.ts

@@ -455,6 +455,193 @@ export const saleOrderProductColumns: JVxeColumn[] = [
     },
   ]
 
+export const saleOrderProductColumns2: JVxeColumn[] = [
+    {
+      title: '交期(delivery time)',
+      key: 'deliveryTime',
+      type: JVxeTypes.date,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    // {
+    //   title: '产品分类(product class)',
+    //   key: 'productClass',
+    //   type: JVxeTypes.normal,
+    //   placeholder: '请输入${title}',
+    //   width:"200px",
+    //   defaultValue:'',
+    // },
+    {
+      title: '产品编码(product code)',
+      key: 'productCode',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '产品中文名(chinese name)',
+      key: 'chineseName',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '产品英文名(english name)',
+      key: 'englishName',
+      type: JVxeTypes.input,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '型号(model)',
+      key: 'model',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '备件号(partno)',
+      key: 'partno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '订货号(orderno)',
+      key: 'orderno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '图号(drawingno)',
+      key: 'drawingno',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    // {
+    //   title: '厂家(factory)',
+    //   key: 'factory',
+    //   placeholder: '请输入${title}',
+    //   width:"200px",
+    //   defaultValue:'',
+    //   type: JVxeTypes.normal,
+    // },
+    {
+      title: '质量等级(quality grade)',
+      key: 'qualityGrade',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+    },
+    {
+      title: '数量(quantity)',
+      key: 'quantity',
+      type: JVxeTypes.inputNumber,
+      validateRules: [{ required: true, message: '' }],
+      placeholder: '请输入${title}',
+      width:"200px",
+      defaultValue:'',
+	  validateRules: [
+	      { required: true, message: '${title}不能为空' },
+	      // 使用正则表达式验证非负数
+	      { 
+	        pattern: /^(0|[1-9]\d*)(\.\d+)?$/, 
+	        message: '${title}非售后不能为负' 
+	      }
+	    ],
+    },
+    {
+      title: '税率(tax rate)',
+      key: 'taxRate',
+      type: JVxeTypes.normal,
+      placeholder: '请输入${title}',
+      defaultValue:'',  
+      width:"200px",
+    },
+    {
+      title: '折扣(discount)',
+      key: 'discount',
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+      type: JVxeTypes.normal,
+    },
+    {
+      title: '折前单价(pre discount price)',
+      key: 'preDiscountPrice',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '折后单价(price)',
+      key: 'taxPrice',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '折后金额(money)',
+      key: 'taxAmount',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+      statistics:['sum'],
+    },
+    {
+      title: '折上折后单价(discounted unit price)',
+      key: 'discountedPrice',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      title: '折上折后金额(converted amount)',
+      key: 'discountedAmount',
+      type: JVxeTypes.normal,
+      width:"200px",
+      placeholder: '请输入${title}',
+      defaultValue:'',
+      statistics:['sum'],
+    },
+    {
+      title: '备注(note)',
+      key: 'notes',
+      width:"200px",
+      type: JVxeTypes.input,
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    {
+      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',},

+ 2 - 2
src/views/saleCode/salesOrder/components/SlaeOrderFormForm.vue

@@ -393,7 +393,7 @@
     getExchangeRate
   } from '../SaleOrderyForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import { saleOrderShipColumns, saleOrderProductColumns } from '../SaleOrderForm.data';
+  import { saleOrderShipColumns, saleOrderProductColumns2 } from '../SaleOrderForm.data';
   import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
   import SelectContractModal from '../../../publicComponents/SelectContractModal.vue';
   import SelectQuotationModal from '../../../publicComponents/SelectQuotationModal.vue';
@@ -454,7 +454,7 @@
       const SaleOrderFormShipFormProductTableRef = ref();
       const SaleOrderFormShipFormProductTable = reactive<Record<string, any>>({
         loading: false,
-        columns: saleOrderProductColumns,
+        columns: saleOrderProductColumns2,
         dataSource: [],
       });
       const activeKey = ref('SaleOrderFormShipFormProduct');