yuansh 5 дней назад
Родитель
Сommit
7555537b7f
24 измененных файлов с 1244 добавлено и 843 удалено
  1. 4 0
      src/views/afterCode/AfterComplaint/AfterComplaint.api.ts
  2. 48 32
      src/views/afterCode/AfterComplaint/AfterComplaintList.vue
  3. 74 0
      src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts
  4. 37 0
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.api.ts
  5. 14 1
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts
  6. 49 2
      src/views/cuspCode/SupplierProfile/CuspSupplierProfileList.vue
  7. 31 1
      src/views/dashboard/workbench/components/ProjectCard.vue
  8. 20 0
      src/views/purchase/purchaseOrder/components/AfterPurchaseOrderFormForm.vue
  9. 5 0
      src/views/purchase/purchaseQuotationFrm/PurchaseQuotationForm.data.ts
  10. 722 762
      src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue
  11. 7 0
      src/views/purchase/purchaseQuotationFrm/components/ViewHistoryQuotationModal.vue
  12. 5 0
      src/views/purchase/selectionQuotationForm/SelectionQuotationForm.data.ts
  13. 107 26
      src/views/purchase/selectionQuotationForm/components/SelectQuotationFormForm.vue
  14. 6 0
      src/views/saleCode/deliveryNotice/deliveryNoticeList.vue
  15. 58 7
      src/views/saleCode/quotation/components/quotationFormForm.vue
  16. 11 0
      src/views/saleCode/quotation/quotation.vue
  17. 19 0
      src/views/saleCode/quotation/quotationForm.api.ts
  18. 8 0
      src/views/saleCode/quotation/quotationForm.data.ts
  19. 2 0
      src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue
  20. 2 0
      src/views/saleCode/salesInvoice/salesInvoiceForm.data.ts
  21. 1 1
      src/views/saleCode/salesOrder/SaleOrderForm.data.ts
  22. 8 8
      src/views/saleCode/salesOrder/SaleOrderFormList.vue
  23. 1 1
      src/views/saleCode/salesOrder/components/AfterSlaeOrderFormForm.vue
  24. 5 2
      src/views/saleCode/salesOrder/components/SetIsNotified.vue

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

@@ -16,7 +16,11 @@ enum Api {
   afterComplaintProductList = '/afterCode/afterComplaint/queryAfterComplaintProductByMainId',
   submitBatch='/afterCode/afterComplaint/submitBatch',
   returnSubmitBatch='/afterCode/afterComplaint/returnSubmitBatch',
+  projectList='/baseCode/baseProjectArchive/list',
 }
+
+//获取项目下拉框列表
+export const ProjectOption = (params) => defHttp.get({ url: Api.projectList, params });
 /**
  * 导出api
  * @param params

+ 48 - 32
src/views/afterCode/AfterComplaint/AfterComplaintList.vue

@@ -4,49 +4,64 @@
     <div class="jeecg-basic-table-form-container">
       <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
         <a-row :gutter="24">
-          <a-col :lg="6">
-            <a-form-item name="submit">
-              <template #label><span title="提交(submit)1是0否">提交(s</span></template>
-              <a-input placeholder="请输入提交(submit)1是0否" v-model:value="queryParam.submit" allow-clear ></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :lg="6">
-            <a-form-item name="billDate">
-              <template #label><span title="投诉日期(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>
-          <template v-if="toggleSearchStatus">
-            <a-col :lg="6">
+         
+         
+            <a-col :lg="8">
               <a-form-item name="billCode">
                 <template #label><span title="投诉编号(bill code)">投诉编号</span></template>
-                <a-input placeholder="请输入投诉编号(bill code)" v-model:value="queryParam.billCode" allow-clear ></a-input>
+                <j-input placeholder="请输入投诉编号(bill code)" v-model:value="queryParam.billCode" allow-clear ></j-input>
               </a-form-item>
             </a-col>
-            <a-col :lg="6">
+            <a-col :lg="8">
               <a-form-item name="projectName">
-                <template #label><span title="项目(project)">项目(p</span></template>
-                <a-input placeholder="请输入项目(project)" v-model:value="queryParam.projectName" allow-clear ></a-input>
+                <template #label><span title="项目(project)">项目</span></template>
+				<ApiSelect
+				    :api="ProjectOption"
+				    showSearch
+				    v-model:value="queryParam.projectName"
+				    :filterOption="true"
+				    resultField="records"
+				    labelField="code"
+				    valueField="code"
+				    :params="{ pageSize: -1 ,status:1}"
+				    optionFilterProp="label"
+				/>
               </a-form-item>
             </a-col>
-            <a-col :lg="6">
+		<template v-if="toggleSearchStatus">
+			<a-col :lg="8">
+				<a-form-item name="submit">
+				  <template #label><span title="提交(submit)">提交</span></template>
+				  <JDictSelectTag v-model:value="queryParam.submit" placeholder="请选择" dictCode="commit_status" style="width: 100%" />
+				</a-form-item>
+			</a-col>
+			 
+			 <a-col :lg="8">
+			   <a-form-item name="deal">
+			     <template #label><span title="处理(deal)">处理</span></template>
+			 	<JDictSelectTag v-model:value="queryParam.deal" placeholder="处理(deal)" dictCode="deal_type" style="width: 100%" />
+			   </a-form-item>
+			 </a-col>
+			 <a-col :lg="8">
+			   <a-form-item name="warrantyExpired">
+			     <template #label><span title="是否过保(warranty expired)">是否过保</span></template>
+			     <!-- <a-input placeholder="请输入是否过保(warranty expired)" v-model:value="queryParam.warrantyExpired" allow-clear ></a-input> -->
+			   <JDictSelectTag v-model:value="queryParam.close" placeholder="请输入是否过保(warranty expired)" dictCode="yes_or_no" style="width: 100%" />
+			   </a-form-item>
+			 </a-col>
+			<a-col :lg="8">
+			  <a-form-item name="billDate">
+			    <template #label><span title="投诉日期(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="deliveryDate">
                 <template #label><span title="发货时间(delivery date)">发货时间</span></template>
                 <a-date-picker valueFormat="YYYY-MM-DD" placeholder="请选择发货时间(delivery date)"  v-model:value="queryParam.deliveryDate" allow-clear />
               </a-form-item>
             </a-col>
-            <a-col :lg="6">
-              <a-form-item name="warrantyExpired">
-                <template #label><span title="是否过保(warranty expired)">是否过保</span></template>
-                <a-input placeholder="请输入是否过保(warranty expired)" v-model:value="queryParam.warrantyExpired" allow-clear ></a-input>
-              </a-form-item>
-            </a-col>
-            <a-col :lg="6">
-              <a-form-item name="deal">
-                <template #label><span title="处理(deal)">处理(d</span></template>
-                <a-input placeholder="请输入处理(deal)" v-model:value="queryParam.deal" allow-clear ></a-input>
-              </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">
@@ -115,6 +130,7 @@
 </template>
 
 <script lang="ts" name="afterCode-afterComplaint" setup>
+  import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
   import {ref, reactive, computed, unref} from 'vue';
   import {BasicTable, useTable, TableAction} from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage'
@@ -124,7 +140,7 @@
   import {columns, superQuerySchema} from './AfterComplaint.data';
   import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,
     submitBatch,
-    returnSubmitBatch,
+    returnSubmitBatch,ProjectOption
 	} from './AfterComplaint.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { cloneDeep } from "lodash-es";

+ 74 - 0
src/views/cuspCode/CustomerProfile/CuspCustomerProfile.data.ts

@@ -5,6 +5,8 @@ import { FormSchema } from '/@/components/Table';
 import { JVxeTypes, JVxeColumn } from '/@/components/jeecg/JVxeTable/types';
 import { defHttp } from '/@/utils/http/axios';
 import { ref } from 'vue';
+import { usePermission } from '/@/hooks/web/usePermission';
+const { hasPermission } = usePermission();
 const intermediatorOption = ref([]);
 //列表数据
 export const columns: BasicColumn[] = [
@@ -291,6 +293,9 @@ export const formSchema: FormSchema[] = [
     colProps: { span: 12 },
     labelWidth: 250,
     required: true,
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: ({ formModel }) => {
       return {
         AutoComplete: 'off',
@@ -315,6 +320,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: ({ formModel }) => {
       return {
         AutoComplete: 'off',
@@ -339,6 +347,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 250,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: ({ formModel }) => {
       return {
         AutoComplete: 'off',
@@ -363,6 +374,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -373,6 +387,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 250,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -383,6 +400,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
   },
   {
     label: '联系电话(phone)',
@@ -390,6 +410,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 250,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -400,6 +423,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -410,6 +436,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 250,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -420,6 +449,9 @@ export const formSchema: FormSchema[] = [
     component: 'Input',
     labelWidth: 200,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     componentProps: {
       AutoComplete: 'off',
     },
@@ -428,6 +460,9 @@ export const formSchema: FormSchema[] = [
     label: '发票地址(invoiceAddress)',
     field: 'invoiceAddress',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 250,
     component: 'Input',
     componentProps: {
@@ -438,6 +473,9 @@ export const formSchema: FormSchema[] = [
     label: '币种(currency)',
     field: 'currency',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'JDictSelectTag',
     componentProps: {
@@ -448,6 +486,9 @@ export const formSchema: FormSchema[] = [
     label: '国家(country)',
     field: 'country',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 250,
     component: 'JDictSelectTag',
     componentProps: {
@@ -459,6 +500,9 @@ export const formSchema: FormSchema[] = [
     label: '付款条件(paymentTerms)',
     field: 'paymentTerms',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'JDictSelectTag',
     componentProps: {
@@ -470,6 +514,9 @@ export const formSchema: FormSchema[] = [
     field: 'creditLimit',
     labelWidth: 250,
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     component: 'InputNumber',
     componentProps: {
       AutoComplete: 'off',
@@ -479,6 +526,9 @@ export const formSchema: FormSchema[] = [
     label: '折扣(discount)',
     field: 'discount',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'InputNumber',
     componentProps: {
@@ -490,6 +540,9 @@ export const formSchema: FormSchema[] = [
     label: '佣金(commission)',
     field: 'commission',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 250,
     component: 'InputNumber',
     componentProps: {
@@ -508,6 +561,9 @@ export const formSchema: FormSchema[] = [
     label: '中间人(intermediator)',
     field: 'intermediator',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'ApiSelect',
     componentProps: {
@@ -533,6 +589,9 @@ export const formSchema: FormSchema[] = [
     label: '中间人佣金(intermediator commission)',
     field: 'intermediatorCommission',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 250,
     component: 'InputNumber',
     componentProps: {
@@ -550,6 +609,9 @@ export const formSchema: FormSchema[] = [
   {
     label: '优先级(priority)',
     field: 'priority',
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     colProps: { span: 12 },
     labelWidth: 200,
     component: 'JDictSelectTag',
@@ -561,6 +623,9 @@ export const formSchema: FormSchema[] = [
     label: '状态(status)',
     field: 'status',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 250,
     component: 'JDictSelectTag',
     defaultValue: 1,
@@ -573,6 +638,9 @@ export const formSchema: FormSchema[] = [
     label: '备注(notes)',
     field: 'notes',
     colProps: { span: 24 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'Input',
     componentProps: {
@@ -584,6 +652,9 @@ export const formSchema: FormSchema[] = [
     label: '隶属部门(subordinate)',
     field: 'subordinateDepart',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'ApiSelect',
     componentProps: {
@@ -641,6 +712,9 @@ export const formSchema: FormSchema[] = [
     label: '营业执照(business license)',
     field: 'files',
     colProps: { span: 12 },
+	dynamicDisabled: ({ values }) => {
+	    return hasPermission('cuspCode:cusp_customer_profile:baseEdit');
+	},
     labelWidth: 200,
     component: 'JUpload',
   },

+ 37 - 0
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.api.ts

@@ -9,6 +9,7 @@ enum Api {
   edit='/cuspCode/cuspSupplierProfile/edit',
   deleteOne = '/cuspCode/cuspSupplierProfile/delete',
   deleteBatch = '/cuspCode/cuspSupplierProfile/deleteBatch',
+  disable = '/cuspCode/cuspSupplierProfile/getDisable',
   importExcel = '/cuspCode/cuspSupplierProfile/importExcel',
   exportXls = '/cuspCode/cuspSupplierProfile/exportXls',
   cuspSupplierProfileManList = '/cuspCode/cuspSupplierProfile/queryCuspSupplierProfileManByMainId',
@@ -82,6 +83,42 @@ export const batchDelete = (params, handleSuccess) => {
     }
   });
 }
+/**
+ * 停用
+ * @param params
+ */
+export const getDisable = (params, handleSuccess) => {
+  // createConfirm({
+  //   iconType: 'warning',
+  //   title: '确认',
+  //   content: '确认此操作吗',
+  //   okText: '确认',
+  //   cancelText: '取消',
+  //   onOk: () => {
+      return defHttp.get({url: Api.disable,  params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+  //   }
+  // });
+}
+/**
+ * 启用
+ * @param params
+ */
+export const getEnable = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认启用',
+    content: '确认启用吗',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.disable,  params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
 /**
  * 保存或者更新
  * @param params

+ 14 - 1
src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts

@@ -116,6 +116,18 @@ export const columns: BasicColumn[] = [
     dataIndex: 'updateTime',
     align: 'center',
   },
+  {
+    title: '创建人',
+    key: 'createBy',
+    dataIndex: 'createBy',
+    align: 'center',
+  },
+  {
+    title: '创建时间',
+    key: 'createTime',
+    dataIndex: 'createTime',
+    align: 'center',
+  },
 ];
 //查询数据
 export const searchFormSchema: FormSchema[] = [
@@ -510,7 +522,8 @@ export const formSchema: FormSchema[] = [
     labelWidth: 200,
     component: 'JDictSelectTag',
     required: true,
-    defaultValue: 1,
+    dynamicDisabled: true,
+    defaultValue: 0,
     componentProps: {
       dictCode: 'valid_status',
       stringToNumber: true,

+ 49 - 2
src/views/cuspCode/SupplierProfile/CuspSupplierProfileList.vue

@@ -9,13 +9,23 @@
           <a-button  type="primary"  @click="getCatalog"> 供货目录(supply catalog)</a-button>
           <a-button  type="primary"  @click="formallyConverted"> 申请转正式(apply for formal conversion)</a-button>
           <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:approval'" @click="ApprovalFormallyConverted">申请转正式审批 (apply for formal conversion Approval)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:disable'" @click="getDisableInfo">禁用 (disable)</a-button>
+          <a-button  type="primary" v-auth="'cuspCode:cusp_supplier_profile:enable'" @click="getEnableInfo">启用 (enable)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
-                  <a-menu-item key="1" @click="batchHandleDelete">
+                  <a-menu-item key="1"  @click="batchHandleDelete">
                     <Icon icon="ant-design:delete-outlined"></Icon>
                     删除(delete)
                   </a-menu-item>
+                  <!-- <a-menu-item key="2" @click="getDisableInfo"  v-auth="'cuspCode:cusp_supplier_profile:aaa'">
+                    <Icon icon="ant-design:close-outlined"></Icon>
+                    禁用(disable)
+                  </a-menu-item>
+                  <a-menu-item key="3" @click="getEnableInfo">
+                    <Icon icon="ant-design:user-outlined"></Icon>
+                    启用(enable)
+                  </a-menu-item> -->
                 </a-menu>
               </template>
               <a-button v-auth="'cuspCode:cusp_supplier_profile:deleteBatch'">批量操作
@@ -34,6 +44,8 @@
     <!-- 表单区域 -->
     <CuspSupplierProfileModal @register="registerModal" @success="handleSuccess"></CuspSupplierProfileModal>
     <SupplyCatalogModal  ref="SupplyCatalogModalRef" @success="handleSuccess"></SupplyCatalogModal>
+	
+	<SetCloseReasonModal ref="SetCloseReasonModalRef"  @success="successfullyDeactive"></SetCloseReasonModal>
   </div>
 </template>
 
@@ -45,13 +57,15 @@
   import CuspSupplierProfileModal from './components/CuspSupplierProfileModal.vue'
   import SupplyCatalogModal from './components/SupplyCatalogModal.vue'
   import {columns, searchFormSchema, superQuerySchema} from './CuspSupplierProfile.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,apply,approvalApply} from './CuspSupplierProfile.api';
+  import {list, deleteOne, batchDelete, getDisable,  getEnable, getImportUrl,getExportUrl,apply,approvalApply} from './CuspSupplierProfile.api';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { useUserStore } from '/@/store/modules/user';
+  import SetCloseReasonModal from '../../publicComponents/SetCloseReasonModal.vue'
   const { createMessage} = useMessage();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
   const userStore = useUserStore();
+  var SetCloseReasonModalRef = ref();
   //注册model
   const [registerModal, {openModal}] = useModal();
   const SupplyCatalogModalRef = ref();
@@ -148,6 +162,39 @@
   async function batchHandleDelete() {
      await batchDelete({ids: selectedRowKeys.value},handleSuccess);
    }
+   
+  async function getDisableInfo() {
+	  
+	if (selectedRowKeys.value.length != 1) {
+	  message.warning('请选择一条数据');
+	} else {
+	  var ids = selectedRowKeys.value.join(',');
+	  var ids=selectedRowKeys.value.join(',')
+	  SetCloseReasonModalRef.value.getTableDeactivate(ids)
+	}
+	  
+     // await getDisable({ids: selectedRowKeys.value},handleSuccess);
+   }
+   
+   function successfullyDeactive(reason,id){
+     var params={
+       ids: id,
+       info: reason
+     }
+     getDisable(params,handleSuccess);
+   }
+   
+  async function getEnableInfo() {
+	  
+	  if (selectedRowKeys.value.length != 1) {
+	    message.warning('请选择一条数据');
+	  } else {
+	    var ids=selectedRowKeys.value.join(',')
+		await getEnable({ids:ids},handleSuccess);
+	  }
+	  
+   }
+   
    /**
     * 成功回调
     */

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

@@ -28,10 +28,12 @@
 			  style="border:none;"
 			  :placeholder="item.description"
 			  :code="item.permsType"
+			  multi="true"
 			  :value="`您当前有${item.description}条订单数据待处理!`"
 			  :fieldConfig="[
-			    { source: 'code', target: 'name', color: 'red' }
+			    { source: 'invoice_code', target: 'invoice_code', color: 'red' }
 			  ]"
+			   @popUpChange="handleOk(`${item.permsType}`,$event)" 
 			/> 
 												 
          <!-- <a :href="item.url">您当前有{{ item.description }}条订单数据待处理!</a> -->
@@ -68,6 +70,8 @@
   import { defHttp } from '/@/utils/http/axios';
   import { ref, onMounted } from 'vue';
   import { groupItems } from './data';
+    import { message } from 'ant-design-vue';
+	
   const items = ref(groupItems);
 
   onMounted(() => {
@@ -82,4 +86,30 @@
       items.value = [];
     }
   }
+  
+  function handleOk(type,row) {
+	  if(type=='salesInvoiceListNum' && row){
+		 if(row.invoice_code == '' || row.invoice_code == null){
+			 // message.success(1);
+		 }else{
+			 let params = { codes: row.invoice_code };
+			 let url = '/saleCode/saleInvoice/updateProcess';
+			 defHttp.get({ url: url, params }, { isTransformResponse: false }).then((res) => {
+			   if (res.success) {
+			 				
+			 		message.success(res.message);
+			        loadData();
+			   }else{
+			 		message.error(res.message);
+			 	}
+			 });
+		 }
+		
+	  }
+    // 点确定
+    console.log('用户点了确定',row.invoice_code)
+    console.log('用户点了确定',type)
+    // TODO: 这里写你的业务逻辑
+  }
+  
 </script>

+ 20 - 0
src/views/purchase/purchaseOrder/components/AfterPurchaseOrderFormForm.vue

@@ -309,6 +309,9 @@
         <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectVirtualProducts" :disabled="disabled">
           选择虚拟产品(select virtual products)</a-button
         >
+      <!-- <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectOrder" :disabled="disabled">
+          自定义采购售后(select Order products)</a-button
+        > -->
        <!-- <a-button
           type="primary"
           style="margin-right: 1%; margin-bottom: 1%"
@@ -367,6 +370,7 @@
     <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef" />
     <SelectSaleOrderModal ref="SelectSaleOrderModalRef" @select-sale-order="addFormSaleOrder" />
     <SelectSupplierQuotation ref="SelectSupplierQuotationRef" @select-supplier-quatation-confirm="addFromQuotation" />
+    <SelectPurchaseOrderModal ref="SelectPurchaseOrderModalRef" @select-purchase-order-mian="addOrderDetailList" />
   </a-spin>
   <a-modal v-model:visible="modalVisible" title="请输入报价选定单号(注:该操作无法撤回)" @ok="chooseQuote" :confirm-loading="confirmLoading" 
 	:mask-closable="false"
@@ -391,6 +395,7 @@
     queryPurVersonProductListByMainId,
     getExchangeRate
   } from '../PurchaseOrderyForm.api';
+  import SelectPurchaseOrderModal from '../../../publicComponents/SelectPurchaseOrderMainModal.vue';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import { purchaseOrderShipColumns, purchaseOrderProductColumns } from '../PurchaseOrderForm.data';
   import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
@@ -423,6 +428,7 @@
       ApiSelect,
       JSelectMultiple,
       SelectSupplierQuotation,
+      SelectPurchaseOrderModal,
     },
     props: {
       formDisabled: {
@@ -444,6 +450,7 @@
       const SelectSupplierQuotationRef = ref();
       const BaseShipArchiveAccessoriesModalRef = ref();
       const SelectSaleOrderModalRef = ref();
+      const SelectPurchaseOrderModalRef = ref();
 	  
 	  const modalVisible = ref(false);
 	  const confirmLoading = ref(false);
@@ -765,6 +772,16 @@
           }
         });
       }
+	  
+	  function selectOrder() {
+	    SelectPurchaseOrderModalRef.value.getTable(formData);
+	  }
+	  
+	  function addOrderDetailList(data) {
+	    console.log("==============");
+	    console.log(data);
+	  }
+	  
       function addFormSaleOrder(data) {
         data.map((item) => {
           item.model = item.childModel;
@@ -1096,6 +1113,7 @@
         notAllowEdit,
         selectSaleOrderList,
         addFormSaleOrder,
+        selectOrder,
         ClassList,
         supplierOption,
         selectVirtualProducts,
@@ -1108,6 +1126,8 @@
 		inputValue,
 		chooseQuote,
 		confirmLoading,
+        SelectPurchaseOrderModalRef,
+        addOrderDetailList,
       };
     },
   });

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

@@ -101,6 +101,11 @@ export const columns: BasicColumn[] = [
       dataIndex: 'quotationSuppiler',
       ifShow:false
      },
+    {
+      title: '报价情况(quotationType)',
+      align:"center",
+      dataIndex: 'quotationType',
+     },
    {
       title: '制单人',
       align:"center",

+ 722 - 762
src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue

@@ -1,783 +1,743 @@
 <template>
-  <a-spin :spinning="loading">
-    <JFormContainer :disabled="disabled">
-      <template #detail>
-        <a-form v-bind="formItemLayout" name="PuechaseQuotationFormForm" ref="formRef">
-          <a-row>
-            <a-col :span="12">
-              <a-form-item label="报价单号(bill code)" v-bind="validateInfos.billCode" id="PuechaseQuotationFormForm-billCode" name="billCode">
-                <a-input v-model:value="formData.billCode" placeholder="自动生成" disabled />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate" id="PuechaseQuotationFormForm-billDate" name="billDate">
-                <a-date-picker
-                  placeholder="请选择单据日期(bill date)"
-                  v-model:value="formData.billDate"
-                  value-format="YYYY-MM-DD"
-                  style="width: 100%"
-                  allow-clear
-                />
-              </a-form-item>
-            </a-col>
+	<a-spin :spinning="loading">
+		<JFormContainer :disabled="disabled">
+			<template #detail>
+				<a-form v-bind="formItemLayout" name="PuechaseQuotationFormForm" ref="formRef">
+					<a-row>
+						<a-col :span="12">
+							<a-form-item label="报价单号(bill code)" v-bind="validateInfos.billCode"
+								id="PuechaseQuotationFormForm-billCode" name="billCode">
+								<a-input v-model:value="formData.billCode" placeholder="自动生成" disabled />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="单据日期(bill date)" v-bind="validateInfos.billDate"
+								id="PuechaseQuotationFormForm-billDate" name="billDate">
+								<a-date-picker placeholder="请选择单据日期(bill date)" v-model:value="formData.billDate"
+									value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
+							</a-form-item>
+						</a-col>
 
-            <a-col :span="12">
-              <a-form-item
-                label="报价项目(quotation project)"
-                v-bind="validateInfos.projectName"
-                id="PuechaseQuotationFormForm-projectName"
-                name="projectName"
-              >
-                <a-input-search
-                  v-model:value="formData.projectName"
-                  placeholder="请输入报价项目(quotation project)"
-                  readonly
-                  :disabled="notAllowEdit"
-                  allow-clear
-                  enter-button="Search"
-                  @search="onSearchProject"
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="报价供应商(quotation supplier)"
-                v-bind="validateInfos.quotationSuppiler"
-                id="PuechaseQuotationFormForm-quotationSuppiler"
-                name="quotationSuppiler"
-              >
-                <JSelect
-                  v-model:value="formData.quotationSuppiler"
-                  :get-option-url="supplierOption"
-                  :showField="showField"
-                  @change="changeSupplier"
-                  :param="{ status: 1 }"
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="报价截至日期(quotation deadline)"
-                v-bind="validateInfos.quotationDeadline"
-                id="PuechaseQuotationFormForm-quotationDeadline"
-                name="quotationDeadline"
-              >
-                <a-date-picker
-                  placeholder="请选择"
-                  v-model:value="formData.quotationDeadline"
-                  value-format="YYYY-MM-DD"
-                  format="YYYY-MM-DD"
-                  style="width: 100%"
-                  allow-clear
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="优先级(priority)" v-bind="validateInfos.priority" id="PuechaseQuotationFormForm-priority" name="priority">
-                <JDictSelectTag v-model:value="formData.priority" placeholder="请选择" dictCode="priority" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="产品分类(production class)"
-                v-bind="validateInfos.productionClass"
-                id="PuechaseQuotationFormForm-productionClass"
-                name="productionClass"
-              >
-                <ApiSelect
-                  :api="ClassList"
-                  showSearch
-                  v-model:value="formData.productionClass"
-                  optionFilterProp="label"
-                  resultField="records"
-                  labelField="name"
-                  valueField="id"
-                  disabled
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="机型(model)" v-bind="validateInfos.model" id="PuechaseQuotationFormForm-model" name="model">
-                <JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer" disabled />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="厂家(maker)" v-bind="validateInfos.maker" id="PuechaseQuotationFormForm-maker" name="maker">
-                <a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)" allow-clear disabled />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="发货地址(place of delivery)"
-                v-bind="validateInfos.placeDelivery"
-                id="PuechaseQuotationFormForm-placeDelivery"
-                name="placeDelivery"
-              >
-                <a-input v-model:value="formData.placeDelivery" placeholder="" allow-clear />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="付款条件(payment terms)"
-                v-bind="validateInfos.paymentTerms"
-                id="PuechaseQuotationFormForm-paymentTerms"
-                name="paymentTerms"
-                :labelCol="formItemLayout.labelCol1"
-                :wrapperCol="formItemLayout.wrapperCol1"
-              >
-                <JDictSelectTag
-                  v-model:value="formData.paymentTerms"
-                  placeholder="请选择"
-                  dictCode="payment_terms"
-                  style="width: 49%; margin-right: 1%"
-                />
-                <a-input v-model:value="formData.paymentTermsInfo" placeholder="" allow-clear style="width: 49%" AutoComplete="off" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery" id="PuechaseQuotationFormForm-delivery" name="delivery">
-                <JDictSelectTag v-model:value="formData.delivery" placeholder="请选择" dictCode="delivery_methods" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="交期(delivery day)"
-                v-bind="validateInfos.deliveryDayHead"
-                id="PuechaseQuotationFormForm-deliveryDayHead"
-                name="deliveryDayHead"
-              >
-                <a-input-number v-model:value="formData.deliveryDayHead" placeholder="请输入" style="width: 100%" @change="changeFormDeliveryTime" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="报价有效期(quotation validity period)"
-                v-bind="validateInfos.quotationValidity"
-                id="PuechaseQuotationFormForm-quotationValidity"
-                name="quotationValidity"
-              >
-                <a-input v-model:value="formData.quotationValidity" placeholder="请输入" style="width: 40%; margin-right: 1%" />天(days)到
-                <a-date-picker
-                  v-model:value="formData.quotationValidityDate"
-                  valueFormat="YYYY-MM-DD"
-                  format="YYYY-MM-DD"
-                  style="width: 40%; margin-left: 1%"
-                />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="质量等级(quality grade)"
-                v-bind="validateInfos.inquiryTeam"
-                id="SaleInquiryFormForm-inquiryTeam"
-                name="inquiryTeam"
-                :label-col="formItemLayout.labelCol1"
-                :wrapper-col="formItemLayout.wrapperCol1"
-              >
-                <JDictSelectTag v-model:value="formData.qualityGradeHead" @change="changeFormInquiryTeam" placeholder="请选择" dictCode="quality_grade" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item label="币种(currency)" v-bind="validateInfos.currency" id="PuechaseQuotationFormForm-currency" name="currency">
-                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" :disabled="formData.submit == '1' || !hasPermission('purCode:pur_purchase_quotation:editBZ')"  dictCode="currency"  />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="报价备注(quotation notes)"
-                v-bind="validateInfos.quotationNotes"
-                id="PuechaseQuotationFormForm-quotationNotes"
-                name="quotationNotes"
-              >
-                <a-input v-model:value="formData.quotationNotes" placeholder="请输入报价备注(quotation notes)" allow-clear AutoComplete="off" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="技术资料(technical information)"
-                v-bind="validateInfos.technicalInformation"
-                id="PuechaseQuotationFormForm-technicalInformation"
-                name="technicalInformation"
-              >
-                <JUpload v-model:value="formData.technicalInformation" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-              				  label="表尾备注"
-              				  v-bind="validateInfos.agreementTerms"
-              				  id="PuechaseQuotationFormForm-agreementTerms"
-              				  name="agreementTerms"
-              				  :labelCol="formItemLayout.labelCol1"
-              				  :wrapperCol="formItemLayout.wrapperCol1"
-              				>
-              				<a-textarea v-model:value="formData.agreementTerms" placeholder="" allow-clear AutoComplete="off" />
-              </a-form-item>
-            </a-col>
-            <a-col :span="12">
-              <a-form-item
-                label="报价资料(quotation information)"
-                v-bind="validateInfos.quotationInformation"
-                id="PuechaseQuotationFormForm-quotationInformation"
-                name="quotationInformation"
-              >
-                <JUpload v-model:value="formData.quotationInfomation" />
-              </a-form-item>
-            </a-col>
-          </a-row>
-        </a-form>
-      </template>
-    </JFormContainer>
-
-    <!-- 子表单区域 -->
-    <a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
-      <a-tab-pane tab="采购报价单 - 产品明细(product details)" key="PuechaseQuotationFormProduct" :forceRender="true">
-        <a-button type="primary" @click="SelectSupplierInquiry" style="margin-right: 1%; margin-bottom: 1%" :disabled="disabled">
-          选择供应商询价单(select supplier inquiry form)</a-button
-        >
-        <a-button type="primary" @click="selectProducts" style="margin-right: 1%; margin-bottom: 1%" :disabled="disabled">
-          选择产品(select product)</a-button
-        >
-        <a-button type="primary" @click="setDiscountForSonList" style="margin-right: 1%; margin-bottom: 1%" :disabled="disabled">
-          设置折扣(set discount)</a-button
-        >
-        <j-vxe-table
-          :keep-source="true"
-          resizable
-          ref="PuechaseQuotationFormProductTableRef"
-          :loading="PuechaseQuotationFormProductTable.loading"
-          :columns="PuechaseQuotationFormProductTable.columns"
-          :dataSource="PuechaseQuotationFormProductTable.dataSource"
-          :disabled="disabled"
-          :rowNumber="true"
-          :rowSelection="true"
-          asyncRemove
-		  :maxHeight="540"
-		  :keyboardEdit="true"
-          @value-change="changeValues"
-        >
-			<template #lastPrice="props">
-			  <a @click="viewHistory(props.row.productId)">查看历史</a>
+						<a-col :span="12">
+							<a-form-item label="报价项目(quotation project)" v-bind="validateInfos.projectName"
+								id="PuechaseQuotationFormForm-projectName" name="projectName">
+								<a-input-search v-model:value="formData.projectName"
+									placeholder="请输入报价项目(quotation project)" readonly :disabled="notAllowEdit"
+									allow-clear enter-button="Search" @search="onSearchProject" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="报价供应商(quotation supplier)" v-bind="validateInfos.quotationSuppiler"
+								id="PuechaseQuotationFormForm-quotationSuppiler" name="quotationSuppiler">
+								<JSelect v-model:value="formData.quotationSuppiler" :get-option-url="supplierOption"
+									:showField="showField" @change="changeSupplier" :param="{ status: 1 }" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="报价截至日期(quotation deadline)" v-bind="validateInfos.quotationDeadline"
+								id="PuechaseQuotationFormForm-quotationDeadline" name="quotationDeadline">
+								<a-date-picker placeholder="请选择" v-model:value="formData.quotationDeadline"
+									value-format="YYYY-MM-DD" format="YYYY-MM-DD" style="width: 100%" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="优先级(priority)" v-bind="validateInfos.priority"
+								id="PuechaseQuotationFormForm-priority" name="priority">
+								<JDictSelectTag v-model:value="formData.priority" placeholder="请选择"
+									dictCode="priority" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="产品分类(production class)" v-bind="validateInfos.productionClass"
+								id="PuechaseQuotationFormForm-productionClass" name="productionClass">
+								<ApiSelect :api="ClassList" showSearch v-model:value="formData.productionClass"
+									optionFilterProp="label" resultField="records" labelField="name" valueField="id"
+									disabled />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="机型(model)" v-bind="validateInfos.model"
+								id="PuechaseQuotationFormForm-model" name="model">
+								<JDictSelectTag v-model:value="formData.model" placeholder="请选择" dictCode="model_typer"
+									disabled />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="厂家(maker)" v-bind="validateInfos.maker"
+								id="PuechaseQuotationFormForm-maker" name="maker">
+								<a-input v-model:value="formData.maker" placeholder="请输入厂家(maker)" allow-clear
+									disabled />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="发货地址(place of delivery)" v-bind="validateInfos.placeDelivery"
+								id="PuechaseQuotationFormForm-placeDelivery" name="placeDelivery">
+								<a-input v-model:value="formData.placeDelivery" placeholder="" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="付款条件(payment terms)" v-bind="validateInfos.paymentTerms"
+								id="PuechaseQuotationFormForm-paymentTerms" name="paymentTerms"
+								:labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
+								<JDictSelectTag v-model:value="formData.paymentTerms" placeholder="请选择"
+									dictCode="payment_terms" style="width: 49%; margin-right: 1%" />
+								<a-input v-model:value="formData.paymentTermsInfo" placeholder="" allow-clear
+									style="width: 49%" AutoComplete="off" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="发货方式(delivery)" v-bind="validateInfos.delivery"
+								id="PuechaseQuotationFormForm-delivery" name="delivery">
+								<JDictSelectTag v-model:value="formData.delivery" placeholder="请选择"
+									dictCode="delivery_methods" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="交期(delivery day)" v-bind="validateInfos.deliveryDayHead"
+								id="PuechaseQuotationFormForm-deliveryDayHead" name="deliveryDayHead">
+								<a-input-number v-model:value="formData.deliveryDayHead" placeholder="请输入"
+									style="width: 100%" @change="changeFormDeliveryTime" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="报价有效期(quotation validity period)"
+								v-bind="validateInfos.quotationValidity"
+								id="PuechaseQuotationFormForm-quotationValidity" name="quotationValidity">
+								<a-input v-model:value="formData.quotationValidity" placeholder="请输入"
+									style="width: 40%; margin-right: 1%" />天(days)到
+								<a-date-picker v-model:value="formData.quotationValidityDate" valueFormat="YYYY-MM-DD"
+									format="YYYY-MM-DD" style="width: 40%; margin-left: 1%" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="质量等级(quality grade)" v-bind="validateInfos.inquiryTeam"
+								id="SaleInquiryFormForm-inquiryTeam" name="inquiryTeam"
+								:label-col="formItemLayout.labelCol1" :wrapper-col="formItemLayout.wrapperCol1">
+								<JDictSelectTag v-model:value="formData.qualityGradeHead"
+									@change="changeFormInquiryTeam" placeholder="请选择" dictCode="quality_grade" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="币种(currency)" v-bind="validateInfos.currency"
+								id="PuechaseQuotationFormForm-currency" name="currency">
+								<JDictSelectTag v-model:value="formData.currency" placeholder="请选择"
+									:disabled="formData.submit == '1' || !hasPermission('purCode:pur_purchase_quotation:editBZ')"
+									dictCode="currency" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="报价备注(quotation notes)" v-bind="validateInfos.quotationNotes"
+								id="PuechaseQuotationFormForm-quotationNotes" name="quotationNotes">
+								<a-input v-model:value="formData.quotationNotes" placeholder="请输入报价备注(quotation notes)"
+									allow-clear AutoComplete="off" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="技术资料(technical information)" v-bind="validateInfos.technicalInformation"
+								id="PuechaseQuotationFormForm-technicalInformation" name="technicalInformation">
+								<JUpload v-model:value="formData.technicalInformation" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="表尾备注" v-bind="validateInfos.agreementTerms"
+								id="PuechaseQuotationFormForm-agreementTerms" name="agreementTerms"
+								:labelCol="formItemLayout.labelCol1" :wrapperCol="formItemLayout.wrapperCol1">
+								<a-textarea v-model:value="formData.agreementTerms" placeholder="" allow-clear
+									AutoComplete="off" />
+							</a-form-item>
+						</a-col>
+						<a-col :span="12">
+							<a-form-item label="报价资料(quotation information)" v-bind="validateInfos.quotationInformation"
+								id="PuechaseQuotationFormForm-quotationInformation" name="quotationInformation">
+								<JUpload v-model:value="formData.quotationInfomation" />
+							</a-form-item>
+						</a-col>
+					</a-row>
+				</a-form>
 			</template>
-          <template #action="props">
-            <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)" v-if="!disabled">
-              <a>删除(delete)</a>
-            </a-popconfirm>
-          </template>
-        </j-vxe-table>
-      </a-tab-pane>
-      <a-tab-pane tab="采购报价单 - 船明细(ship details)" key="PuechaseQuotationFormShip" :forceRender="true">
-        <j-vxe-table
-          :keep-source="true"
-          resizable
-          ref="PuechaseQuotationFormShipTableRef"
-          :loading="PuechaseQuotationFormShipTable.loading"
-          :columns="PuechaseQuotationFormShipTable.columns"
-          :dataSource="PuechaseQuotationFormShipTable.dataSource"
-          :disabled="disabled"
-          :rowNumber="true"
-          :rowSelection="true"
-        >
-          <template #action="props">
-            <a @click="viewAccessory(props)">查看配件信息(view accessory information)</a>
-          </template>
-        </j-vxe-table>
-      </a-tab-pane>
-    </a-tabs>
-    <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef" />
-    <SelectPrpductModal ref="SelectPrpductModalRef" @select-product="addProduct" />
-    <SelectProjectModal ref="SelectProjectModalRef" @select-project="addProject" />
-    <ViewHistoryQuotationModal ref="ViewHistoryQuotationModalRef" />
-    <SelectSupplierInquiryModal ref="SelectSupplierInquiryModalRef" @select-customer-inquiry="addProductFromCustomer" />
-    <SetSonList ref="SetSonListRef" @success="setSonListFiled" />
-  </a-spin>
+		</JFormContainer>
+
+		<!-- 子表单区域 -->
+		<a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
+			<a-tab-pane tab="采购报价单 - 产品明细(product details)" key="PuechaseQuotationFormProduct" :forceRender="true">
+				<a-button type="primary" @click="SelectSupplierInquiry" style="margin-right: 1%; margin-bottom: 1%"
+					:disabled="disabled">
+					选择供应商询价单(select supplier inquiry form)</a-button>
+				<a-button type="primary" @click="selectProducts" style="margin-right: 1%; margin-bottom: 1%"
+					:disabled="disabled">
+					选择产品(select product)</a-button>
+				<a-button type="primary" @click="setDiscountForSonList" style="margin-right: 1%; margin-bottom: 1%"
+					:disabled="disabled">
+					设置折扣(set discount)</a-button>
+				<j-vxe-table :keep-source="true" resizable ref="PuechaseQuotationFormProductTableRef"
+					:loading="PuechaseQuotationFormProductTable.loading"
+					:columns="PuechaseQuotationFormProductTable.columns"
+					:dataSource="PuechaseQuotationFormProductTable.dataSource" :disabled="disabled" :rowNumber="true"
+					:rowSelection="true" asyncRemove :maxHeight="540" :keyboardEdit="true" @value-change="changeValues">
+					<template #lastPrice="props">
+						<a @click="viewHistory(props.row.productId)">查看历史</a>
+					</template>
+					<template #action="props">
+						<a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)" v-if="!disabled">
+							<a>删除(delete)</a>
+						</a-popconfirm>
+					</template>
+				</j-vxe-table>
+			</a-tab-pane>
+			<a-tab-pane tab="采购报价单 - 船明细(ship details)" key="PuechaseQuotationFormShip" :forceRender="true">
+				<j-vxe-table :keep-source="true" resizable ref="PuechaseQuotationFormShipTableRef"
+					:loading="PuechaseQuotationFormShipTable.loading" :columns="PuechaseQuotationFormShipTable.columns"
+					:dataSource="PuechaseQuotationFormShipTable.dataSource" :disabled="disabled" :rowNumber="true"
+					:rowSelection="true">
+					<template #action="props">
+						<a @click="viewAccessory(props)">查看配件信息(view accessory information)</a>
+					</template>
+				</j-vxe-table>
+			</a-tab-pane>
+		</a-tabs>
+		<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef" />
+		<SelectPrpductModal ref="SelectPrpductModalRef" @select-product="addProduct" />
+		<SelectProjectModal ref="SelectProjectModalRef" @select-project="addProject" />
+		<ViewHistoryQuotationModal ref="ViewHistoryQuotationModalRef" />
+		<SelectSupplierInquiryModal ref="SelectSupplierInquiryModalRef"
+			@select-customer-inquiry="addProductFromCustomer" />
+		<SetSonList ref="SetSonListRef" @success="setSonListFiled" />
+	</a-spin>
 </template>
 
 <script lang="ts">
-  import { defineComponent, ref, reactive, computed, toRaw } from 'vue';
-  import { defHttp } from '/@/utils/http/axios';
-  import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import {
-    PuechaseQuotationFormShippTable,
-    queryPurcodeQuotationFormProductListByMainId,
-    queryDataById,
-    saveOrUpdate,
-    ClassList,
-    supplierOption,
-  } from '../PurchaseQuotationForm.api';
-  import { JVxeTable } from '/@/components/jeecg/JVxeTable';
-  import { PuechaseQuotationFormShipColumns, PuechaseQuotationFormProductColumns } from '../PurchaseQuotationForm.data';
-  import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
-  import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
-  import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
-  import SelectSupplierInquiryModal from './SelectSupplierInquiryModal.vue';
-  import ViewHistoryQuotationModal from './ViewHistoryQuotationModal.vue';
-  import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
-  import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
-  import { JDictSelectTag, ApiSelect, JSelect } from '/@/components/Form';
-  import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
-  import SetSonList from './SetSonList.vue';
-  import { Form, message } from 'ant-design-vue';
-  import moment from 'moment';
-  import { usePermission } from '/@/hooks/web/usePermission';
-  const useForm = Form.useForm;
-  export default defineComponent({
-    name: 'PuechaseQuotationFormForm',
-    components: {
-      JVxeTable,
-      JFormContainer,
-      BaseShipArchiveAccessoriesModal,
-      SelectPrpductModal,
-      JUpload,
-      SelectProjectModal,
-      JDictSelectTag,
-      JSelectInput,
-      SelectSupplierInquiryModal,
-      ApiSelect,
-      JSelect,
-      SetSonList,
-      ViewHistoryQuotationModal,
-    },
-    props: {
-      formDisabled: {
-        type: Boolean,
-        default: false,
-      },
-      formData: { type: Object, default: () => {} },
-      formBpm: { type: Boolean, default: true },
-    },
-    emits: ['success'],
-    setup(props, { emit }) {
-		const { hasPermission } = usePermission();
-      const loading = ref(false);
-      const formRef = ref();
-      var showField = ref('currency_dictText+name');
-      var SetSonListRef = ref();
-      var SelectPrpductModalRef = ref();
-      var SelectProjectModalRef = ref();
-      var ViewHistoryQuotationModalRef = ref();
-      var SelectSupplierInquiryModalRef = ref();
-      const PuechaseQuotationFormShipTableRef = ref();
-      const PuechaseQuotationFormShipTable = reactive<Record<string, any>>({
-        loading: false,
-        columns: PuechaseQuotationFormShipColumns,
-        dataSource: [],
-      });
-      const PuechaseQuotationFormProductTableRef = ref();
-      const PuechaseQuotationFormProductTable = reactive<Record<string, any>>({
-        loading: false,
-        columns: PuechaseQuotationFormProductColumns,
-        dataSource: [],
-      });
-      var BaseShipArchiveAccessoriesListRef = ref();
-      const activeKey = ref('PuechaseQuotationFormProduct');
-      var notAllowEdit = ref(false);
-      const formData = reactive<Record<string, any>>({
-        id: '',
-        status: undefined,
-        delFlag: undefined,
-        otherStatus: '',
-        submit: '',
-        sourceCode: '',
-        billDate: moment(new Date()).format('YYYY-MM-DD'),
-        billCode: '',
-        projectName: '',
-        qutationProject: '',
-        suppilerName: '',
-        quotationSuppiler: '',
-        quotationDeadline: '',
-        priority: '',
-        productionClass: '',
-        model: '',
-        maker: '',
-        paymentTerms: '',
-        placeDelivery: '',
-        delivery: '',
-        deliveryDayHead: '',
-        quotationValidity: '',
-        quotationValidityDate: '',
-        currency: '',
-        quotationNotes: '',
-        technicalInformation: '',
-        saleAttachs: '',
-        paymentTermsInfo: '',
-        quotationInfomation: '',
-        qualityGradeHead: '',
-        agreementTerms: '',
-      });
+	import { defineComponent, ref, reactive, computed, toRaw } from 'vue';
+	import { defHttp } from '/@/utils/http/axios';
+	import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
+	import {
+		PuechaseQuotationFormShippTable,
+		queryPurcodeQuotationFormProductListByMainId,
+		queryDataById,
+		saveOrUpdate,
+		ClassList,
+		supplierOption,
+	} from '../PurchaseQuotationForm.api';
+	import { JVxeTable } from '/@/components/jeecg/JVxeTable';
+	import { PuechaseQuotationFormShipColumns, PuechaseQuotationFormProductColumns } from '../PurchaseQuotationForm.data';
+	import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
+	import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
+	import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
+	import SelectSupplierInquiryModal from './SelectSupplierInquiryModal.vue';
+	import ViewHistoryQuotationModal from './ViewHistoryQuotationModal.vue';
+	import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
+	import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
+	import { JDictSelectTag, ApiSelect, JSelect } from '/@/components/Form';
+	import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
+	import SetSonList from './SetSonList.vue';
+	import { Form, message } from 'ant-design-vue';
+	import moment from 'moment';
+	import { usePermission } from '/@/hooks/web/usePermission';
+
+	import { useMessage } from "/@/hooks/web/useMessage";
+
+	const { createConfirm } = useMessage();
+
+	const useForm = Form.useForm;
+	export default defineComponent({
+		name: 'PuechaseQuotationFormForm',
+		components: {
+			JVxeTable,
+			JFormContainer,
+			BaseShipArchiveAccessoriesModal,
+			SelectPrpductModal,
+			JUpload,
+			SelectProjectModal,
+			JDictSelectTag,
+			JSelectInput,
+			SelectSupplierInquiryModal,
+			ApiSelect,
+			JSelect,
+			SetSonList,
+			ViewHistoryQuotationModal,
+		},
+		props: {
+			formDisabled: {
+				type: Boolean,
+				default: false,
+			},
+			formData: { type: Object, default: () => { } },
+			formBpm: { type: Boolean, default: true },
+		},
+		emits: ['success'],
+		setup(props, { emit }) {
+			const { hasPermission } = usePermission();
+			const loading = ref(false);
+			const formRef = ref();
+			var showField = ref('currency_dictText+name');
+			var SetSonListRef = ref();
+			var SelectPrpductModalRef = ref();
+			var SelectProjectModalRef = ref();
+			var ViewHistoryQuotationModalRef = ref();
+			var SelectSupplierInquiryModalRef = ref();
+			const PuechaseQuotationFormShipTableRef = ref();
+			const PuechaseQuotationFormShipTable = reactive<Record<string, any>>({
+				loading: false,
+				columns: PuechaseQuotationFormShipColumns,
+				dataSource: [],
+			});
+			const PuechaseQuotationFormProductTableRef = ref();
+			const PuechaseQuotationFormProductTable = reactive<Record<string, any>>({
+				loading: false,
+				columns: PuechaseQuotationFormProductColumns,
+				dataSource: [],
+			});
+			var BaseShipArchiveAccessoriesListRef = ref();
+			const activeKey = ref('PuechaseQuotationFormProduct');
+			var notAllowEdit = ref(false);
+			const formData = reactive<Record<string, any>>({
+				id: '',
+				status: undefined,
+				delFlag: undefined,
+				otherStatus: '',
+				submit: '',
+				sourceCode: '',
+				billDate: moment(new Date()).format('YYYY-MM-DD'),
+				billCode: '',
+				projectName: '',
+				qutationProject: '',
+				suppilerName: '',
+				quotationSuppiler: '',
+				quotationDeadline: '',
+				priority: '',
+				productionClass: '',
+				model: '',
+				maker: '',
+				paymentTerms: '',
+				placeDelivery: '',
+				delivery: '',
+				deliveryDayHead: '',
+				quotationValidity: '',
+				quotationValidityDate: '',
+				currency: '',
+				quotationNotes: '',
+				technicalInformation: '',
+				saleAttachs: '',
+				paymentTermsInfo: '',
+				quotationInfomation: '',
+				qualityGradeHead: '',
+				agreementTerms: '',
+				quotationType: '',
+			});
+
+			//表单验证
+			const validatorRules = reactive({
+				projectName: [{ required: true, message: '请选择报价项目(select project)' }],
+				quotationSuppiler: [{ required: true, message: '请选择报价供应商(select supplier)' }],
+				currency: [{ required: true, message: '请选择币种(currency)' }],
+			});
+			const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
+			const dbData = {};
+			const formItemLayout = {
+				labelCol: { xs: { span: 24 }, sm: { span: 5 } },
+				wrapperCol: { xs: { span: 24 }, sm: { span: 16 } },
+			};
+
+			// 表单禁用
+			const disabled = computed(() => {
+				if (props.formBpm === true) {
+					if (props.formData.disabled === false) {
+						return false;
+					} else {
+						return true;
+					}
+				}
+				return props.formDisabled;
+			});
+
+			async function add() {
+				await resetFields();
+				PuechaseQuotationFormShipTable.dataSource = [];
+				PuechaseQuotationFormProductTable.dataSource = [];
+				activeKey.value = 'PuechaseQuotationFormProduct';
+				notAllowEdit.value = false;
+			}
+
+			async function edit(row) {
+				//主表数据
+				await queryMainData(row.id);
+				//子表数据
+				const PuechaseQuotationFormShipDataList = await PuechaseQuotationFormShippTable(row['id']);
+				PuechaseQuotationFormShipTable.dataSource = [...PuechaseQuotationFormShipDataList];
+				const PuechaseQuotationFormProductDataList = await queryPurcodeQuotationFormProductListByMainId(row['id']);
+				PuechaseQuotationFormProductTable.dataSource = [...PuechaseQuotationFormProductDataList];
+				notAllowEdit.value = true;
+			}
 
-      //表单验证
-      const validatorRules = reactive({
-        projectName: [{ required: true, message: '请选择报价项目(select project)' }],
-        quotationSuppiler: [{ required: true, message: '请选择报价供应商(select supplier)' }],
-        currency: [{ required: true, message: '请选择币种(currency)' }],
-      });
-      const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
-      const dbData = {};
-      const formItemLayout = {
-        labelCol: { xs: { span: 24 }, sm: { span: 5 } },
-        wrapperCol: { xs: { span: 24 }, sm: { span: 16 } },
-      };
+			async function queryMainData(id) {
+				const row = await queryDataById(id);
+				resetFields();
+				const tmpData = {};
+				Object.keys(formData).forEach((key) => {
+					if (row.hasOwnProperty(key)) {
+						tmpData[key] = row[key];
+					}
+				});
+				//赋值
+				Object.assign(formData, tmpData);
+			}
 
-      // 表单禁用
-      const disabled = computed(() => {
-        if (props.formBpm === true) {
-          if (props.formData.disabled === false) {
-            return false;
-          } else {
-            return true;
-          }
-        }
-        return props.formDisabled;
-      });
+			const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
+				purPurchaseQuotationShip: PuechaseQuotationFormShipTableRef,
+				purPurchaseQuotationProduct: PuechaseQuotationFormProductTableRef,
+			});
 
-      async function add() {
-        await resetFields();
-        PuechaseQuotationFormShipTable.dataSource = [];
-        PuechaseQuotationFormProductTable.dataSource = [];
-        activeKey.value = 'PuechaseQuotationFormProduct';
-        notAllowEdit.value = false;
-      }
+			async function getFormData() {
+				try {
+					// 触发表单验证
+					await validate();
+				} catch ({ errorFields }) {
+					if (errorFields) {
+						const firstField = errorFields[0];
+						if (firstField) {
+							formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
+						}
+					}
+					return Promise.reject(errorFields);
+				}
+				return transformData(toRaw(formData));
+			}
 
-      async function edit(row) {
-        //主表数据
-        await queryMainData(row.id);
-        //子表数据
-        const PuechaseQuotationFormShipDataList = await PuechaseQuotationFormShippTable(row['id']);
-        PuechaseQuotationFormShipTable.dataSource = [...PuechaseQuotationFormShipDataList];
-        const PuechaseQuotationFormProductDataList = await queryPurcodeQuotationFormProductListByMainId(row['id']);
-        PuechaseQuotationFormProductTable.dataSource = [...PuechaseQuotationFormProductDataList];
-        notAllowEdit.value = true;
-      }
+			async function submitForm() {
+				if (formData.sourceCode == '') {
+					message.warning('请选择供应商询价单');
+				} else {
+					const mainData = await getFormData();
+					PuechaseQuotationFormProductTableRef.value!.validateTable().then(async (errMap) => {
+						if (errMap) {
+							console.log('表单验证未通过:', { errMap });
+						} else {
+							const subData = await getSubFormAndTableData();
 
-      async function queryMainData(id) {
-        const row = await queryDataById(id);
-        resetFields();
-        const tmpData = {};
-        Object.keys(formData).forEach((key) => {
-          if (row.hasOwnProperty(key)) {
-            tmpData[key] = row[key];
-          }
-        });
-        //赋值
-        Object.assign(formData, tmpData);
-      }
+							let alertMsg = "";
 
-      const { getSubFormAndTableData, transformData } = useValidateAntFormAndTable(activeKey, {
-        purPurchaseQuotationShip: PuechaseQuotationFormShipTableRef,
-        purPurchaseQuotationProduct: PuechaseQuotationFormProductTableRef,
-      });
+							let total = subData.purPurchaseQuotationProductList.reduce((sum, item) => sum + item.taxPriceOriginal, 0);
+							if (total === 0) {
+								alertMsg = "拒绝报价,是否继续保存?";
+								formData.quotationType = '拒绝报价'
+							} else {
+								let hasZeroNum = subData.purPurchaseQuotationProductList.some(item => item.taxPriceOriginal === 0);
+								if (hasZeroNum == true) {
+									alertMsg = "异常报价,是否继续保存?";
+									formData.quotationType = '异常报价'
+								}
+							}
 
-      async function getFormData() {
-        try {
-          // 触发表单验证
-          await validate();
-        } catch ({ errorFields }) {
-          if (errorFields) {
-            const firstField = errorFields[0];
-            if (firstField) {
-              formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
-            }
-          }
-          return Promise.reject(errorFields);
-        }
-        return transformData(toRaw(formData));
-      }
+							if (alertMsg == "") {
 
-      async function submitForm() {
-        if (formData.sourceCode == '') {
-          message.warning('请选择供应商询价单');
-        } else {
-          const mainData = await getFormData();
-          PuechaseQuotationFormProductTableRef.value!.validateTable().then(async (errMap) => {
-            if (errMap) {
-              console.log('表单验证未通过:', { errMap });
-            } else {
-              const subData = await getSubFormAndTableData();
-              const values = Object.assign({}, dbData, mainData, subData);
-              console.log('表单提交数据', values);
-              const isUpdate = values.id ? true : false;
-              await saveOrUpdate(values, isUpdate);
-              //关闭弹窗
-              emit('success');
-            }
-          });
-        }
-      }
+								formData.quotationType = '正常报价'
+								const values = Object.assign({}, dbData, mainData, subData);
+								console.log('表单提交数据', values);
+								const isUpdate = values.id ? true : false;
+								await saveOrUpdate(values, isUpdate);
+								//关闭弹窗
+								emit('success');
 
+							} else {
 
-      //查看上次报价
-      function viewHistory(id) {
-        // console.log("sssssssssssssss"+formData.quotationCustomer);
-        console.log("sssssssssssssss"+id);
-        ViewHistoryQuotationModalRef.value.getTable(formData.quotationSuppiler,id);
-      }
-	  
-      function setFieldsValue(values) {
-        if (values) {
-          Object.keys(values).map((k) => {
-            formData[k] = values[k];
-          });
-        }
-      }
+								createConfirm({
+									iconType: 'warning',
+									title: alertMsg,
+									content: "注1:异常报价(含有0单价报价) <br/>  注2:拒绝报价(所有报价单价均为0)",
+									okText: '确认',
+									cancelText: '取消',
+									onOk: () => {
+										// 关闭弹窗
+										emit('success');
+										const values = Object.assign({}, dbData, mainData, subData);
+										console.log('表单提交数据', values);
+										const isUpdate = values.id ? true : false;
+										saveOrUpdate(values, isUpdate);
 
-      /**
-       * 值改变事件触发-树控件回调
-       * @param key
-       * @param value
-       */
-      function handleFormChange(key, value) {
-        formData[key] = value;
-      }
-      async function handleDelete(prop) {
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var newArray = [...xTable.data];
-        newArray.splice(prop.rowIndex, 1);
-        PuechaseQuotationFormShipTable.dataSource = newArray;
-      }
-      async function handleDelete1(prop) {
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var newArray = [...xTable.data];
-        newArray.splice(prop.rowIndex, 1);
-        PuechaseQuotationFormProductTable.dataSource = newArray;
-        if (PuechaseQuotationFormProductTable.dataSource.length !== 0) {
-          var arr = [];
-          PuechaseQuotationFormProductTable.dataSource.map((item) => {
-            if (item.sourceId) {
-              arr.push(item.sourceId);
-            }
-          });
-          if (arr.length == 0) {
-            formData.sourceCode = '';
-            notAllowEdit.value = false;
-          }
-        } else {
-          notAllowEdit.value = false;
-          formData.sourceCode = '';
-          add();
-        }
-      }
-      function addShip(data) {
-        var arr = data.concat(PuechaseQuotationFormShipTable.dataSource);
-        arr.map((item) => (item.shipowner = item.relateCustomer));
-        PuechaseQuotationFormShipTable.dataSource = arr;
-      }
-      function addProduct(data) {
-        data.map((item) => {
-          item.productClass = item.classId_dictText;
-          item.productCode = item.code;
-          item.unit = item.measurementUnit;
-          item.needShip = '0';
-          item.shipInspection = '';
-          item.productId = item.id;
-          item.id = undefined;
-          item.notes = '';
-        });
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var arrProduct = xTable.data.concat(data);
-        PuechaseQuotationFormProductTable.dataSource = arrProduct;
-      }
-      function addProject(data) {
-        if (data.length !== 0) {
-          formData.qutationProject = data[0].id;
-          formData.projectName = data[0].code;
-        } else {
-          formData.projectName = '';
-          formData.qutationProject = '';
-        }
-      }
-      function changeFormInquiryTeam() {
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var arrProduct = [...xTable.data];
-        arrProduct.map((item) => {
-          item.qualityGrade = formData.qualityGradeHead;
-        });
-        PuechaseQuotationFormProductTable.dataSource = arrProduct;
-      }
-      function changeFormDeliveryTime() {
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var arrProduct = [...xTable.data];
-        arrProduct.map((item) => {
-          item.deliveryDayChild = formData.deliveryDayHead;
-        });
-        PuechaseQuotationFormProductTable.dataSource = arrProduct;
-      }
-      function addProductFromCustomer(data) {
-        data.map((item) => {
-          item.productClass = item.productClass;
-          item.productCode = item.productCode;
-          item.unit = item.unit;
-          item.sourceId = item.childId;
-          item.model = item.childModel;
-          item.deliveryDayChild = formData.deliveryDayHead;
-        });
-        const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
-        var arrProduct = xTable.data.concat(data);
-        notAllowEdit.value = true;
-        PuechaseQuotationFormProductTable.dataSource = arrProduct;
-        formData.quotationProject = data[0].inquiryProject;
-        formData.delivery = data[0].delivery;
-        formData.paymentTerms = data[0].paymentTerms;
-        formData.projectName = data[0].projectName;
-        formData.quotationSuppiler = data[0].inquirySuppiler;
-        formData.suppilerName = data[0].suppilerName;
-        formData.sourceCode = data[0].billCode;
-        formData.priority = data[0].priority;
-        formData.model = data[0].headModel;
-        formData.maker = data[0].maker;
-        formData.placeDelivery = data[0].placeDelivery;
-        // formData.inquiryTeam =  data[0].inquiryTeam
-        formData.productionClass = data[0].productionClass;
-        formData.productionClass_dictText = data[0].productionClass_dictText;
-        formData.qualityGradeHead = data[0].qualityGradeHead;
-        // formData.saleAttachs =data[0].attachs
-        getShipList(data[0].headId);
-        if (formData.quotationSuppiler && formData.quotationSuppiler !== '') {
-          getSupplierCurreny(formData.quotationSuppiler);
-        }
-      }
-      async function getSupplierCurreny(id) {
-        var obj = await supplierOption({ id: id });
-        formData.currency = obj.records[0].currency;
-      }
-      function getShipList(id) {
-        let params = { id: id };
-        defHttp.get({ url: '/purCode/purInquiryForm/queryPurInquiryFormShipByMainId', params }, { isTransformResponse: false }).then((res) => {
-          if (res) {
-            PuechaseQuotationFormShipTable.dataSource = res.result;
-          }
-        });
-      }
-      function viewAccessory(prop) {
-        BaseShipArchiveAccessoriesListRef.value.getTable(prop.row);
-      }
-      function selectProducts() {
-        SelectPrpductModalRef.value.getTable();
-      }
-      function onSearchProject() {
-        SelectProjectModalRef.value.getTable();
-      }
-      function SelectSupplierInquiry() {
-        SelectSupplierInquiryModalRef.value.getTable(formData);
-      }
-      async function changeSupplier(prop) {
-        if (prop) {
-          var params = { id: prop };
-          var obj = await supplierOption(params);
-          formData.suppilerName = obj.records[0].name;
-          formData.paymentTerms = obj.records[0].paymentTerms;
-          getSupplierCurreny(prop);
-        } else {
-          formData.quotationSuppiler = '';
-          formData.suppilerName = '';
-        }
-      }
-      function changeValues(prop) {
-        if (prop.col.key == 'quantity' || prop.col.key == 'taxPriceOriginal') {
-          if (prop.row.quantity || prop.row.taxPriceOriginal) {
-            var num = Number(prop.row.quantity) * Number(prop.row.taxPriceOriginal);
-            prop.row.taxAmountOriginal = isNaN(num) ? '' : num.toFixed(2);
-            prop.row.discount = isNaN(prop.row.discount) ? 0 : Number(prop.row.discount);
-            prop.row.taxPrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
-            prop.row.taxAmount = (Number(prop.row.taxPrice) * Number(prop.row.quantity)).toFixed(2);
-          }
-        }
-        if (prop.col.key == 'discount') {
-          if (prop.row.discount || prop.row.taxPriceOriginal || prop.row.quantity) {
-            prop.row.taxPrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
-            prop.row.taxAmount = (Number(prop.row.taxPrice) * Number(prop.row.quantity)).toFixed(2);
-          }
-        }
-      }
-      function setDiscountForSonList() {
-        SetSonListRef.value.getTable();
-      }
-      function setSonListFiled(value) {
-        var xTable = PuechaseQuotationFormProductTableRef.value!.getXTable().data;
-        if (xTable.length > 0) {
-          xTable.map((item) => {
-            item.discount = isNaN(value.numericalValue) ? 0 : value.numericalValue;
-            if (item.taxAmountOriginal) {
-              item.taxPrice = (Number(item.taxPriceOriginal) * (1 - item.discount / 100)).toFixed(2);
-              item.taxAmount = (Number(item.taxPrice) * Number(item.quantity)).toFixed(2);
-            }
-          });
-        }
-        PuechaseQuotationFormProductTable.dataSource = [...xTable];
-      }
-      return {
-		  hasPermission,
-        PuechaseQuotationFormShipTableRef,
-        PuechaseQuotationFormShipTable,
-        PuechaseQuotationFormProductTableRef,
-        PuechaseQuotationFormProductTable,
-        validatorRules,
-        validateInfos,
-        activeKey,
-        loading,
-        formData,
-        setFieldsValue,
-        handleFormChange,
-        formItemLayout,
-        disabled,
-        getFormData,
-        submitForm,
-        add,
-        edit,
-        formRef,
-        addShip,
-        addProduct,
-        BaseShipArchiveAccessoriesListRef,
-        viewAccessory,
-        handleDelete,
-        handleDelete1,
-        selectProducts,
-        SelectPrpductModalRef,
-        SelectProjectModalRef,
-        SelectSupplierInquiryModalRef,
-        onSearchProject,
-        addProject,
-        supplierOption,
-        SelectSupplierInquiry,
-        addProductFromCustomer,
-        changeFormDeliveryTime,
-        changeFormInquiryTeam,
-        changeSupplier,
-        notAllowEdit,
-        ClassList,
-        showField,
-        changeValues,
-        setDiscountForSonList,
-        SetSonListRef,
-        setSonListFiled,
-        getSupplierCurreny,
-        ViewHistoryQuotationModalRef,
-        viewHistory,
-      };
-    },
-  });
+									}
+								});
+							}
+
+						}
+					});
+				}
+			}
+
+
+			//查看上次报价
+			function viewHistory(id) {
+				// console.log("sssssssssssssss"+formData.quotationCustomer);
+				console.log("sssssssssssssss" + id);
+				ViewHistoryQuotationModalRef.value.getTable(formData.quotationSuppiler, id);
+			}
+
+			function setFieldsValue(values) {
+				if (values) {
+					Object.keys(values).map((k) => {
+						formData[k] = values[k];
+					});
+				}
+			}
+
+			/**
+			 * 值改变事件触发-树控件回调
+			 * @param key
+			 * @param value
+			 */
+			function handleFormChange(key, value) {
+				formData[key] = value;
+			}
+			async function handleDelete(prop) {
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var newArray = [...xTable.data];
+				newArray.splice(prop.rowIndex, 1);
+				PuechaseQuotationFormShipTable.dataSource = newArray;
+			}
+			async function handleDelete1(prop) {
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var newArray = [...xTable.data];
+				newArray.splice(prop.rowIndex, 1);
+				PuechaseQuotationFormProductTable.dataSource = newArray;
+				if (PuechaseQuotationFormProductTable.dataSource.length !== 0) {
+					var arr = [];
+					PuechaseQuotationFormProductTable.dataSource.map((item) => {
+						if (item.sourceId) {
+							arr.push(item.sourceId);
+						}
+					});
+					if (arr.length == 0) {
+						formData.sourceCode = '';
+						notAllowEdit.value = false;
+					}
+				} else {
+					notAllowEdit.value = false;
+					formData.sourceCode = '';
+					add();
+				}
+			}
+			function addShip(data) {
+				var arr = data.concat(PuechaseQuotationFormShipTable.dataSource);
+				arr.map((item) => (item.shipowner = item.relateCustomer));
+				PuechaseQuotationFormShipTable.dataSource = arr;
+			}
+			function addProduct(data) {
+				data.map((item) => {
+					item.productClass = item.classId_dictText;
+					item.productCode = item.code;
+					item.unit = item.measurementUnit;
+					item.needShip = '0';
+					item.shipInspection = '';
+					item.productId = item.id;
+					item.id = undefined;
+					item.notes = '';
+				});
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var arrProduct = xTable.data.concat(data);
+				PuechaseQuotationFormProductTable.dataSource = arrProduct;
+			}
+			function addProject(data) {
+				if (data.length !== 0) {
+					formData.qutationProject = data[0].id;
+					formData.projectName = data[0].code;
+				} else {
+					formData.projectName = '';
+					formData.qutationProject = '';
+				}
+			}
+			function changeFormInquiryTeam() {
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var arrProduct = [...xTable.data];
+				arrProduct.map((item) => {
+					item.qualityGrade = formData.qualityGradeHead;
+				});
+				PuechaseQuotationFormProductTable.dataSource = arrProduct;
+			}
+			function changeFormDeliveryTime() {
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var arrProduct = [...xTable.data];
+				arrProduct.map((item) => {
+					item.deliveryDayChild = formData.deliveryDayHead;
+				});
+				PuechaseQuotationFormProductTable.dataSource = arrProduct;
+			}
+			function addProductFromCustomer(data) {
+				data.map((item) => {
+					item.productClass = item.productClass;
+					item.productCode = item.productCode;
+					item.unit = item.unit;
+					item.sourceId = item.childId;
+					item.model = item.childModel;
+					item.deliveryDayChild = formData.deliveryDayHead;
+				});
+				const xTable = PuechaseQuotationFormProductTableRef.value!.getXTable();
+				var arrProduct = xTable.data.concat(data);
+				notAllowEdit.value = true;
+				PuechaseQuotationFormProductTable.dataSource = arrProduct;
+				formData.quotationProject = data[0].inquiryProject;
+				formData.delivery = data[0].delivery;
+				formData.paymentTerms = data[0].paymentTerms;
+				formData.projectName = data[0].projectName;
+				formData.quotationSuppiler = data[0].inquirySuppiler;
+				formData.suppilerName = data[0].suppilerName;
+				formData.sourceCode = data[0].billCode;
+				formData.priority = data[0].priority;
+				formData.model = data[0].headModel;
+				formData.maker = data[0].maker;
+				formData.placeDelivery = data[0].placeDelivery;
+				// formData.inquiryTeam =  data[0].inquiryTeam
+				formData.productionClass = data[0].productionClass;
+				formData.productionClass_dictText = data[0].productionClass_dictText;
+				formData.qualityGradeHead = data[0].qualityGradeHead;
+				// formData.saleAttachs =data[0].attachs
+				getShipList(data[0].headId);
+				if (formData.quotationSuppiler && formData.quotationSuppiler !== '') {
+					getSupplierCurreny(formData.quotationSuppiler);
+				}
+			}
+			async function getSupplierCurreny(id) {
+				var obj = await supplierOption({ id: id });
+				formData.currency = obj.records[0].currency;
+			}
+			function getShipList(id) {
+				let params = { id: id };
+				defHttp.get({ url: '/purCode/purInquiryForm/queryPurInquiryFormShipByMainId', params }, { isTransformResponse: false }).then((res) => {
+					if (res) {
+						PuechaseQuotationFormShipTable.dataSource = res.result;
+					}
+				});
+			}
+			function viewAccessory(prop) {
+				BaseShipArchiveAccessoriesListRef.value.getTable(prop.row);
+			}
+			function selectProducts() {
+				SelectPrpductModalRef.value.getTable();
+			}
+			function onSearchProject() {
+				SelectProjectModalRef.value.getTable();
+			}
+			function SelectSupplierInquiry() {
+				SelectSupplierInquiryModalRef.value.getTable(formData);
+			}
+			async function changeSupplier(prop) {
+				if (prop) {
+					var params = { id: prop };
+					var obj = await supplierOption(params);
+					formData.suppilerName = obj.records[0].name;
+					formData.paymentTerms = obj.records[0].paymentTerms;
+					getSupplierCurreny(prop);
+				} else {
+					formData.quotationSuppiler = '';
+					formData.suppilerName = '';
+				}
+			}
+			function changeValues(prop) {
+				if (prop.col.key == 'quantity' || prop.col.key == 'taxPriceOriginal') {
+					if (prop.row.quantity || prop.row.taxPriceOriginal) {
+						var num = Number(prop.row.quantity) * Number(prop.row.taxPriceOriginal);
+						prop.row.taxAmountOriginal = isNaN(num) ? '' : num.toFixed(2);
+						prop.row.discount = isNaN(prop.row.discount) ? 0 : Number(prop.row.discount);
+						prop.row.taxPrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
+						prop.row.taxAmount = (Number(prop.row.taxPrice) * Number(prop.row.quantity)).toFixed(2);
+					}
+				}
+				if (prop.col.key == 'discount') {
+					if (prop.row.discount || prop.row.taxPriceOriginal || prop.row.quantity) {
+						prop.row.taxPrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
+						prop.row.taxAmount = (Number(prop.row.taxPrice) * Number(prop.row.quantity)).toFixed(2);
+					}
+				}
+			}
+			function setDiscountForSonList() {
+				SetSonListRef.value.getTable();
+			}
+			function setSonListFiled(value) {
+				var xTable = PuechaseQuotationFormProductTableRef.value!.getXTable().data;
+				if (xTable.length > 0) {
+					xTable.map((item) => {
+						item.discount = isNaN(value.numericalValue) ? 0 : value.numericalValue;
+						if (item.taxAmountOriginal) {
+							item.taxPrice = (Number(item.taxPriceOriginal) * (1 - item.discount / 100)).toFixed(2);
+							item.taxAmount = (Number(item.taxPrice) * Number(item.quantity)).toFixed(2);
+						}
+					});
+				}
+				PuechaseQuotationFormProductTable.dataSource = [...xTable];
+			}
+			return {
+				hasPermission,
+				PuechaseQuotationFormShipTableRef,
+				PuechaseQuotationFormShipTable,
+				PuechaseQuotationFormProductTableRef,
+				PuechaseQuotationFormProductTable,
+				validatorRules,
+				validateInfos,
+				activeKey,
+				loading,
+				formData,
+				setFieldsValue,
+				handleFormChange,
+				formItemLayout,
+				disabled,
+				getFormData,
+				submitForm,
+				add,
+				edit,
+				formRef,
+				addShip,
+				addProduct,
+				BaseShipArchiveAccessoriesListRef,
+				viewAccessory,
+				handleDelete,
+				handleDelete1,
+				selectProducts,
+				SelectPrpductModalRef,
+				SelectProjectModalRef,
+				SelectSupplierInquiryModalRef,
+				onSearchProject,
+				addProject,
+				supplierOption,
+				SelectSupplierInquiry,
+				addProductFromCustomer,
+				changeFormDeliveryTime,
+				changeFormInquiryTeam,
+				changeSupplier,
+				notAllowEdit,
+				ClassList,
+				showField,
+				changeValues,
+				setDiscountForSonList,
+				SetSonListRef,
+				setSonListFiled,
+				getSupplierCurreny,
+				ViewHistoryQuotationModalRef,
+				viewHistory,
+			};
+		},
+	});
 </script>
 <style lang="less" scoped>
-  /** 时间和数字输入框样式 */
-  :deep(.ant-input-number) {
-    width: 100%;
-  }
+	/** 时间和数字输入框样式 */
+	:deep(.ant-input-number) {
+		width: 100%;
+	}
+
+	:deep(.ant-calendar-picker) {
+		width: 100%;
+	}
+
+	/deep/.vxe-table--body-wrapper {
+		height: 100% !important;
+	}
+
+	/deep/.ant-modal-body {
+		padding: 24px !important;
+	}
 
-  :deep(.ant-calendar-picker) {
-    width: 100%;
-  }
-  /deep/.vxe-table--body-wrapper {
-    height: 100% !important;
-  }
-  /deep/.ant-modal-body {
-    padding: 24px !important;
-  }
+	/deep/.ant-form-item {
+		margin-bottom: 8px !important;
+	}
 
-  /deep/.ant-form-item {
-    margin-bottom: 8px !important;
-  }
-  /deep/.vxe-cell--valid-error-msg {
-    color: red !important;
-    background-color: white !important;
-  }
-</style>
+	/deep/.vxe-cell--valid-error-msg {
+		color: red !important;
+		background-color: white !important;
+	}
+</style>

+ 7 - 0
src/views/purchase/purchaseQuotationFrm/components/ViewHistoryQuotationModal.vue

@@ -44,6 +44,13 @@
           align:"center",
           width:150
       },
+      {
+          title: '供应商(supplier)',
+          dataIndex: 'suppilerName',
+          key: 'suppilerName',
+          align:"center",
+          width:150
+      },
       {
           title: '报价时间(quotation date)',
           dataIndex: 'billDate',

+ 5 - 0
src/views/purchase/selectionQuotationForm/SelectionQuotationForm.data.ts

@@ -86,6 +86,11 @@ export const columns: BasicColumn[] = [
 	 // width:150,
 	 slots: { customRender: 'viewFile' },
 	},
+    {
+      title: '报价情况(quotationType)',
+      align:"center",
+      dataIndex: 'quotationType',
+     },
    {
       title: '制单人',
       align:"center",

+ 107 - 26
src/views/purchase/selectionQuotationForm/components/SelectQuotationFormForm.vue

@@ -176,6 +176,10 @@
   import { JDictSelectTag,ApiSelect} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
   import { Form ,message} from 'ant-design-vue';
+import { useMessage } from "/@/hooks/web/useMessage";
+
+const { createConfirm } = useMessage();
+
   import moment from 'moment';
   const useForm = Form.useForm;
   export default defineComponent({
@@ -247,6 +251,7 @@
         attachs:'',
         sourceId:'',
         selectionSupplier:'',
+        quotationType:'',
         qualityGradeHead:''
       });
 
@@ -337,11 +342,53 @@
         }
         const mainData = await getFormData();
         const subData = await getSubFormAndTableData();
-        const values = Object.assign({}, dbData, mainData, subData);
-        const isUpdate = values.id ? true : false
-        await saveOrUpdate(values, isUpdate);
-        //关闭弹窗
-        emit('success');
+		
+		let alertMsg = "";
+		
+		let total = subData.purQuotationSelectionProductList.reduce((sum, item) => sum + item.taxPrice, 0);
+		if (total === 0) {
+			alertMsg = "拒绝报价,是否继续保存?";
+			formData.quotationType = '拒绝报价'
+		} else {
+			let hasZeroNum = subData.purQuotationSelectionProductList.some(item => item.taxPrice === 0);
+			if (hasZeroNum == true) {
+				alertMsg = "异常报价,是否继续保存?";
+				formData.quotationType = '异常报价'
+			}
+		}
+		if (alertMsg == "") {
+		
+			formData.quotationType = '正常报价'
+			const values = Object.assign({}, dbData, mainData, subData);
+			const isUpdate = values.id ? true : false
+			await saveOrUpdate(values, isUpdate);
+			//关闭弹窗
+			emit('success');
+		
+		} else{
+			
+			createConfirm({
+				iconType: 'warning',
+				title: alertMsg,
+				content: "注1:异常报价(含有0单价报价) <br/>  注2:拒绝报价(所有报价单价均为0)",
+				okText: '确认',
+				cancelText: '取消',
+				onOk: () => {
+					// 关闭弹窗
+					emit('success');
+					const values = Object.assign({}, dbData, mainData, subData);
+					const isUpdate = values.id ? true : false
+					saveOrUpdate(values, isUpdate);
+			
+				}
+			});
+		}
+		
+        // const values = Object.assign({}, dbData, mainData, subData);
+        // const isUpdate = values.id ? true : false
+        // await saveOrUpdate(values, isUpdate);
+        // //关闭弹窗
+        // emit('success');
       }
       
       function setFieldsValue(values) {
@@ -442,27 +489,61 @@
       }
       function selectSupplier(prop,rowIndex,props){
         var arrNumber = []
-        SupplierQuotationDetailsTable.dataSource.map(item=>{
-          if(item.productCode==prop.productCode&&item.quotationSuppiler==prop.selectionSupplier){
-            arrNumber.push(item.quotationSuppiler)
-            var arr = [...SelectQuotationFormProductTable.dataSource]
-            arr.map((event,index)=>{
-              if(rowIndex==index){
-                if(rowIndex==index){
-                  item.sourceCode=event.sourceCode
-                  item.sourceId=event.sourceId
-                  item.sourceId2=item.id
-                  item.sourceId3=item.childId
-                  item.paymentTerm = item.paymentTerms
-                  item.supplierList = event.supplierList
-                  arr[index]={...item}
-                  arr[index].selectionSupplier=item.quotationSuppiler
-                }
-              }              
-            })
-            SelectQuotationFormProductTable.dataSource = [...arr]
-          }
-        })
+		
+		for (const item of SupplierQuotationDetailsTable.dataSource) {
+		    if(item.sourceId2 == '' || item.sourceId2 == null){
+				item.sourceId2 = '无'
+			}
+		    if(item.productCode==prop.productCode&&item.quotationSuppiler==prop.selectionSupplier&&item.sourceId2==prop.sourceId4){
+		    			  
+		      arrNumber.push(item.quotationSuppiler)
+		      var arr = [...SelectQuotationFormProductTable.dataSource]
+		      arr.map((event,index)=>{
+		        if(rowIndex==index){
+		          if(rowIndex==index){
+		            item.sourceCode=event.sourceCode
+		            item.sourceId=event.sourceId
+		            item.sourceId2=item.id
+		            item.sourceId3=item.childId
+		            item.sourceId4=item.sourceId2
+		            item.paymentTerm = item.paymentTerms
+		            item.supplierList = event.supplierList
+		            arr[index]={...item}
+		            arr[index].selectionSupplier=item.quotationSuppiler
+		          }
+		        }              
+		      })
+		      SelectQuotationFormProductTable.dataSource = [...arr]
+			  
+			  // console.log('遇到价格为0的项目,停止处理');
+			  break;
+		    }
+		   
+		}
+		
+    //     SupplierQuotationDetailsTable.dataSource.map(item=>{
+    //       if(item.productCode==prop.productCode&&item.quotationSuppiler==prop.selectionSupplier&&item.sourceId2==prop.sourceId4){
+			  
+    //         arrNumber.push(item.quotationSuppiler)
+    //         var arr = [...SelectQuotationFormProductTable.dataSource]
+    //         arr.map((event,index)=>{
+    //           if(rowIndex==index){
+    //             if(rowIndex==index){
+    //               item.sourceCode=event.sourceCode
+    //               item.sourceId=event.sourceId
+    //               item.sourceId2=item.id
+    //               item.sourceId3=item.childId
+    //               item.paymentTerm = item.paymentTerms
+    //               item.supplierList = event.supplierList
+    //               arr[index]={...item}
+    //               arr[index].selectionSupplier=item.quotationSuppiler
+    //             }
+    //           }              
+    //         })
+    //         SelectQuotationFormProductTable.dataSource = [...arr]
+    //       }
+		  
+    //     })
         if(arrNumber.length==0){
           message.warn('此供应商没有报价')
           var arr1 = [...SelectQuotationFormProductTable.dataSource]

+ 6 - 0
src/views/saleCode/deliveryNotice/deliveryNoticeList.vue

@@ -91,6 +91,12 @@
                 <JInput placeholder="请输入来源(sourceCode)" v-model:value="queryParam.sourceCode" allow-clear AutoComplete="off" />
               </a-form-item>
             </a-col>
+            <a-col :lg="8">
+              <a-form-item name="orderNumber">
+                <template #label><span title="来源(orderNumber)">客户订单号(orderNumber)</span></template>
+                <a-input placeholder="请输入来源(orderNumber)" v-model:value="queryParam.orderNumber" allow-clear AutoComplete="off" />
+              </a-form-item>
+            </a-col>
             <a-col :lg="8">
               <a-form-item name="submit">
                 <template #label><span title="提交(submit)">提交(submit)</span></template>

+ 58 - 7
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -426,6 +426,8 @@
   const { domainUrl } = useGlobSetting();
   const userStore = useUserStore();
   const useForm = Form.useForm;
+import { useMessage } from "/@/hooks/web/useMessage";
+const { createConfirm } = useMessage();
   export default defineComponent({
     name: 'QuotationFormForm',
     components: {
@@ -520,6 +522,7 @@
         grossMarginHead: '',
         liaisonId: '',
         liaisonInfo: '',
+        quotationType: '',
       });
 
       //表单验证
@@ -749,13 +752,61 @@
             } else {
               const mainData = await getFormData();
               const subData = await getSubFormAndTableData();
-              const values = Object.assign({}, dbData, mainData, subData);
-              console.log('表单提交数据', values);
-              const isUpdate = values.id ? true : false;
-              const isRevise = values.status == '1' ? true : false;
-              await saveOrUpdate(values, isUpdate, isRevise);
-              //关闭弹窗
-              emit('success');
+			  
+			  let alertMsg = "";
+			  
+			  let total = subData.saleQuotationProductList.reduce((sum, item) => sum + item.purchasePrice, 0);
+			  if (total === 0) {
+			  	alertMsg = "拒绝报价,是否继续保存?";
+			  	formData.quotationType = '拒绝报价'
+			  } else {
+			  	let hasZeroNum = subData.saleQuotationProductList.some(item => item.purchasePrice === 0);
+			  	if (hasZeroNum == true) {
+			  		alertMsg = "异常报价,是否继续保存?";
+			  		formData.quotationType = '异常报价'
+			  	}
+			  }
+			  if (alertMsg == "") {
+			  
+			  	formData.quotationType = '正常报价'
+				
+			  	const values = Object.assign({}, dbData, mainData, subData);
+			  	console.log('表单提交数据', values);
+			  	const isUpdate = values.id ? true : false;
+			  	const isRevise = values.status == '1' ? true : false;
+			  	await saveOrUpdate(values, isUpdate, isRevise);
+			  	//关闭弹窗
+			  	emit('success');
+			  
+			  } else{
+			
+					createConfirm({
+						iconType: 'warning',
+						title: alertMsg,
+						content: "注1:异常报价(含有0单价报价) <br/>  注2:拒绝报价(所有报价单价均为0)",
+						okText: '确认',
+						cancelText: '取消',
+						onOk: () => {
+							
+							const values = Object.assign({}, dbData, mainData, subData);
+							console.log('表单提交数据', values);
+							const isUpdate = values.id ? true : false;
+							const isRevise = values.status == '1' ? true : false;
+							saveOrUpdate(values, isUpdate, isRevise);
+							//关闭弹窗
+							emit('success');
+					
+						}
+					});
+				}
+		
+              // const values = Object.assign({}, dbData, mainData, subData);
+              // console.log('表单提交数据', values);
+              // const isUpdate = values.id ? true : false;
+              // const isRevise = values.status == '1' ? true : false;
+              // await saveOrUpdate(values, isUpdate, isRevise);
+              // //关闭弹窗
+              // emit('success');
             }
           });
         }

+ 11 - 0
src/views/saleCode/quotation/quotation.vue

@@ -174,6 +174,7 @@
         >
         <a-button type="primary" @click="submit"> 提交(submit)</a-button>
         <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+        <a-button type="primary" @click="approval" v-auth="'saleCode:sale_quotation:approval'"> 审批(approval)</a-button>
         <a-dropdown v-if="selectedRowKeys.length > 0">
           <template #overlay>
             <a-menu>
@@ -236,6 +237,7 @@
     cancelBatchSubmit,
     ProjectOption,
     CustomerOption,
+    approvalBatch,
 	SaleManOption
   } from './quotationForm.api';
   import { cloneDeep } from 'lodash-es';
@@ -462,6 +464,15 @@
       batchSubmit({ ids: ids }, handleSuccess);
     }
   }
+  
+  function approval() {
+    if (selectedRowKeys.value.length == 0) {
+      message.warning('请选择数据');
+    } else {
+      var ids = selectedRowKeys.value.join(',');
+      approvalBatch({ ids: ids }, handleSuccess);
+    }
+  }
   function cancelSubmit() {
     if (selectedRowKeys.value.length == 0) {
       message.warning('请选择数据');

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

@@ -30,6 +30,7 @@ enum Api {
   linkOption = '/cuspCode/cuspCustomerProfile/queryCuspCustomerProfileManByMainId',
   queryByProject = '/saleCode/saleInquiryForm/queryByProject',
   salemanOption = 'sys/user/list',
+  approvalBatch='/saleCode/saleQuotation/approvalBatch',
 }
 /**
  * 导出api
@@ -80,6 +81,24 @@ export const deleteOne = (params,handleSuccess) => {
     handleSuccess();
   });
 }
+
+
+// 审批
+export const approvalBatch = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认审批',
+    content: '是否审批选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.approvalBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+
 /**
  * 批量删除
  * @param params

+ 8 - 0
src/views/saleCode/quotation/quotationForm.data.ts

@@ -148,6 +148,8 @@ export const columns: BasicColumn[] = [
         return '已提交'
       }else if(t.text==0){
         return '未提交'
+      }else if(t.text==2){
+        return '待审批'
       }
     }
    },
@@ -158,6 +160,12 @@ export const columns: BasicColumn[] = [
       width:200,
       slots: { customRender: 'supplierAttachs' },
     },
+    {
+      title: '报价情况(quotationType)',
+      align:"center",
+     width:120,
+      dataIndex: 'quotationType',
+     },
    {
     title: '版本号(version)',
     align:"center",

+ 2 - 0
src/views/saleCode/saleInquiryForm/components/SaleInquiryFormForm.vue

@@ -378,6 +378,8 @@
 				formData.salesmanName = userStore.getUserInfo.realname;
 				formData.saleDepartment = userStore.getUserInfo.orgCode;
 				formData.saleDepartmentName = userStore.getUserInfo.orgName;
+				formData.billDate = dayjs(new Date()).format('YYYY-MM-DD');
+				
 				//子表数据
 				const saleInquiryFormShipDataList = await querySaleInquiryFormShipListByMainId(id);
 				saleInquiryFormShipTable.dataSource = [...saleInquiryFormShipDataList];

+ 2 - 0
src/views/saleCode/salesInvoice/salesInvoiceForm.data.ts

@@ -226,6 +226,7 @@ export const saleInvoiceDetailColumns: JVxeColumn[] = [
     placeholder: '请输入${title}',
     width: '200px',
     defaultValue: '',
+      statistics:['sum'],
   },
   {
     title: '税额(tax amount)',
@@ -234,6 +235,7 @@ export const saleInvoiceDetailColumns: JVxeColumn[] = [
     placeholder: '请输入${title}',
     width: '200px',
     defaultValue: '',
+      statistics:['sum'],
   },
   {
     title: '备注(notes)',

+ 1 - 1
src/views/saleCode/salesOrder/SaleOrderForm.data.ts

@@ -79,7 +79,7 @@ export const columns: BasicColumn[] = [
    {
     title: '销售部门(sale department)',
     align:"center",
-    dataIndex: 'saleDepartment'
+    dataIndex: 'saleDepartmentName'
    },
    {
     title: '客户联系人(customer contact)',

+ 8 - 8
src/views/saleCode/salesOrder/SaleOrderFormList.vue

@@ -82,18 +82,12 @@
                 <JInput placeholder="请输入厂家(maker)" v-model:value="queryParam.maker" allow-clear ></JInput>
               </a-form-item>
             </a-col>
-            <a-col :lg="8">
+          <!--  <a-col :lg="8">
               <a-form-item name="shipName" >
                 <template #label><span title="船(shipName)">船(shipName)</span></template>
                 <JInput placeholder="请输入船(shipName)" v-model:value="queryParam.shipName" allow-clear ></JInput>
               </a-form-item>
-            </a-col>
-            <a-col :lg="8">
-              <a-form-item name="imo" >
-                <template #label><span title="船IMO(imo)">船IMO(imo)</span></template>
-                <JInput placeholder="请输入船IMO(imo)" v-model:value="queryParam.imo" allow-clear ></JInput>
-              </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :lg="8">
               <a-form-item name="sourceCode2" >
                 <template #label><span title="合同来源(sourceCode)">合同来源(sourceCode)</span></template>
@@ -171,6 +165,12 @@
               </a-form-item>
             </a-col>
             
+            <a-col :lg="8">
+              <a-form-item name="imo" >
+                <template #label><span title="船IMO(imo)">船IMO(imo)</span></template>
+                <JInput placeholder="请输入船IMO(imo)" v-model:value="queryParam.imo" allow-clear ></JInput>
+              </a-form-item>
+            </a-col>
             <a-col :lg="8">
               <a-form-item name="organize">
                 <template #label><span title="组织(organize)">组织(organize)</span></template>

+ 1 - 1
src/views/saleCode/salesOrder/components/AfterSlaeOrderFormForm.vue

@@ -660,7 +660,7 @@
 
       async function submitForm() {
         if (formData.sourceCode == '' && formData.sourceCode2 == '') {
-          message.warning('请选择合同或报价单');
+          message.warning('请选择产品信息');
         } else {
           SaleOrderFormShipFormProductTableRef.value!.validateTable().then(async (errMap) => {
             if (errMap) {

+ 5 - 2
src/views/saleCode/salesOrder/components/SetIsNotified.vue

@@ -14,7 +14,8 @@
                 <a-row :gutter="24">
                     <a-col :md="24" :sm="24">
                         <a-form-item label="Notified Date">
-                            <a-date-picker v-model:value="form.notified" value-format="YYYY-MM-DD" style="width: 100%;"/>
+                            <!-- <a-date-picker readonly v-model:value="form.notified" value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%;"/> -->
+                            <a-input readonly v-model:value="form.notified" style="width: 100%;"/>
                         </a-form-item>
                     </a-col>
                 </a-row>
@@ -29,10 +30,11 @@
     import { defHttp } from '/@/utils/http/axios';
     import { message } from 'ant-design-vue';
     import { JDictSelectTag} from '/@/components/Form';
+	import moment from 'moment';
     var visible = ref(false);
     const emit = defineEmits([ 'success']); //定义emit
     var form = ref({
-        notified :""
+        // notified : moment(new Date()).format('YYYY-MM-DD HH:mm:ss')+"(当前时间)",
     });
     const labelCol = ref({
         xs: { span: 24 },
@@ -67,6 +69,7 @@
     function getTable(ids){
         visible.value = true
         fatherIds.value = ids
+		form.value.notified = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')+"(当前时间)"
     }
     defineExpose({
         getTable