瀏覽代碼

代码完善

yuansh 1 月之前
父節點
當前提交
e7a6065ddb
共有 49 個文件被更改,包括 1364 次插入375 次删除
  1. 14 0
      src/views/baseCode/ProjectArchive/BaseProjectArchive.data.ts
  2. 5 0
      src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts
  3. 103 18
      src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue
  4. 1 0
      src/views/cuspCode/SupplierProfile/CuspSupplierProfile.data.ts
  5. 39 0
      src/views/inventiry/consignmentIn/StoreConsignmentIn.api.ts
  6. 79 99
      src/views/inventiry/consignmentIn/StoreConsignmentIn.data.ts
  7. 89 9
      src/views/inventiry/consignmentIn/StoreConsignmentInList.vue
  8. 154 38
      src/views/inventiry/consignmentIn/components/StoreConsignmentInForm.vue
  9. 33 0
      src/views/inventiry/consignmentOut/StoreConsignmentOut.api.ts
  10. 23 41
      src/views/inventiry/consignmentOut/StoreConsignmentOut.data.ts
  11. 56 26
      src/views/inventiry/consignmentOut/StoreConsignmentOutList.vue
  12. 114 21
      src/views/inventiry/consignmentOut/components/StoreConsignmentOutForm.vue
  13. 5 0
      src/views/inventiry/existingQuantity/existingQuantityForm.data.ts
  14. 12 1
      src/views/inventiry/existingQuantity/existingQuantityList.vue
  15. 22 21
      src/views/inventiry/otherIn/components/otherInForm.vue
  16. 4 1
      src/views/inventiry/otherOut/components/otherOutForm.vue
  17. 7 1
      src/views/inventiry/salesOutbound/components/SelectStaningStockModal.vue
  18. 23 2
      src/views/publicComponents/components/BaseProjectArchive.data.ts
  19. 33 0
      src/views/purchase/advanceCommission/PurAdvanceCommission.api.ts
  20. 9 9
      src/views/purchase/advanceCommission/PurAdvanceCommission.data.ts
  21. 22 2
      src/views/purchase/advanceCommission/PurAdvanceCommissionList.vue
  22. 24 8
      src/views/purchase/advanceCommission/components/PurAdvanceCommissionForm.vue
  23. 38 0
      src/views/purchase/advancePayment/PurAdvancePayment.api.ts
  24. 40 13
      src/views/purchase/advancePayment/PurAdvancePayment.data.ts
  25. 24 2
      src/views/purchase/advancePayment/PurAdvancePaymentList.vue
  26. 131 32
      src/views/purchase/advancePayment/components/PurAdvancePaymentForm.vue
  27. 8 1
      src/views/purchase/arrivedGoods/ArriveGoodsForm.data.ts
  28. 8 1
      src/views/purchase/purchaseInquiryForm/PurchaseInquiryForm.data.ts
  29. 1 1
      src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue
  30. 7 0
      src/views/purchase/purchaseOrder/PurchaseOrderForm.data.ts
  31. 10 8
      src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue
  32. 8 1
      src/views/purchase/purchaseOrderB2B/PurchaseOrderFormB2B.data.ts
  33. 8 1
      src/views/purchase/purchaseQuotationFrm/PurchaseQuotationForm.data.ts
  34. 4 1
      src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue
  35. 8 1
      src/views/purchase/selectionQuotationForm/SelectionQuotationForm.data.ts
  36. 8 1
      src/views/saleCode/advancePayment/advancePaymentForm.data.ts
  37. 5 0
      src/views/saleCode/deliveryNotice/components/deliveryNoticeForm.vue
  38. 8 1
      src/views/saleCode/deliveryNotice/delivertNoticeForm.data.ts
  39. 118 5
      src/views/saleCode/quotation/components/quotationFormForm.vue
  40. 9 1
      src/views/saleCode/quotation/quotationForm.data.ts
  41. 8 1
      src/views/saleCode/receiptOrder/receiptOrderForm.data.ts
  42. 7 0
      src/views/saleCode/saleContract/SaleContract.data.ts
  43. 8 1
      src/views/saleCode/saleInquiryForm/SaleInquiryForm.data.ts
  44. 1 1
      src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue
  45. 2 2
      src/views/saleCode/saleInterfaceSync/SaleInterfaceSync.data.ts
  46. 7 0
      src/views/saleCode/salesInvoice/salesInvoiceForm.data.ts
  47. 8 1
      src/views/saleCode/salesOrder/SaleOrderForm.data.ts
  48. 1 1
      src/views/saleCode/salesOrder/components/SlaeOrderFormForm.vue
  49. 8 1
      src/views/saleCode/salesOrderB2B/SaleOrderB2BForm.data.ts

+ 14 - 0
src/views/baseCode/ProjectArchive/BaseProjectArchive.data.ts

@@ -28,6 +28,11 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'notes',
   },
+  {
+    title: '状态(status)',
+    align: 'center',
+    dataIndex: 'status_dictText',
+  },
   {
     title: '停用原因(Deactivate reason)',
     align: 'center',
@@ -74,6 +79,15 @@ export const searchFormSchema: FormSchema[] = [
     },
     //colProps: {span: 6},
   },
+  {
+        label: "状态(status)",
+        field: 'status',
+        component: 'JSelectMultiple',
+        componentProps:{
+            dictCode: 'valid_status',
+         },
+        //colProps: {span: 6},
+   	},
   {
     label: '客户(customer)',
     field: 'customerId',

+ 5 - 0
src/views/cuspCode/SupplierEvaluation/CuspSupplierEvaluation.data.ts

@@ -27,6 +27,11 @@ export const columns: BasicColumn[] = [
     align: 'center',
     dataIndex: 'evaluationPeriod',
   },
+  {
+    title: '总计得分(totalScore)',
+    align: 'center',
+    dataIndex: 'totalScore',
+  },
   {
     title: '考评等级(evaluation level)',
     align: 'center',

+ 103 - 18
src/views/cuspCode/SupplierEvaluation/components/CuspSupplierEvaluationModal.vue

@@ -16,7 +16,6 @@
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="billDate" label="单据日期(billDate)">
               <a-date-picker
                 v-model:value="model.billDate"
-                show-time
                 valueFormat="YYYY-MM-DD"
                 format="YYYY-MM-DD"
                 style="width: 100%"
@@ -25,13 +24,13 @@
             </a-form-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="8">
-            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="evaluationPeriod" label="考评期(evaluation period)">
+            <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="evaluationPeriod" label="考评期(evaluation period)">
               <a-date-picker v-model:value="model.evaluationPeriod" valueFormat="YYYY" picker="year" style="width: 100%" :disabled="!showFooter" />
-            </a-form-item>
+			</a-form-item>
           </a-col>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="8">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="supplierId" label="供应商(supplier)">
-              <ApiSelect
+              <ApiSelect :disabled="!showFooter"
                 :api="supplierOption"
                 :showSearch="true"
                 v-model:value="model.supplierId"
@@ -48,9 +47,11 @@
               <JDictSelectTag v-model:value="model.evaluationLevel" placeholder="请选择" dictCode="grade" disabled />
             </a-form-item>
           </a-col>
-          <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="8">
+        </a-row>
+		  <a-row :gutter="24">
+          <a-col style="margin-left:-22.2%" :xl="64">
             <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="notes" label="备注(notes)">
-              <a-input placeholder="请输入" v-model:value="model.notes" AutoComplete="off" :disabled="!showFooter" />
+			  <a-textarea v-model:value="model.notes" placeholder="" allow-clear :disabled="!showFooter" AutoComplete="off" />
             </a-form-item>
           </a-col>
         </a-row>
@@ -59,6 +60,11 @@
     <!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated @change="handleChangeTabs" style="padding: 24px; padding-top: 0px">
       <a-tab-pane tab="供应商考评-得分" key="cuspSupplierEvaluationScore" :forceRender="true">
+		  
+		  <a-button type="primary" :disabled="!showFooter" style="margin-right: 1%; margin-bottom: 1%"  @click="updateData">
+		    更新分数(update data)</a-button
+		  >(注:选择供应商后,请点击此处‘更新分数(update data)’按钮自动获取数据)
+		  
         <a-table
           :columns="columns"
           :row-key="(record) => record.id"
@@ -69,6 +75,10 @@
           :pagination="false"
           :scroll="{ x: 1500 }"
         >
+          <template #automaticDataScore="{ text, record, index }">
+           <span v-if="record.item == '质量(quality)'">退货数量/入库数量(return/inventory):{{model.priceAuto}}/{{model.qualityAuto}}</span>
+           <span v-if="record.item == '交期(delivery time)'">延迟次数/发货次数(delay/deliver):{{model.deliveryTimeAuto}}/{{model.serviceAuto}}</span>
+          </template>
           <template #totalScore="{ text, record, index }">
             <a-input
               placeholder="请输入"
@@ -114,7 +124,10 @@
   import { ref, computed, unref, reactive } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { saveOrUpdate } from '../CuspSupplierEvaluation.api';
-  import { JDictSelectTag, ApiSelect } from '/@/components/Form';
+  import { JDictSelectTag, ApiSelect , JSelect } from '/@/components/Form';
+  import dayjs from 'dayjs';
+  import { Form, message } from 'ant-design-vue';
+  
   // Emits声明
   const emit = defineEmits(['register', 'success']);
   const isUpdate = ref(true);
@@ -132,8 +145,8 @@
   });
   var showFooter = ref(true);
   var model = ref({
-    billDate: '',
-    evaluationPeriod: '',
+    billDate: dayjs(new Date()).format('YYYY-MM-DD'),
+    evaluationPeriod: dayjs(new Date()).format('YYYY'),
     supplierId: '',
     billCode: '',
     evaluationLevel: '',
@@ -142,17 +155,22 @@
     qualityScore: '',
     deliveryTimeScore: '',
     serviceScore: '',
-    totalScore: '',
+    totalScore: '0',
+      priceAuto: '0',//退货数量
+      qualityAuto: '0',//入库数量
+      deliveryTimeAuto: '0',//延迟次数
+      serviceAuto: '0',//发货次数
   });
   const validatorRules = reactive({
     supplierId: [{ required: true, message: '请选择供应商!' }],
+    evaluationPeriod: [{ required: true, message: '请选择日期!' }],
   });
   var title = ref('');
   const tableRefs = { cuspSupplierEvaluationScore };
   var dataSource = ref([
-    { item: '价格(price)', weight: '3', automaticData: '', totalScore: '' },
-    { item: '质量(quality)', weight: '3', automaticData: '退货数量/入库数量(return/inventory):10/100', totalScore: '' },
-    { item: '交期(delivery time)', weight: '2', automaticData: '延迟次数/发货次数(delay/deliver):5/45', totalScore: '' },
+    { item: '价格(price)', weight: '3', automaticData:model.value.priceAuto, totalScore: '' },
+    { item: '质量(quality)', weight: '3', automaticData: '退货数量/入库数量(return/inventory):', totalScore: '' },
+    { item: '交期(delivery time)', weight: '2', automaticData: '延迟次数/发货次数(delay/deliver):', totalScore: '' },
     { item: '服务(service)', weight: '2', automaticData: '', totalScore: '' },
     { item: '合计(total)', weight: '10', automaticData: '', totalScore: '' },
   ]);
@@ -175,6 +193,7 @@
       dataIndex: 'automaticData',
       key: 'automaticData',
       align: 'center',
+	  slots: { customRender: 'automaticDataScore' },
     },
     {
       title: '总计得分(total score)',
@@ -187,18 +206,79 @@
   function handleChangeTabs(key: string) {
     activeKey.value = key;
   }
-  async function handleOk() {
+  async function handleOk() { 
+	  if(model.value.supplierId == '' || model.value.supplierId == null){
+		  
+		  message.error('请先选择供应商!');
+		  return;
+	  }
+	  if(model.value.supplierId == '' || model.value.evaluationPeriod == null){
+		  
+		    message.error('请先选择考评期!');
+		  return;
+	  }
+	  
+	  var total = model.value.totalScore;
+	  if (total >= 8) {
+	    model.value.evaluationLevel = '优';
+	  } else if (total >= 7 && total < 8) {
+	    model.value.evaluationLevel = '良';
+	  } else if (total >= 6 && total < 7) {
+	    model.value.evaluationLevel = '中';
+	  } else if (total < 6) {
+	    model.value.evaluationLevel = '差';
+	  } else {
+	    model.value.evaluationLevel = '差';
+	  }
+	  
+	  
     await saveOrUpdate(model.value, isUpdate.value);
     //关闭弹窗
     handleCancel();
     //刷新列表
     emit('success');
   }
+  
+  function updateData(){
+	  
+	  if(model.value.supplierId == '' || model.value.supplierId == null){
+		  
+		  message.error('请先选择供应商!');
+		  return;
+	  }
+	  if(model.value.evaluationPeriod == '' || model.value.evaluationPeriod == null){
+		  
+		    message.error('请先选择考评期!');
+		  return;
+	  }
+	// 南京恒德船舶配件有限公司
+		let params = { supplierId:model.value.supplierId,evaluationPeriod: model.value.evaluationPeriod};
+		let url = '/cuspCode/cuspSupplierEvaluation/updateData';
+	 
+		 defHttp.get({ url: url, params }, { isTransformResponse: false }).then((res) => {
+						   console.log(res.result)
+			if (res.success) {
+				
+				message.info("更新成功");
+				model.value.priceAuto = res.result.outNum;//退货数量
+				model.value.qualityAuto = res.result.inNum;//入库数量
+				model.value.deliveryTimeAuto = res.result.delay;//延迟次数
+				model.value.serviceAuto = res.result.deliver;//发货次数
+				
+			}else{
+				
+				message.error(res.message);
+			}
+						
+		});
+	
+  }
+  
   function handleCancel() {
     visible.value = false;
     model.value = {
-      billDate: '',
-      evaluationPeriod: '',
+		billDate: dayjs(new Date()).format('YYYY-MM-DD'),
+		evaluationPeriod: dayjs(new Date()).format('YYYY'),
       supplierId: '',
       billCode: '',
       evaluationLevel: '',
@@ -207,7 +287,11 @@
       qualityScore: '',
       deliveryTimeScore: '',
       serviceScore: '',
-      totalScore: '',
+      totalScore: '0',
+      priceAuto: '0',
+      qualityAuto: '0',
+      deliveryTimeAuto: '0',
+      serviceAuto: '0',
     };
   }
   function getAdd() {
@@ -241,7 +325,7 @@
     } else if (total < 6) {
       model.value.evaluationLevel = '差';
     } else {
-      model.value.evaluationLevel = '';
+      model.value.evaluationLevel = '';
     }
   }
   function getDetail(record) {
@@ -263,6 +347,7 @@
     getAdd,
     getEdit,
     getDetail,
+    updateData,
   });
 </script>
 

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

@@ -401,6 +401,7 @@ export const formSchema: FormSchema[] = [
     component: 'JDictSelectTag',
     componentProps: {
       dictCode: 'country',
+	  showSearch: true,
     },
   },
   {

+ 39 - 0
src/views/inventiry/consignmentIn/StoreConsignmentIn.api.ts

@@ -14,6 +14,10 @@ enum Api {
   queryDataById = '/storeCode/storeConsignmentIn/queryById',
   storeConsignmentInDetailsList = '/storeCode/storeConsignmentIn/queryStoreConsignmentInDetailsByMainId',
   storeConsignmentInShipList = '/storeCode/storeConsignmentIn/queryStoreConsignmentInShipByMainId',
+  cuspCustomerList = '/cuspCode/cuspCustomerProfile/list?pageSize=-1&status=1',
+  submitBatch='/storeCode/storeConsignmentIn/submitBatch',
+  cancelSubmitBatch='/storeCode/storeConsignmentIn/returnSubmitBatch',
+  
 }
 /**
  * 导出api
@@ -26,6 +30,10 @@ export const getExportUrl = Api.exportXls;
  */
 export const getImportUrl = Api.importExcel;
 
+/**
+ * 客户列表
+ */
+export const cuspCustomerList = (params) => defHttp.get({ url: Api.cuspCustomerList, params });
 /**
  * 查询子表数据
  * @param params
@@ -85,3 +93,34 @@ export const saveOrUpdate = (params, isUpdate) => {
 */
 export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
 
+
+// 提交
+export const batchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认提交',
+    content: '是否提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+// 取消提交
+export const cancelBatchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认取消提交',
+    content: '是否取消提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}

+ 79 - 99
src/views/inventiry/consignmentIn/StoreConsignmentIn.data.ts

@@ -7,12 +7,12 @@ import { getWeekMonthQuarterYear } from '/@/utils';
 //列表数据
 export const columns: BasicColumn[] = [
    {
-    title: '提交(submit)1是0否',
+    title: '提交(submit)',
     align:"center",
     dataIndex: 'submit_dictText'
    },
    {
-    title: '单据日期',
+    title: '单据日期(billDate)',
     align:"center",
     dataIndex: 'billDate',
     customRender:({text}) =>{
@@ -21,27 +21,18 @@ export const columns: BasicColumn[] = [
     },
    },
    {
-    title: '单据编码',
+    title: '单据编码(billCode)',
     align:"center",
     dataIndex: 'billCode'
    },
+   // {
+   //  title: '项目名称(project)',
+   //  align:"center",
+   //  dataIndex: 'projectName'
+   // },
+  
    {
-    title: '项目(project)',
-    align:"center",
-    dataIndex: 'project'
-   },
-   {
-    title: '项目名称',
-    align:"center",
-    dataIndex: 'projectName'
-   },
-   {
-    title: '客户',
-    align:"center",
-    dataIndex: 'customer'
-   },
-   {
-    title: '客户名称',
+    title: '客户名称(customer)',
     align:"center",
     dataIndex: 'customerName'
    },
@@ -60,43 +51,23 @@ export const columns: BasicColumn[] = [
     align:"center",
     dataIndex: 'notes'
    },
-   {
-    title: '附件(attachs)',
-    align:"center",
-    dataIndex: 'attachs'
-   },
 ];
 
 //子表表格配置
 export const storeConsignmentInDetailsColumns: JVxeColumn[] = [
-    {
-      title: '产品id',
-      key: 'productId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '产品分类',
-      key: 'productClass',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
+   
     {
       title: '产品编码',
       key: 'productCode',
-      type: JVxeTypes.input,
-      width:"200px",
+      type: JVxeTypes.normal,
+      width:"120px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
       title: '产品中文名',
       key: 'chineseName',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -104,31 +75,16 @@ export const storeConsignmentInDetailsColumns: JVxeColumn[] = [
     {
       title: '产品英文名',
       key: 'englishName',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '型号',
-      key: 'model',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
+    
     {
       title: '备件号',
       key: 'partno',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '图号',
-      key: 'drawingno',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -136,8 +92,10 @@ export const storeConsignmentInDetailsColumns: JVxeColumn[] = [
     {
       title: '质量等级',
       key: 'qualityGrade',
-      type: JVxeTypes.input,
+      type: JVxeTypes.selectSearch,
       width:"200px",
+	  options: [],
+	  dictCode: 'quality_grade',
       placeholder: '请输入${title}',
       defaultValue:'',
     },
@@ -145,72 +103,82 @@ export const storeConsignmentInDetailsColumns: JVxeColumn[] = [
       title: '件数',
       key: 'quantity',
       type: JVxeTypes.inputNumber,
-      width:"200px",
+      width:"120px",
+	  validateRules: [{ required: true, message: '件数必填' }],
       placeholder: '请输入${title}',
       defaultValue:'',
     },
+	{
+      title: '供应商(supplier)',
+      key: 'supplier',
+      type: JVxeTypes.selectSearch,
+      width:"300px",
+	  dictCode: 'cusp_supplier_profile,name,id,del_flag=0',  // 表名,显示字段,存储字段
+	  validateRules: [{ required: true, message: '供应商必选' }],
+      placeholder: '请输入${title}',
+      defaultValue:'',
+    },
+    
     {
       title: '重量',
       key: 'weight',
       type: JVxeTypes.input,
-      width:"200px",
+      width:"120px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
-      title: '备注(notes)',
-      key: 'notes',
-      type: JVxeTypes.input,
-      width:"200px",
+      title: '图号',
+      key: 'drawingno',
+      type: JVxeTypes.normal,
+      width:"120px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
-    {
-      title: '供应商(supplier)',
-      key: 'supplier',
-      type: JVxeTypes.input,
+	{
+      title: '型号',
+      key: 'model',
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
-      title: '供应商名称',
-      key: 'supplierName',
+      title: '备注(notes)',
+      key: 'notes',
       type: JVxeTypes.input,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
     },
-    {
-      title: '附件',
-      key: 'attachs',
-      type: JVxeTypes.input,
+    // {
+    //   title: '附件',
+    //   key: 'attachs',
+    //   type: JVxeTypes.input,
+    //   width:"200px",
+    //   placeholder: '请输入${title}',
+    //   defaultValue:'',
+    // },
+	{
+      title: '操作(operation)',
+      key: 'action',
       width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
   ]
 export const storeConsignmentInShipColumns: JVxeColumn[] = [
-    {
-      title: '表头主键(寄存代发入库)',
-      key: 'headId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '船id',
-      key: 'shipId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
+    
     {
       title: '船名',
       key: 'shipName',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -234,7 +202,7 @@ export const storeConsignmentInShipColumns: JVxeColumn[] = [
     {
       title: '船厂',
       key: 'shipFactory',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -242,10 +210,22 @@ export const storeConsignmentInShipColumns: JVxeColumn[] = [
     {
       title: '船东',
       key: 'shipowner',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
+    }, {
+      title: '操作(operation)',
+      key: 'action',
+      width:"400px",
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
   ]
 

+ 89 - 9
src/views/inventiry/consignmentIn/StoreConsignmentInList.vue

@@ -2,10 +2,66 @@
   <div class="p-2">
     <!--查询区域-->
     <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-row>
-      </a-form>
+     <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="billCode">
+		       <template #label><span title="单据编码">单据编码</span></template>
+		       <JInput v-model:value="queryParam.billCode" class="query-group-cust"></JInput>
+		     </a-form-item>
+		   </a-col>
+		   
+		   <a-col :lg="6">
+		     <a-form-item name="customerName">
+		       <template #label><span title="客户名称">客户名称</span></template>
+		       <JInput v-model:value="queryParam.customerName" class="query-group-cust"></JInput>
+		     </a-form-item>
+		   </a-col>
+         <a-col :lg="6">
+           <a-form-item name="submit">
+             <template #label><span title="提交(submit)">提交</span></template>
+             <JDictSelectTag placeholder="请选择提交(submit)" v-model:value="queryParam.submit" dictCode="yes_or_no" allow-clear />
+           </a-form-item>
+         </a-col>
+         
+         <template v-if="toggleSearchStatus">
+          
+          <a-col :lg="6">
+            <a-form-item name="billDate">
+              <template #label><span title="单据日期">单据日期</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="6">
+             <a-form-item name="warehouse">
+               <template #label><span title="仓库(warehouse)">仓库</span></template>
+			   <JDictSelectTag placeholder="请选择仓库(warehouse)" v-model:value="queryParam.warehouse" dictCode="warehouse" allow-clear />
+               <!-- <a-input placeholder="请输入仓库(warehouse)" v-model:value="queryParam.warehouse" allow-clear ></a-input> -->
+             </a-form-item>
+           </a-col>
+           <a-col :lg="6">
+             <a-form-item name="goodsAllocation">
+               <template #label><span title="货位(goods allocation)">货位</span></template>
+			   <JDictSelectTag placeholder="请选择货位(goods allocation)" v-model:value="queryParam.goodsAllocation" dictCode="goods_allocation" allow-clear />
+
+               <!-- <a-input placeholder="请输入货位(goods allocation)" v-model:value="queryParam.goodsAllocation" 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">
+             <a-col :lg="6">
+               <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
+               <a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
+               <a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
+                 {{ toggleSearchStatus ? '收起' : '展开' }}
+                 <Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
+               </a>
+             </a-col>
+           </span>
+         </a-col>
+       </a-row>
+     </a-form>
     </div>
     <!--引用表格-->
    <BasicTable @register="registerTable" :rowSelection="rowSelection">
@@ -13,8 +69,10 @@
       <template #tableTitle>
           <a-button type="primary" v-auth="'storeCode:store_consignment_in:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
           <a-button  type="primary" v-auth="'storeCode:store_consignment_in:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-          <j-upload-button  type="primary" v-auth="'storeCode:store_consignment_in:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
-          <a-dropdown v-if="selectedRowKeys.length > 0">
+        <a-button type="primary" @click="submit"> 提交(submit)</a-button>
+        <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+		  <!-- <j-upload-button  type="primary" v-auth="'storeCode:store_consignment_in:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>-->
+				   <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
                   <a-menu-item key="1" @click="batchHandleDelete">
@@ -28,7 +86,7 @@
               </a-button>
         </a-dropdown>
         <!-- 高级查询 -->
-        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+        <!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" /> -->
       </template>
        <!--操作栏-->
       <template #action="{ record }">
@@ -50,9 +108,14 @@
   import {useModal} from '/@/components/Modal';
   import StoreConsignmentInModal from './components/StoreConsignmentInModal.vue'
   import {columns, superQuerySchema} from './StoreConsignmentIn.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './StoreConsignmentIn.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,
+    batchSubmit,
+    cancelBatchSubmit,} from './StoreConsignmentIn.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { useUserStore } from '/@/store/modules/user';
+  import { message } from 'ant-design-vue';
+  import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
+  import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
   const formRef = ref();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
@@ -156,6 +219,7 @@
          {
            label: '编辑',
            onClick: handleEdit.bind(null, record),
+		   ifShow: record.submit == '0',
            auth: 'storeCode:store_consignment_in:edit'
          }
        ]
@@ -170,6 +234,7 @@
            onClick: handleDetail.bind(null, record),
          }, {
            label: '删除',
+		   ifShow: record.submit == '0',
            popConfirm: {
              title: '是否确认删除',
              confirm: handleDelete.bind(null, record),
@@ -179,8 +244,23 @@
          }
        ]
    }
-
   
+  function submit() {
+    if (selectedRowKeys.value.length == 0) {
+      message.warning('请选择数据');
+    } else {
+      var ids = selectedRowKeys.value.join(',');
+      batchSubmit({ ids: ids }, handleSuccess);
+    }
+  }
+  function cancelSubmit() {
+    if (selectedRowKeys.value.length == 0) {
+      message.warning('请选择数据');
+    } else {
+      var ids = selectedRowKeys.value.join(',');
+      cancelBatchSubmit({ ids: ids }, handleSuccess);
+    }
+  }
 
   /* ----------------------以下为原生查询需要添加的-------------------------- */
   const toggleSearchStatus = ref<boolean>(false);

+ 154 - 38
src/views/inventiry/consignmentIn/components/StoreConsignmentInForm.vue

@@ -5,44 +5,57 @@
         <a-form v-bind="formItemLayout" name="StoreConsignmentInForm" ref="formRef">
           <a-row>
 						
-						<a-col :span="12">
-							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="StoreConsignmentInForm-billDate" name="billDate">
-								<a-date-picker placeholder="请选择单据日期"  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="单据编码" v-bind="validateInfos.billCode" id="StoreConsignmentInForm-billCode" name="billCode">
-								<a-input v-model:value="formData.billCode" placeholder="请输入单据编码" disabled allow-clear ></a-input>
+								<a-input v-model:value="formData.billCode" placeholder="自动生成" disabled allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="项目(project)" v-bind="validateInfos.project" id="StoreConsignmentInForm-project" name="project">
-								<a-input v-model:value="formData.project" placeholder="请输入项目(project)"  allow-clear ></a-input>
-							</a-form-item>
-						</a-col>
-						<a-col :span="12">
-							<a-form-item label="项目名称" v-bind="validateInfos.projectName" id="StoreConsignmentInForm-projectName" name="projectName">
-								<a-input v-model:value="formData.projectName" placeholder="请输入项目名称"  allow-clear ></a-input>
+							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="StoreConsignmentInForm-billDate" name="billDate">
+								<a-date-picker placeholder="请选择单据日期"  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="客户" v-bind="validateInfos.customer" id="StoreConsignmentInForm-customer" name="customer">
-								<a-input v-model:value="formData.customer" placeholder="请输入客户"  allow-clear ></a-input>
+							<a-form-item label="客户简称" v-bind="validateInfos.customer" id="StoreConsignmentInForm-customerName" name="customerName">
+								<ApiSelect
+								    :api="cuspCustomerList"
+								    showSearch
+								    v-model:value="formData.customer"
+								    :filterOption="true"
+								    resultField="records"
+								    labelField="abbreviation"
+								    valueField="id"
+								    optionFilterProp="label"
+								/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="客户名称" v-bind="validateInfos.customerName" id="StoreConsignmentInForm-customerName" name="customerName">
-								<a-input v-model:value="formData.customerName" placeholder="请输入客户名称"  allow-clear ></a-input>
+							<a-form-item label="客户全称" v-bind="validateInfos.customer" id="StoreConsignmentInForm-customer" name="customer">
+								<!-- <a-input v-model:value="formData.customer" placeholder="请输入客户"  allow-clear ></a-input> -->
+								<ApiSelect
+								    :api="cuspCustomerList"
+								    showSearch
+								    v-model:value="formData.customer"
+								    :filterOption="true"
+								    resultField="records"
+								    labelField="name"
+								    valueField="id"
+								    optionFilterProp="label"
+								/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="仓库(warehouse)" v-bind="validateInfos.warehouse" id="StoreConsignmentInForm-warehouse" name="warehouse">
-								<a-input v-model:value="formData.warehouse" placeholder="请输入仓库(warehouse)"  allow-clear ></a-input>
+								<!-- <a-input v-model:value="formData.warehouse" placeholder="请输入仓库(warehouse)"  allow-clear ></a-input> -->
+								 <JDictSelectTag v-model:value="formData.warehouse" placeholder="请选择" dictCode="warehouse" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="货位(goods allocation)" v-bind="validateInfos.goodsAllocation" id="StoreConsignmentInForm-goodsAllocation" name="goodsAllocation">
-								<a-input v-model:value="formData.goodsAllocation" placeholder="请输入货位(goods allocation)"  allow-clear ></a-input>
+								<!-- <a-input v-model:value="formData.goodsAllocation" placeholder="请输入货位(goods allocation)"  allow-clear ></a-input> -->
+								<JDictSelectTag v-model:value="formData.goodsAllocation" placeholder="请选择" dictCode="goods_allocation" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -52,7 +65,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="StoreConsignmentInForm-attachs" name="attachs">
-								<a-input v-model:value="formData.attachs" placeholder="请输入附件(attachs)"  allow-clear ></a-input>
+								 <JUpload v-model:value="formData.attachs" />
 							</a-form-item>
 						</a-col>
           </a-row>
@@ -63,6 +76,11 @@
 		<!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated>
       <a-tab-pane tab="寄存代发入库-子表产品明细" key="storeConsignmentInDetails" :forceRender="true">
+		  
+		  <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectProductList" :disabled="disabled">
+		    选择产品(select product)</a-button
+		  >
+		  
         <j-vxe-table
           :keep-source="true"
           resizable
@@ -73,10 +91,17 @@
           :height="340"
           :disabled="disabled"
           :rowNumber="true"
-          :rowSelection="true"
-          :toolbar="true"/>
+          :rowSelection="false"
+          >
+			<template #action="props">
+		      <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)" v-if="!disabled">
+		        <a>删除(delete)</a>
+		      </a-popconfirm>
+		    </template>
+		</j-vxe-table>
       </a-tab-pane>
       <a-tab-pane tab="寄存代发入库-子表船明细" key="storeConsignmentInShip" :forceRender="true">
+		  <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectShip" :disabled="disabled"> 选择船(select ship)</a-button>
         <j-vxe-table
           :keep-source="true"
           resizable
@@ -88,9 +113,17 @@
           :disabled="disabled"
           :rowNumber="true"
           :rowSelection="true"
-          :toolbar="true"/>
+         >
+           <template #action="props">
+             <a @click="viewAccessory(props)">查看配件信息(view accessory information)</a>
+           </template>
+         </j-vxe-table>
       </a-tab-pane>
     </a-tabs>
+	
+	<BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesModalRef" />
+	<SelectPrpductModal ref="SelectPrpductModalRef" @select-product="addProduct" />
+	<SelectShipSModal ref="SelectShipSModalRef" @select="addShip" />
   </a-spin>
 </template>
 
@@ -98,12 +131,21 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryStoreConsignmentInDetailsListByMainId, queryStoreConsignmentInShipListByMainId, queryDataById, saveOrUpdate } from '../StoreConsignmentIn.api';
+  import { queryStoreConsignmentInDetailsListByMainId, queryStoreConsignmentInShipListByMainId, queryDataById, saveOrUpdate,cuspCustomerList } from '../StoreConsignmentIn.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {storeConsignmentInDetailsColumns, storeConsignmentInShipColumns} from '../StoreConsignmentIn.data';
   import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
-  import { Form } from 'ant-design-vue';
+  import { ApiSelect} from '/@/components/Form';
+  import { Form, message } from 'ant-design-vue';
+  import dayjs from 'dayjs';
+  import { initDictOptions } from '/@/utils/dict';
+  
+  import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
+  import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
+  import SelectShipSModal from '../../../publicComponents/SelectShipSModal.vue';
+  
+  import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
   const useForm = Form.useForm;
 
   export default defineComponent({
@@ -111,7 +153,12 @@
     components:{
       JDictSelectTag,
       JVxeTable,
-			JFormContainer,
+	  JFormContainer,
+      ApiSelect,
+      BaseShipArchiveAccessoriesModal,
+      SelectPrpductModal,
+      SelectShipSModal,
+      JUpload,
     },
     props:{
       formDisabled:{
@@ -125,6 +172,12 @@
     setup(props, {emit}) {
       const loading = ref(false);
       const formRef = ref();
+	  
+	  
+	  const SelectPrpductModalRef = ref();
+	  const SelectShipSModalRef = ref();
+	  const BaseShipArchiveAccessoriesModalRef = ref();
+	  
       const storeConsignmentInDetailsTableRef = ref();
       const storeConsignmentInDetailsTable = reactive<Record<string, any>>({
         loading: false,
@@ -140,11 +193,8 @@
       const activeKey = ref('storeConsignmentInDetails');
       const formData = reactive<Record<string, any>>({
         id: '',
-        submit: '',   
-        billDate: '',   
+        billDate: dayjs(new Date()).format('YYYY-MM-DD'),
         billCode: '',   
-        project: '',   
-        projectName: '',   
         customer: '',   
         customerName: '',   
         warehouse: '',   
@@ -155,6 +205,10 @@
 
       //表单验证
       const validatorRules = reactive({
+		  billDate: [{ required: true, message: '请选择日期(select billDate)' }],
+          customer: [{ required: true, message: '请选择客户(select customer)' }],
+          warehouse: [{ required: true, message: '请选择仓库(select warehouse)' }],
+          goodsAllocation: [{ required: true, message: '请选择货位(select goodsAllocation)' }],
       });
       const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
       const dbData = {};
@@ -181,7 +235,51 @@
         resetFields();
         storeConsignmentInDetailsTable.dataSource = [];
         storeConsignmentInShipTable.dataSource = [];
+		
+      }
+
+
+      function addProduct(data) {
+        data.map((item) => {
+          item.productClass = item.classId_dictText;
+          item.productCode = item.code;
+          item.productId = item.id;
+          item.id = undefined;
+        });
+        var xTable = storeConsignmentInDetailsTableRef.value!.getXTable();
+        var arrProduct = xTable.data.concat(data);
+        storeConsignmentInDetailsTable.dataSource = arrProduct;
+      }
+      function selectProductList() {
+        SelectPrpductModalRef.value.getTable();
+      }
+	  
+	  //入库明细-删除行
+	  function handleDelete(prop) {
+	    var xTable = storeConsignmentInDetailsTableRef.value!.getXTable();
+	    var newArray = [...xTable.data];
+	    newArray.splice(prop.rowIndex, 1);
+	    storeConsignmentInDetailsTable.dataSource = newArray;
+	  }
+	  
+	  //查看配件信息
+	  function viewAccessory(prop) {
+	    BaseShipArchiveAccessoriesModalRef.value.getTable(prop.row);
+	  }
+      function selectShip() {
+        SelectShipSModalRef.value.getTable();
       }
+      function addShip(data) {
+        data.map((item) => {
+          item.shipowner = item.relateCustomer;
+          item.shipId = item.id;
+          item.id = undefined;
+        });
+        var xTable = storeConsignmentInShipTableRef.value!.getXTable();
+        var arr = xTable.data.concat(data);
+        storeConsignmentInShipTable.dataSource = arr;
+      }
+
 
       async function edit(row) {
         //主表数据
@@ -228,14 +326,22 @@
       }
 
       async function submitForm() {
-        const mainData = await getFormData();
-        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');
+		  var xTable = storeConsignmentInDetailsTableRef.value!.getXTable();
+		  if (xTable.data.length == 0) {
+		    message.error('请添加产品明细!');
+		  } 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
+			  await saveOrUpdate(values, isUpdate);
+			  //关闭弹窗
+			  emit('success');
+			  
+		  }
+       
       }
       
       function setFieldsValue(values) {
@@ -275,6 +381,16 @@
         add,
         edit,
         formRef,
+		cuspCustomerList,
+        selectProductList,
+        SelectPrpductModalRef,
+        addProduct,
+        selectShip,
+        SelectShipSModalRef,
+        addShip,
+        handleDelete,
+		BaseShipArchiveAccessoriesModalRef,
+		viewAccessory
       }
     }
   });

+ 33 - 0
src/views/inventiry/consignmentOut/StoreConsignmentOut.api.ts

@@ -13,6 +13,8 @@ enum Api {
   exportXls = '/storeCode/storeConsignmentOut/exportXls',
   queryDataById = '/storeCode/storeConsignmentOut/queryById',
   storeConsignmentOutDetailsList = '/storeCode/storeConsignmentOut/queryStoreConsignmentOutDetailsByMainId',
+  submitBatch='/storeCode/storeConsignmentOut/submitBatch',
+  cancelSubmitBatch='/storeCode/storeConsignmentOut/returnSubmitBatch',
 }
 /**
  * 导出api
@@ -79,3 +81,34 @@ export const saveOrUpdate = (params, isUpdate) => {
 */
 export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
 
+
+// 提交
+export const batchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认提交',
+    content: '是否提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+// 取消提交
+export const cancelBatchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认取消提交',
+    content: '是否取消提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}

+ 23 - 41
src/views/inventiry/consignmentOut/StoreConsignmentOut.data.ts

@@ -7,7 +7,7 @@ import { getWeekMonthQuarterYear } from '/@/utils';
 //列表数据
 export const columns: BasicColumn[] = [
    {
-    title: '提交(submit)1是0否',
+    title: '提交(submit)',
     align:"center",
     dataIndex: 'submit_dictText'
    },
@@ -25,21 +25,11 @@ export const columns: BasicColumn[] = [
     align:"center",
     dataIndex: 'billCode'
    },
-   {
-    title: '项目(project)',
-    align:"center",
-    dataIndex: 'project'
-   },
    {
     title: '项目名称',
     align:"center",
     dataIndex: 'projectName'
    },
-   {
-    title: '客户(customer)',
-    align:"center",
-    dataIndex: 'customer'
-   },
    {
     title: '客户名称',
     align:"center",
@@ -64,18 +54,11 @@ export const columns: BasicColumn[] = [
 
 //子表表格配置
 export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
-    {
-      title: '产品id',
-      key: 'productId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
+    
     {
       title: '产品分类',
       key: 'productClass',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -83,7 +66,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '产品编码',
       key: 'productCode',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -91,7 +74,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '产品中文名',
       key: 'chineseName',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -99,7 +82,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '产品英文名',
       key: 'englishName',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -107,7 +90,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '型号',
       key: 'model',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -115,7 +98,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '备件号',
       key: 'partno',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -123,7 +106,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '图号',
       key: 'drawingno',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -131,7 +114,7 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
     {
       title: '质量等级',
       key: 'qualityGrade',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -141,13 +124,14 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
       key: 'stockOutQuantity',
       type: JVxeTypes.inputNumber,
       width:"200px",
+	  validateRules: [{ required: true, message: '出库数量必填' }],
       placeholder: '请输入${title}',
       defaultValue:'',
     },
     {
       title: '库存选择(Inventory selection)记录库存单号',
       key: 'inventorySelection',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -160,21 +144,19 @@ export const storeConsignmentOutDetailsColumns: JVxeColumn[] = [
       placeholder: '请输入${title}',
       defaultValue:'',
     },
+   
     {
-      title: '来源',
-      key: 'sourceId',
-      type: JVxeTypes.input,
+      title: '操作(operation)',
+      key: 'action',
       width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
-    {
-      title: '来源批次id',
-      key: 'batchId',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
+      // 固定在右侧
+      fixed: 'right',
+      // 对齐方式为居中
+      align: 'center',
+      // 组件类型定义为【插槽】
+      type: JVxeTypes.slot,
+      // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+      slotName: 'action',
     },
   ]
 

+ 56 - 26
src/views/inventiry/consignmentOut/StoreConsignmentOutList.vue

@@ -4,12 +4,19 @@
     <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>
-              <j-select-multiple placeholder="请选择提交(submit)1是0否" v-model:value="queryParam.submit" dictCode="yes_or_no" allow-clear />
-            </a-form-item>
-          </a-col>
+			<a-col :lg="6">
+			  <a-form-item name="billCode">
+			    <template #label><span title="单据编码">单据编码</span></template>
+			    <a-input v-model:value="queryParam.billCode" class="query-group-cust"></a-input>
+			  </a-form-item>
+			</a-col>
+			<a-col :lg="6">
+			  <a-form-item name="projectName">
+			    <template #label><span title="项目名称">项目名称</span></template>
+			    <a-input v-model:value="queryParam.projectName" class="query-group-cust"></a-input>
+			  </a-form-item>
+			</a-col>
+          
           <a-col :lg="6">
             <a-form-item name="billDate">
               <template #label><span title="单据日期">单据日期</span></template>
@@ -18,33 +25,32 @@
           </a-col>
           <template v-if="toggleSearchStatus">
             <a-col :lg="6">
-              <a-form-item name="billCode">
-                <template #label><span title="单据编码">单据编码</span></template>
-                <JRangeNumber v-model:value="queryParam.billCode" class="query-group-cust"></JRangeNumber>
-              </a-form-item>
-            </a-col>
-            <a-col :lg="6">
-              <a-form-item name="projectName">
-                <template #label><span title="项目名称">项目名称</span></template>
-                <JRangeNumber v-model:value="queryParam.projectName" class="query-group-cust"></JRangeNumber>
+              <a-form-item name="submit">
+                <template #label><span title="提交(submit)">提交</span></template>
+                <JDictSelectTag placeholder="请选择提交(submit)" v-model:value="queryParam.submit" dictCode="yes_or_no" allow-clear />
               </a-form-item>
             </a-col>
+            
             <a-col :lg="6">
               <a-form-item name="customerName">
                 <template #label><span title="客户名称">客户名称</span></template>
-                <JRangeNumber v-model:value="queryParam.customerName" class="query-group-cust"></JRangeNumber>
+                <a-input v-model:value="queryParam.customerName" class="query-group-cust"></a-input>
               </a-form-item>
             </a-col>
             <a-col :lg="6">
               <a-form-item name="warehouse">
-                <template #label><span title="仓库(warehouse)">仓库(w</span></template>
-                <a-input placeholder="请输入仓库(warehouse)" v-model:value="queryParam.warehouse" allow-clear ></a-input>
+                <template #label><span title="仓库(warehouse)">仓库</span></template>
+			   <JDictSelectTag placeholder="请选择仓库(warehouse)" v-model:value="queryParam.warehouse" dictCode="warehouse" allow-clear />
+
+               <!-- <a-input placeholder="请输入仓库(warehouse)" v-model:value="queryParam.warehouse" allow-clear ></a-input> -->
               </a-form-item>
             </a-col>
             <a-col :lg="6">
               <a-form-item name="goodsAllocation">
-                <template #label><span title="货位(goods allocation)">货位(g</span></template>
-                <a-input placeholder="请输入货位(goods allocation)" v-model:value="queryParam.goodsAllocation" allow-clear ></a-input>
+                <template #label><span title="货位(goods allocation)">货位</span></template>
+			   <JDictSelectTag placeholder="请选择货位(goods allocation)" v-model:value="queryParam.goodsAllocation" dictCode="goods_allocation" allow-clear />
+
+                <!-- <a-input placeholder="请输入货位(goods allocation)" v-model:value="queryParam.goodsAllocation" allow-clear ></a-input> -->
               </a-form-item>
             </a-col>
           </template>
@@ -68,8 +74,10 @@
      <!--插槽:table标题-->
       <template #tableTitle>
           <a-button type="primary" v-auth="'storeCode:store_consignment_out:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
-          <a-button  type="primary" v-auth="'storeCode:store_consignment_out:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-          <j-upload-button  type="primary" v-auth="'storeCode:store_consignment_out:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+         <a-button type="primary" @click="submit"> 提交(submit)</a-button>
+         <a-button type="primary" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+         
+		  <a-button  type="primary" v-auth="'storeCode:store_consignment_out:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
@@ -84,7 +92,7 @@
               </a-button>
         </a-dropdown>
         <!-- 高级查询 -->
-        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
+       <!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" /> -->
       </template>
        <!--操作栏-->
       <template #action="{ record }">
@@ -106,10 +114,11 @@
   import {useModal} from '/@/components/Modal';
   import StoreConsignmentOutModal from './components/StoreConsignmentOutModal.vue'
   import {columns, superQuerySchema} from './StoreConsignmentOut.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './StoreConsignmentOut.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,
+    cancelBatchSubmit,} from './StoreConsignmentOut.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
-  import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
   import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
+  import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
   import { cloneDeep } from "lodash-es";
   import { useUserStore } from '/@/store/modules/user';
   const formRef = ref();
@@ -202,6 +211,25 @@
   async function batchHandleDelete() {
      await batchDelete({ids: selectedRowKeys.value},handleSuccess);
    }
+   
+   
+   function submit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       batchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
+   function cancelSubmit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       cancelBatchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
+   
    /**
     * 成功回调
     */
@@ -216,7 +244,8 @@
          {
            label: '编辑',
            onClick: handleEdit.bind(null, record),
-           auth: 'storeCode:store_consignment_out:edit'
+           auth: 'storeCode:store_consignment_out:edit',
+		   ifShow: record.submit == '0',
          }
        ]
    }
@@ -230,6 +259,7 @@
            onClick: handleDetail.bind(null, record),
          }, {
            label: '删除',
+		   ifShow: record.submit == '0',
            popConfirm: {
              title: '是否确认删除',
              confirm: handleDelete.bind(null, record),

+ 114 - 21
src/views/inventiry/consignmentOut/components/StoreConsignmentOutForm.vue

@@ -4,44 +4,44 @@
       <template #detail>
         <a-form v-bind="formItemLayout" name="StoreConsignmentOutForm" ref="formRef">
           <a-row>
-						<a-col :span="12">
-							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="StoreConsignmentOutForm-billDate" name="billDate">
-								<a-date-picker placeholder="请选择单据日期"  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="单据编码" v-bind="validateInfos.billCode" id="StoreConsignmentOutForm-billCode" name="billCode">
-								<a-input v-model:value="formData.billCode" placeholder="请输入单据编码" disabled allow-clear ></a-input>
+								<a-input v-model:value="formData.billCode" placeholder="自动生成" disabled allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="项目(project)" v-bind="validateInfos.project" id="StoreConsignmentOutForm-project" name="project">
-								<a-input v-model:value="formData.project" placeholder="请输入项目(project)"  allow-clear ></a-input>
-							</a-form-item>
-						</a-col>
-						<a-col :span="12">
-							<a-form-item label="项目名称" v-bind="validateInfos.projectName" id="StoreConsignmentOutForm-projectName" name="projectName">
-								<a-input v-model:value="formData.projectName" placeholder="请输入项目名称"  allow-clear ></a-input>
+							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="StoreConsignmentOutForm-billDate" name="billDate">
+								<a-date-picker placeholder="请选择单据日期"  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="客户(customer)" v-bind="validateInfos.customer" id="StoreConsignmentOutForm-customer" name="customer">
-								<a-input v-model:value="formData.customer" placeholder="请输入客户(customer)"  allow-clear ></a-input>
+							<a-form-item label="项目(project)" v-bind="validateInfos.project" id="StoreConsignmentOutForm-project" name="projectName">
+								<a-input-search
+								  v-model:value="formData.projectName"
+								  readonly
+								  placeholder="请输入项目(project)"
+								  allow-clear
+								  enter-button="Search"
+								  :disabled="storeConsignmentOutDetailsTable.dataSource.length != 0"
+								  @search="onSearchProject"
+								/>
 							</a-form-item>
 						</a-col>
+						
 						<a-col :span="12">
-							<a-form-item label="客户名称" v-bind="validateInfos.customerName" id="StoreConsignmentOutForm-customerName" name="customerName">
-								<a-input v-model:value="formData.customerName" placeholder="请输入客户名称"  allow-clear ></a-input>
+							<a-form-item label="客户" v-bind="validateInfos.customerName" id="StoreConsignmentOutForm-customerName" name="customerName">
+								<a-input v-model:value="formData.customerName" placeholder="请输入客户名称" disabled allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="仓库(warehouse)" v-bind="validateInfos.warehouse" id="StoreConsignmentOutForm-warehouse" name="warehouse">
-								<a-input v-model:value="formData.warehouse" placeholder="请输入仓库(warehouse)"  allow-clear ></a-input>
+								 <JDictSelectTag v-model:value="formData.warehouse" placeholder="请选择" dictCode="warehouse" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="货位(goods allocation)" v-bind="validateInfos.goodsAllocation" id="StoreConsignmentOutForm-goodsAllocation" name="goodsAllocation">
-								<a-input v-model:value="formData.goodsAllocation" placeholder="请输入货位(goods allocation)"  allow-clear ></a-input>
+								<JDictSelectTag v-model:value="formData.goodsAllocation" placeholder="请选择" dictCode="goods_allocation" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -57,6 +57,9 @@
 		<!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated>
       <a-tab-pane tab="寄存代发出库-子表明细" key="storeConsignmentOutDetails" :forceRender="true">
+		  <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectStandingStock" :disabled="disabled"
+		    >选择现存量(select standing stock)</a-button
+		  >
         <j-vxe-table
           :keep-source="true"
           resizable
@@ -68,9 +71,19 @@
           :disabled="disabled"
           :rowNumber="true"
           :rowSelection="true"
-          :toolbar="true"/>
+          >
+            <template #action="props">
+              <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)" v-if="!disabled">
+                <a>删除(delete)</a>
+              </a-popconfirm>
+             
+            </template>
+          </j-vxe-table>
       </a-tab-pane>
     </a-tabs>
+	
+	<SelectStaningStockModal ref="SelectStaningStockModalRef" @select-staning-stock="addSonList" />
+	<SelectProjectModal ref="SelectProjectModalRef" @select-project="addProject" />
   </a-spin>
 </template>
 
@@ -83,6 +96,12 @@
   import {storeConsignmentOutDetailsColumns} from '../StoreConsignmentOut.data';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import { Form } from 'ant-design-vue';
+  import { JDictSelectTag } from '/@/components/Form';
+  import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
+  import SelectStaningStockModal from '../../salesOutbound/components/SelectStaningStockModal.vue';
+  
+  import { message } from 'ant-design-vue';
+  import moment from 'moment';
   const useForm = Form.useForm;
 
   export default defineComponent({
@@ -90,6 +109,9 @@
     components:{
       JVxeTable,
 			JFormContainer,
+      JDictSelectTag,
+      SelectStaningStockModal,
+      SelectProjectModal,
     },
     props:{
       formDisabled:{
@@ -103,6 +125,9 @@
     setup(props, {emit}) {
       const loading = ref(false);
       const formRef = ref();
+	  
+	  var SelectProjectModalRef = ref();
+      const SelectStaningStockModalRef = ref();
       const storeConsignmentOutDetailsTableRef = ref();
       const storeConsignmentOutDetailsTable = reactive<Record<string, any>>({
         loading: false,
@@ -112,7 +137,7 @@
       const activeKey = ref('storeConsignmentOutDetails');
       const formData = reactive<Record<string, any>>({
         id: '',
-        billDate: '',   
+        billDate: moment(new Date()).format('YYYY-MM-DD'),   
         billCode: '',   
         project: '',   
         projectName: '',   
@@ -121,10 +146,16 @@
         warehouse: '',   
         goodsAllocation: '',   
         notes: '',   
+        type: '寄存代发',   
       });
 
       //表单验证
       const validatorRules = reactive({
+		  project: [{ required: true, message: '请选择项目(select project)' }],
+		  billDate: [{ required: true, message: '请选择日期(select billDate)' }],
+          customerName: [{ required: true, message: '请选择客户(select customer)' }],
+          warehouse: [{ required: true, message: '请选择仓库(select warehouse)' }],
+          goodsAllocation: [{ required: true, message: '请选择货位(select goodsAllocation)' }],
       });
       const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
       const dbData = {};
@@ -152,6 +183,62 @@
         storeConsignmentOutDetailsTable.dataSource = [];
       }
 
+      function selectStandingStock() {
+		  if(formData.project =='' || formData.project == ''){
+			  message.warning('请先选择项目');
+		  }else{
+			  
+			  SelectStaningStockModalRef.value.getTable(formData);
+		  }
+      }
+
+      //选择项目
+      function onSearchProject() {
+        SelectProjectModalRef.value.getTable();
+      }
+	  
+	 //选择项目
+      function addProject(data) {
+        if (data.length == 0) {
+          formData.project = formData.projectName = '';
+        } else {
+          formData.project = data[0].id;
+          formData.projectName = data[0].code;
+          formData.customer = data[0].customerId;
+          formData.customerName = data[0].customerId_dictText;
+        }
+      }
+
+      //产品明细-删除行
+      function handleDelete(prop) {
+        var xTable = storeConsignmentOutDetailsTableRef.value!.getXTable();
+        var newArray = [...xTable.data];
+        newArray.splice(prop.rowIndex, 1);
+        storeConsignmentOutDetailsTable.dataSource = newArray;
+        if (storeConsignmentOutDetailsTable.dataSource.length == 0) {
+          add();
+        }
+      }
+      function addSonList(data) {
+        // formData.project = data[0].project;
+        // formData.projectName = data[0].projectName;
+        formData.customerName = data[0].customerName;
+        formData.customer = data[0].customer;
+        formData.goodsAllocation = data[0].goodsAllocation;
+        formData.warehouse = data[0].warehouse;
+        formData.productionClass = data[0].productionClass;
+        data.map((item) => {
+          item.model = item.childModel;
+          item.batchId = item.id;
+          item.productClass = item.productionClass_dictText;
+          item.stockOutQuantity = item.quantity;
+          item.inventorySelection = item.batchCode;
+          item.id = undefined;
+        });
+        var xTable = storeConsignmentOutDetailsTableRef.value!.getXTable();
+        var arr = xTable.data.concat(data);
+        storeConsignmentOutDetailsTable.dataSource = arr;
+      }
       async function edit(row) {
         //主表数据
         await queryMainData(row.id);
@@ -239,6 +326,12 @@
         add,
         edit,
         formRef,
+        onSearchProject,
+        SelectProjectModalRef,
+		addProject,
+		SelectStaningStockModalRef,
+        selectStandingStock,
+        addSonList,
       }
     }
   });

+ 5 - 0
src/views/inventiry/existingQuantity/existingQuantityForm.data.ts

@@ -84,5 +84,10 @@ export const columns: BasicColumn[] = [
     dataIndex: 'quantity',
     width:'250'
    },
+   {
+    title: '库存分类(type)',
+    align:"center",
+    dataIndex: 'type',
+   },
 ];
 

+ 12 - 1
src/views/inventiry/existingQuantity/existingQuantityList.vue

@@ -98,6 +98,17 @@
                   </a-select>
               </a-form-item>
             </a-col>
+            <a-col :lg="8">
+              <a-form-item name="type">
+                <template #label><span title="库存分类(type)">库存分类(type)</span></template>
+                  <a-select v-model:value="queryParam.type">
+                    <a-select-option  value="">==所有==</a-select-option>
+                    <a-select-option  value="采购入库">采购入库</a-select-option>
+                    <a-select-option  value="其他入库">其他入库</a-select-option>
+                    <a-select-option  value="寄存代发">寄存代发</a-select-option>
+                  </a-select>
+              </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">
@@ -136,7 +147,7 @@
   import { JDictSelectTag, ApiSelect, JInput,JSelect } from '/@/components/Form';
   const formRef = ref();
   const queryParam = reactive<any>({
-    type: '2',
+    /* type: '2', */
     quantity:'1'
   });
   var showField = ref('currency_dictText+name');

+ 22 - 21
src/views/inventiry/otherIn/components/otherInForm.vue

@@ -106,24 +106,7 @@
 
     <!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated style="padding: 24px; padding-top: 0px">
-      <a-tab-pane tab="其他入库 - 船明细(ship details)" key="otherInShip" :forceRender="true">
-        <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectShip" :disabled="disabled"> 选择船(select ship)</a-button>
-        <j-vxe-table
-          :keep-source="true"
-          resizable
-          ref="otherInShipTableRef"
-          :loading="otherInShipTable.loading"
-          :columns="otherInShipTable.columns"
-          :dataSource="otherInShipTable.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-tab-pane tab="其他入库 - 入库明细(arrive details)" key="stockIn" :forceRender="true">
         <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectProductList" :disabled="disabled">
           选择产品(select product)</a-button
@@ -137,7 +120,7 @@
           :dataSource="stockInTable.dataSource"
           :disabled="disabled"
           :rowNumber="true"
-          :rowSelection="true"
+          :rowSelection="false"
           asyncRemove
         >
           <template #action="props">
@@ -148,6 +131,24 @@
             <!-- <a>复制(copy)</a> -->
           </template>
         </j-vxe-table>
+      </a-tab-pane>
+	  <a-tab-pane tab="其他入库 - 船明细(ship details)" key="otherInShip" :forceRender="true">
+        <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectShip" :disabled="disabled"> 选择船(select ship)</a-button>
+        <j-vxe-table
+          :keep-source="true"
+          resizable
+          ref="otherInShipTableRef"
+          :loading="otherInShipTable.loading"
+          :columns="otherInShipTable.columns"
+          :dataSource="otherInShipTable.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="BaseShipArchiveAccessoriesModalRef" />
@@ -226,7 +227,7 @@
         columns: stockInColumns,
         dataSource: [],
       });
-      const activeKey = ref('otherInShip');
+      const activeKey = ref('stockIn');
       const formData = reactive<Record<string, any>>({
         id: '',
         status: undefined,
@@ -276,7 +277,7 @@
         resetFields();
         otherInShipTable.dataSource = [];
         stockInTable.dataSource = [];
-        activeKey.value = 'otherInShip';
+        activeKey.value = 'stockIn';
       }
       async function edit(row) {
         //主表数据

+ 4 - 1
src/views/inventiry/otherOut/components/otherOutForm.vue

@@ -145,7 +145,10 @@
         notes: '',
       });
       //表单验证
-      const validatorRules = reactive({});
+      const validatorRules = reactive({
+		  projectName: [{ required: true, message: '项目不能为空(select projectName)' }],
+		  
+	  });
       const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
       const dbData = {};
       const formItemLayout = {

+ 7 - 1
src/views/inventiry/salesOutbound/components/SelectStaningStockModal.vue

@@ -73,6 +73,11 @@
                                 <j-input placeholder="请输入" v-model:value="queryParams.batchCode"></j-input>
                             </a-form-item>
                         </a-col> 
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="类型(type)">
+                                <a-input placeholder="请输入" v-model:value="queryParams.type"></a-input>
+                            </a-form-item>
+                        </a-col> 
                         <a-col :md="6" :sm="8">
                             <a-form-item label="零库存(quantity)">
                                 <a-select v-model:value="queryParams.quantity">
@@ -321,7 +326,8 @@
         queryParams.value.projectName = father.value.projectName
         queryParams.value.goodsAllocation = father.value.goodsAllocation
         queryParams.value.productCode = father.value.productCode
-        queryParams.value.warehouse = father.value.warehouse
+        queryParams.value.customer = father.value.customer
+        queryParams.value.type = father.value.type
         return filterObj(params);
     }
     function handleTableChange(paginations, filters, sorter){

+ 23 - 2
src/views/publicComponents/components/BaseProjectArchive.data.ts

@@ -3,6 +3,7 @@ import {FormSchema} from '/@/components/Table';
 import { rules} from '/@/utils/helper/validator';
 import { render } from '/@/utils/common/renderUtils';
 import { getWeekMonthQuarterYear } from '/@/utils';
+import { defHttp } from '/@/utils/http/axios';
 //列表数据
 export const columns: BasicColumn[] = [
   {
@@ -53,9 +54,29 @@ export const searchFormSchema: FormSchema[] = [
     },
     {
       label: '客户(customer name)',
-      field: 'relateCustomer',
+      field: 'customerId',
       labelWidth: 150,
-      component: 'JInput',
+      component: 'ApiSelect',
+	  componentProps: {
+	    // mode: 'multiple',//multiple: 多选;不填写为单选
+	    //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
+	    api: () => defHttp.get({ url: '/cuspCode/cuspCustomerProfile/list',params:{pageSize: -1}}),
+	    //数值转成String
+	    numberToString: false,
+	    //标题字段
+	    labelField: 'name',
+	    //值字段
+	    valueField: 'id',
+	    //请求参数
+	    params: { pageSize: -1, status: 1 },
+	    //返回结果字段
+	    resultField: 'records',
+	    filterOption: 'true',
+	    optionFilterProp: 'label',
+	    showSearch: 'true',
+	  },
+	  
+	  
      },
      {
       label: "创建时间(create time)",

+ 33 - 0
src/views/purchase/advanceCommission/PurAdvanceCommission.api.ts

@@ -11,6 +11,8 @@ enum Api {
   deleteBatch = '/purCode/purAdvanceCommission/deleteBatch',
   importExcel = '/purCode/purAdvanceCommission/importExcel',
   exportXls = '/purCode/purAdvanceCommission/exportXls',
+  submitBatch='/purCode/purAdvanceCommission/submitBatch',
+  cancelSubmitBatch='/purCode/purAdvanceCommission/returnSubmitBatch',
 }
 
 /**
@@ -70,3 +72,34 @@ export const saveOrUpdate = (params, isUpdate) => {
   let url = isUpdate ? Api.edit : Api.save;
   return defHttp.post({ url: url, params }, { isTransformResponse: false });
 }
+
+// 提交
+export const batchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认提交',
+    content: '是否提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+// 取消提交
+export const cancelBatchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认取消提交',
+    content: '是否取消提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}

+ 9 - 9
src/views/purchase/advanceCommission/PurAdvanceCommission.data.ts

@@ -21,7 +21,7 @@ export const columns: BasicColumn[] = [
     },
   },
   {
-    title: '预计付款日期(Expected payment date)',
+    title: '预计付款日期(date)',
     align: "center",
     dataIndex: 'expectedPaymentDate',
     customRender:({text}) =>{
@@ -37,7 +37,7 @@ export const columns: BasicColumn[] = [
   {
     title: '收款人(payee)',
     align: "center",
-    dataIndex: 'payee'
+    dataIndex: 'payee_dictText'
   },
   {
     title: '申请金额(approve money)',
@@ -48,21 +48,21 @@ export const columns: BasicColumn[] = [
     title: '币种(currency)',
     align: "center",
     dataIndex: 'currency'
-  },
-  {
-    title: '审批(approve)',
+  },{
+    title: '提交(submit)',
     align: "center",
-    dataIndex: 'approve'
+    dataIndex: 'submit_dictText'
   },
   {
-    title: '提交(submit)',
+    title: '审批(approve)',
     align: "center",
-    dataIndex: 'submit'
+    dataIndex: 'approve_dictText'
   },
+  
   {
     title: '付款(payment)',
     align: "center",
-    dataIndex: 'payment'
+    dataIndex: 'payment_dictText'
   },
 ];
 

+ 22 - 2
src/views/purchase/advanceCommission/PurAdvanceCommissionList.vue

@@ -51,7 +51,10 @@
       <template #tableTitle>
         <a-button type="primary" v-auth="'purCode:pur_advance_commission:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
         <a-button  type="primary" v-auth="'purCode:pur_advance_commission:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-        <!-- <j-upload-button  type="primary" v-auth="'purCode:pur_advance_commission:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
+     <a-button type="primary" v-auth="'purCode:pur_advance_commission:add'" @click="submit"> 提交(submit)</a-button>
+     <a-button type="primary" v-auth="'purCode:pur_advance_commission:add'" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+     
+		<!-- <j-upload-button  type="primary" v-auth="'purCode:pur_advance_commission:importExcel'"  preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> -->
         <a-dropdown v-if="selectedRowKeys.length > 0">
           <template #overlay>
             <a-menu>
@@ -85,11 +88,12 @@
   import { BasicTable, useTable, TableAction } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { columns, superQuerySchema } from './PurAdvanceCommission.data';
-  import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './PurAdvanceCommission.api';
+  import { list, deleteOne, batchDelete, getImportUrl, getExportUrl,cancelBatchSubmit,batchSubmit } from './PurAdvanceCommission.api';
   import { downloadFile } from '/@/utils/common/renderUtils';
   import PurAdvanceCommissionModal from './components/PurAdvanceCommissionModal.vue'
   import { useUserStore } from '/@/store/modules/user';
   import { cloneDeep } from "lodash-es";
+  import { message } from 'ant-design-vue';
 
   const formRef = ref();
   const queryParam = reactive<any>({});
@@ -186,6 +190,22 @@
     await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
   }
    
+   function submit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       batchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
+   function cancelSubmit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       cancelBatchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
   /**
    * 成功回调
    */

+ 24 - 8
src/views/purchase/advanceCommission/components/PurAdvanceCommissionForm.vue

@@ -4,14 +4,15 @@
       <template #detail>
         <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="PurAdvanceCommissionForm">
           <a-row>
+						
 						<a-col :span="12">
-							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="PurAdvanceCommissionForm-billDate" name="billDate">
-								<a-date-picker placeholder="请选择单据日期"  v-model:value="formData.billDate" value-format="YYYY-MM-DD"  style="width: 100%"  allow-clear />
+							<a-form-item label="预付款编号" v-bind="validateInfos.billCode" id="PurAdvanceCommissionForm-billCode" name="billCode">
+								<a-input v-model:value="formData.billCode" placeholder="自动生成" disabled allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="预付款编号" v-bind="validateInfos.billCode" id="PurAdvanceCommissionForm-billCode" name="billCode">
-								<a-input v-model:value="formData.billCode" placeholder="请输入预付款编号"  allow-clear ></a-input>
+							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="PurAdvanceCommissionForm-billDate" name="billDate">
+								<a-date-picker placeholder="请选择单据日期"  v-model:value="formData.billDate" value-format="YYYY-MM-DD"  style="width: 100%"  allow-clear />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -26,7 +27,9 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="收款人(payee)" v-bind="validateInfos.payee" id="PurAdvanceCommissionForm-payee" name="payee">
-								<a-input v-model:value="formData.payee" placeholder="请输入收款人(payee)"  allow-clear ></a-input>
+								<!-- <a-input v-model:value="formData.payee" placeholder="请输入收款人(payee)"  allow-clear ></a-input> -->
+								<JDictSelectTag v-model:value="formData.payee" placeholder="请选择收款人" dictCode="cusp_intermediator,name,id,del_flag=0" />
+
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -44,10 +47,15 @@
 								<a-input v-model:value="formData.swiftCode" placeholder="请输入银行代码(swift code)"  allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
+						<a-col :span="12">
+							<a-form-item label="申请金额(approve money)" v-bind="validateInfos.approveMoney" id="PurAdvancePaymentForm-approveMoney" name="approveMoney">
+								<a-input-number v-model:value="formData.approveMoney" placeholder="请输入申请金额(approve money)"  style="width: 100%" />
+							</a-form-item>
+						</a-col> 
 						<a-col :span="12">
 							<a-form-item label="币种(currency)" v-bind="validateInfos.currency" id="PurAdvanceCommissionForm-currency" name="currency">
 								<!-- <a-input v-model:value="formData.currency" placeholder="请输入币种(currency)"  allow-clear ></a-input> -->
-                <j-dict-select-tag v-model:value="formData.currency" dictCode="currency" placeholder="请输入币种(currency)"  allow-clear />
+								<j-dict-select-tag v-model:value="formData.currency" dictCode="currency" placeholder="请输入币种(currency)"  allow-clear />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -72,6 +80,8 @@
   import { saveOrUpdate } from '../PurAdvanceCommission.api';
   import { Form } from 'ant-design-vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
+  import moment from 'moment';
+  import {  ApiSelect, JSelect } from '/@/components/Form';
   const props = defineProps({
     formDisabled: { type: Boolean, default: false },
     formData: { type: Object, default: () => ({})},
@@ -82,7 +92,7 @@
   const emit = defineEmits(['register', 'ok']);
   const formData = reactive<Record<string, any>>({
     id: '',
-    billDate: '',   
+    billDate: moment(new Date()).format('YYYY-MM-DD'),
     billCode: '',   
     commissionType: '',   
     expectedPaymentDate: '',   
@@ -92,7 +102,7 @@
     swiftCode: '',   
     currency: '',   
     notes: '',   
-    approveMoney: undefined,
+    approveMoney: '',
   });
   const { createMessage } = useMessage();
   const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
@@ -100,6 +110,12 @@
   const confirmLoading = ref<boolean>(false);
   //表单验证
   const validatorRules = reactive({
+	  billDate: [{ required: true, message: '请选择日期(select billDate)' }],
+	  supplier: [{ required: true, message: '请选择供应商(select supplier)' }],
+	  currency: [{ required: true, message: '请选择币种(select currency)' }],
+	  payee: [{ required: true, message: '请选择收款人(select payee)' }],
+	  approveMoney: [{ required: true, message: '请选择收款金额(select approveMoney)' }],
+	  commissionType: [{ required: true, message: '请选择返佣类型(select commissionType)' }],
   });
   const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
 

+ 38 - 0
src/views/purchase/advancePayment/PurAdvancePayment.api.ts

@@ -13,6 +13,9 @@ enum Api {
   exportXls = '/purCode/purAdvancePayment/exportXls',
   queryDataById = '/purCode/purAdvancePayment/queryById',
   purAdvancePaymentDetailsList = '/purCode/purAdvancePayment/queryPurAdvancePaymentDetailsByMainId',
+  submitBatch='/purCode/purAdvancePayment/submitBatch',
+  cancelSubmitBatch='/purCode/purAdvancePayment/returnSubmitBatch',
+  supplierList='/cuspCode/cuspSupplierProfile/list',
 }
 /**
  * 导出api
@@ -79,3 +82,38 @@ export const saveOrUpdate = (params, isUpdate) => {
 */
 export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
 
+// 供应商列表接口
+export const supplierOption = (params) =>
+  defHttp.get({url: Api.supplierList, params});
+
+
+// 提交
+export const batchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认提交',
+    content: '是否提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.submitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}
+// 取消提交
+export const cancelBatchSubmit = (params, handleSuccess) => {
+  createConfirm({
+    iconType: 'warning',
+    title: '确认取消提交',
+    content: '是否取消提交选中数据',
+    okText: '确认',
+    cancelText: '取消',
+    onOk: () => {
+      return defHttp.get({url: Api.cancelSubmitBatch, params}, {joinParamsToUrl: true}).then(() => {
+        handleSuccess();
+      });
+    }
+  });
+}

+ 40 - 13
src/views/purchase/advancePayment/PurAdvancePayment.data.ts

@@ -4,6 +4,8 @@ import { rules} from '/@/utils/helper/validator';
 import { render } from '/@/utils/common/renderUtils';
 import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
 import { getWeekMonthQuarterYear } from '/@/utils';
+import { uploadUrl } from '/@/api/common/api';
+
 //列表数据
 export const columns: BasicColumn[] = [
    
@@ -39,7 +41,7 @@ export const columns: BasicColumn[] = [
    {
     title: '币种(currency)',
     align:"center",
-    dataIndex: 'currency_dictText'
+    dataIndex: 'currency'
    },
    {
     title: '申请金额(approve money)',
@@ -78,7 +80,7 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
     {
       title: '项目名称',
       key: 'projectName',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -86,7 +88,7 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
     {
       title: '采购订单号(purchase code)',
       key: 'purchaseCode',
-      type: JVxeTypes.input,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -94,7 +96,7 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
     {
       title: '订单金额(order money)',
       key: 'orderMoney',
-      type: JVxeTypes.inputNumber,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -110,7 +112,7 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
     {
       title: '已申请金额(applyed money',
       key: 'applyedMoney',
-      type: JVxeTypes.inputNumber,
+      type: JVxeTypes.normal,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',
@@ -121,16 +123,28 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
       type: JVxeTypes.inputNumber,
       width:"200px",
       placeholder: '请输入${title}',
+      validateRules: [{ required: true, message: '' }],
       defaultValue:'',
     },
-    {
-      title: '发票(invoice)',
-      key: 'invoice',
-      type: JVxeTypes.input,
-      width:"200px",
-      placeholder: '请输入${title}',
-      defaultValue:'',
-    },
+	{
+	  title: '发票(invoice)',
+	  key: 'invoice',
+	  placeholder: '请输入${title}',
+	  width:"200px",
+	  defaultValue:'',
+	  type: JVxeTypes.upload,
+	  token: true,
+	  responseName: 'message',
+	  action: uploadUrl,
+	},
+    // {
+    //   title: '发票(invoice)',
+    //   key: 'invoice',
+    //   type: JVxeTypes.input,
+    //   width:"200px",
+    //   placeholder: '请输入${title}',
+    //   defaultValue:'',
+    // },
     {
       title: '备注(notes)',
       key: 'notes',
@@ -139,6 +153,19 @@ export const purAdvancePaymentDetailsColumns: JVxeColumn[] = [
       placeholder: '请输入${title}',
       defaultValue:'',
     },
+  {
+    title: '操作(operation)',
+    key: 'action',
+    width:"200px",
+    // 固定在右侧
+    fixed: 'right',
+    // 对齐方式为居中
+    align: 'center',
+    // 组件类型定义为【插槽】
+    type: JVxeTypes.slot,
+    // slot 的名称,对应 v-slot 冒号后面和等号前面的内容
+    slotName: 'action',
+  },
   ]
 
 // 高级查询数据

+ 24 - 2
src/views/purchase/advancePayment/PurAdvancePaymentList.vue

@@ -77,7 +77,9 @@
       <template #tableTitle>
           <a-button type="primary" v-auth="'purCode:pur_advance_payment:add'"  @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
           <a-button  type="primary" v-auth="'purCode:pur_advance_payment:exportXls'"  preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-          <a-dropdown v-if="selectedRowKeys.length > 0">
+          <a-button type="primary" v-auth="'purCode:pur_advance_payment:add'" @click="submit"> 提交(submit)</a-button>
+          <a-button type="primary" v-auth="'purCode:pur_advance_payment:add'" @click="cancelSubmit"> 取消提交(cancelSubmit)</a-button>
+		  <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
                   <a-menu-item key="1" @click="batchHandleDelete">
@@ -113,10 +115,13 @@
   import {useModal} from '/@/components/Modal';
   import PurAdvancePaymentModal from './components/PurAdvancePaymentModal.vue'
   import {columns, superQuerySchema} from './PurAdvancePayment.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './PurAdvancePayment.api';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,
+    cancelBatchSubmit,batchSubmit ,
+    supplierOption,} from './PurAdvancePayment.api';
   import {downloadFile} from '/@/utils/common/renderUtils';
   import { cloneDeep } from "lodash-es";
   import { useUserStore } from '/@/store/modules/user';
+  import { message } from 'ant-design-vue';
   const formRef = ref();
   const queryParam = reactive<any>({});
   const checkedKeys = ref<Array<string | number>>([]);
@@ -207,6 +212,23 @@
   async function batchHandleDelete() {
      await batchDelete({ids: selectedRowKeys.value},handleSuccess);
    }
+   
+   function submit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       batchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
+   function cancelSubmit() {
+     if (selectedRowKeys.value.length == 0) {
+       message.warning('请选择数据');
+     } else {
+       var ids = selectedRowKeys.value.join(',');
+       cancelBatchSubmit({ ids: ids }, handleSuccess);
+     }
+   }
    /**
     * 成功回调
     */

+ 131 - 32
src/views/purchase/advancePayment/components/PurAdvancePaymentForm.vue

@@ -4,19 +4,26 @@
       <template #detail>
         <a-form v-bind="formItemLayout" name="PurAdvancePaymentForm" ref="formRef">
           <a-row>
+						
 						<a-col :span="12">
-							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="PurAdvancePaymentForm-billDate" name="billDate">
-								<a-date-picker placeholder="请选择单据日期"  v-model:value="formData.billDate" value-format="YYYY-MM-DD"  style="width: 100%"  allow-clear />
+							<a-form-item label="单据编码" v-bind="validateInfos.billCode" id="PurAdvancePaymentForm-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="单据编码" v-bind="validateInfos.billCode" id="PurAdvancePaymentForm-billCode" name="billCode">
-								<a-input v-model:value="formData.billCode" placeholder="请输入单据编码"  allow-clear ></a-input>
+							<a-form-item label="单据日期" v-bind="validateInfos.billDate" id="PurAdvancePaymentForm-billDate" name="billDate">
+								<a-date-picker placeholder="请选择单据日期"  v-model:value="formData.billDate" value-format="YYYY-MM-DD"  style="width: 100%"  />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
-							<a-form-item label="供应商(supplier)" v-bind="validateInfos.supplierName" id="PurAdvancePaymentForm-supplierName" name="supplierName">
-								<a-input v-model:value="formData.supplierName" placeholder="请输入供应商(supplier)"  allow-clear ></a-input>
+							<a-form-item label="供应商(supplier)" v-bind="validateInfos.supplier" id="PurAdvancePaymentForm-supplier" name="supplier">
+								<JSelect
+								  v-model:value="formData.supplier"
+								  :get-option-url="supplierOption"
+								  :showField="showField"
+								  @change="changeSupplier"
+								  :param="{ status: 1 }"
+								/>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -46,7 +53,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="币种(currency)" v-bind="validateInfos.currency" id="PurAdvancePaymentForm-currency" name="currency">
-								<j-dict-select-tag v-model:value="formData.currency" dictCode="" placeholder="请选择币种(currency)"  allow-clear />
+								<JDictSelectTag v-model:value="formData.currency" placeholder="请选择币种(currency)" dictCode="currency" style="width: 100%" />
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -54,19 +61,20 @@
 								<a-input v-model:value="formData.collectionCertificate" placeholder="请输入委托收款证明(Entrusted Collection Certificate)"  allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
-						<a-col :span="12">
-							<a-form-item label="备注(notes)" v-bind="validateInfos.notes" id="PurAdvancePaymentForm-notes" name="notes">
-								<a-input v-model:value="formData.notes" placeholder="请输入备注(notes)"  allow-clear ></a-input>
-							</a-form-item>
-						</a-col>
-						<a-col :span="12">
+						
+						<!-- <a-col :span="12">
 							<a-form-item label="申请金额(approve money)" v-bind="validateInfos.approveMoney" id="PurAdvancePaymentForm-approveMoney" name="approveMoney">
-								<a-input-number v-model:value="formData.approveMoney" placeholder="请输入申请金额(approve money)" style="width: 100%" />
+								<a-input-number v-model:value="formData.approveMoney" placeholder="请输入申请金额(approve money)" disabled style="width: 100%" />
 							</a-form-item>
-						</a-col>
-						<a-col :span="12">
+						</a-col> -->
+						<!-- <a-col :span="12">
 							<a-form-item label="预付款比例" v-bind="validateInfos.prepaymentRatio" id="PurAdvancePaymentForm-prepaymentRatio" name="prepaymentRatio">
-								<a-input-number v-model:value="formData.prepaymentRatio" placeholder="请输入预付款比例" style="width: 100%" />
+								<a-input-number v-model:value="formData.prepaymentRatio" placeholder="请输入预付款比例" style="width: 100%" disabled />
+							</a-form-item>
+						</a-col> -->
+						<a-col :span="12">
+							<a-form-item label="备注(notes)" v-bind="validateInfos.notes" id="PurAdvancePaymentForm-notes" name="notes">
+								<a-input v-model:value="formData.notes" placeholder="请输入备注(notes)"  allow-clear ></a-input>
 							</a-form-item>
 						</a-col>
           </a-row>
@@ -77,6 +85,9 @@
 		<!-- 子表单区域 -->
     <a-tabs v-model:activeKey="activeKey" animated>
       <a-tab-pane tab="采购预付款-子表" key="purAdvancePaymentDetails" :forceRender="true">
+        <a-button type="primary" style="margin-right: 1%; margin-bottom: 1%" @click="selectOrder" :disabled="disabled">
+          选择采购订单(select purchase order)</a-button
+        >
         <j-vxe-table
           :keep-source="true"
           resizable
@@ -86,11 +97,22 @@
           :dataSource="purAdvancePaymentDetailsTable.dataSource"
           :height="340"
           :disabled="disabled"
-          :rowNumber="true"
+          :rowNumber="false"
           :rowSelection="true"
-          :toolbar="true"/>
+          >
+            <template #action="props">
+              <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)" v-if="!disabled">
+                <a>删除(delete)</a>
+              </a-popconfirm>
+            </template>
+            
+            <template #invoice="props">
+              <JUpload v-model:value="props.row.invoice" />
+            </template>
+          </j-vxe-table>
       </a-tab-pane>
     </a-tabs>
+    <SelectPurchaseOrderModal ref="SelectPurchaseOrderModalRef" @select-purchase-order-mian="addDetailList" />
   </a-spin>
 </template>
 
@@ -98,12 +120,15 @@
   import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
-  import { queryPurAdvancePaymentDetailsListByMainId, queryDataById, saveOrUpdate } from '../PurAdvancePayment.api';
+  import { queryPurAdvancePaymentDetailsListByMainId, queryDataById, saveOrUpdate ,supplierOption,} from '../PurAdvancePayment.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {purAdvancePaymentDetailsColumns} from '../PurAdvancePayment.data';
   import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
-  import { Form } from 'ant-design-vue';
+  import { Form, message } from 'ant-design-vue';
+  import moment from 'moment';
+  import SelectPurchaseOrderModal from '../../../publicComponents/SelectPurchaseOrderMainModal.vue';
+  import {  JSelect, ApiSelect } from '/@/components/Form';
   const useForm = Form.useForm;
 
   export default defineComponent({
@@ -112,6 +137,9 @@
       JDictSelectTag,
       JVxeTable,
 			JFormContainer,
+      ApiSelect,
+      JSelect,
+      SelectPurchaseOrderModal,
     },
     props:{
       formDisabled:{
@@ -123,6 +151,8 @@
     },
     emits:['success'],
     setup(props, {emit}) {
+      const SelectPurchaseOrderModalRef = ref();
+      var showField = ref('currency_dictText+name');
       const loading = ref(false);
       const formRef = ref();
       const purAdvancePaymentDetailsTableRef = ref();
@@ -134,8 +164,10 @@
       const activeKey = ref('purAdvancePaymentDetails');
       const formData = reactive<Record<string, any>>({
         id: '',
-        billDate: '',   
+        billDate: moment(new Date()).format('YYYY-MM-DD'),
         billCode: '',   
+		sourceCode: '',
+        supplier: '',   
         supplierName: '',   
         expectedPaymentDate: '',   
         payee: '',   
@@ -151,6 +183,9 @@
 
       //表单验证
       const validatorRules = reactive({
+		  
+		    supplier: [{ required: true, message: '请选择供应商(select supplier)' }],
+		    currency: [{ required: true, message: '请选择币种(select currency)' }],
       });
       const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
       const dbData = {};
@@ -171,7 +206,45 @@
         return props.formDisabled;
       });
 
-      
+      function selectOrder() {
+        SelectPurchaseOrderModalRef.value.getTable(formData);
+      }
+	  
+	  function addDetailList(data) {
+	    var billCodeArr = [];
+	    data.map((item) => {
+	      item.sourceId = item.id;
+	      item.purchaseCode = item.billCode;
+	      billCodeArr.push(item.billCode);
+	      item.purchaseId = item.id;
+	      // item.orderMoney =  item.totalAmount
+	      item.orderMoney = item.discountAmount;
+	      item.applyedMoney = item.totalAmountUsed;
+	      item.applyMoney = item.discountAmount - item.totalAmountUsed;
+	      item.id = undefined;
+	      item.notes = '';
+	    });
+	    if (formData.sourceCode !== '') {
+	      formData.sourceCode = formData.sourceCode + ',' + billCodeArr.join(',');
+	    } else {
+	      formData.sourceCode = billCodeArr.join(',');
+	    }
+	    var xTable = purAdvancePaymentDetailsTableRef.value!.getXTable();
+	    var arrSonFormDelivery = xTable.data.concat(data);
+	    purAdvancePaymentDetailsTable.dataSource = arrSonFormDelivery;
+	    formData.supplier = data[0].supplier;
+	    formData.supplierName = data[0].supplierName;
+	    formData.currency = data[0].currency;
+	    formData.afterId = data[0].afterId;
+	  }
+	  
+      //产品明细-删除行
+      async function handleDelete1(prop) {
+        var xTable = purAdvancePaymentDetailsTableRef.value!.getXTable();
+        var newArray = [...xTable.data];
+        newArray.splice(prop.rowIndex, 1);
+        purAdvancePaymentDetailsTable.dataSource = newArray;
+      }
 
       function add() {
         resetFields();
@@ -200,7 +273,7 @@
       }
 
       const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
-        'purAdvancePaymentDetails': purAdvancePaymentDetailsTableRef,
+        purAdvancePaymentDetails: purAdvancePaymentDetailsTableRef,
       });
 
       async function getFormData() {
@@ -220,14 +293,22 @@
       }
 
       async function submitForm() {
-        const mainData = await getFormData();
-        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');
+		  var xTable = purAdvancePaymentDetailsTableRef.value!.getXTable();
+		  if (xTable.data.length == 0) {
+		    message.warning('请添加明细');
+		  } 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
+			  await saveOrUpdate(values, isUpdate);
+			  //关闭弹窗
+			  emit('success');
+			  
+		  }
+		  
+        
       }
       
       function setFieldsValue(values) {
@@ -247,6 +328,17 @@
         formData[key] = value;
       }
 
+      async function changeSupplier(value) {
+        var param = { id: value };
+        var result = await supplierOption(param);
+        formData.supplierName = result.records[0].name;
+        formData.payee = result.records[0].openingName;
+        formData.openingBank = result.records[0].openingBank;
+        formData.bankAccount = result.records[0].bankAccount;
+        formData.swiftCode = result.records[0].swiftCode;
+        purAdvancePaymentDetailsTable.dataSource = [];
+        formData.sourceCode = '';
+      }
 
       return {
         purAdvancePaymentDetailsTableRef,
@@ -265,6 +357,13 @@
         add,
         edit,
         formRef,
+        supplierOption,
+        changeSupplier,
+		showField,
+		handleDelete1,
+		SelectPurchaseOrderModalRef,
+        addDetailList,
+		selectOrder,
       }
     }
   });

+ 8 - 1
src/views/purchase/arrivedGoods/ArriveGoodsForm.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '项目(project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '供应商(supplier)',

+ 8 - 1
src/views/purchase/purchaseInquiryForm/PurchaseInquiryForm.data.ts

@@ -19,7 +19,14 @@ export const columns: BasicColumn[] = [
    {
     title: '询价项目(inquiry project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.inquiryProject_dictText==1){
+        return text;
+      }else if(record.inquiryProject_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '询价供应商(inquiry supplier)',

+ 1 - 1
src/views/purchase/purchaseInquiryForm/purchaseInquiryFormList.vue

@@ -21,7 +21,7 @@
                   resultField="records"
                   labelField="code"
                   valueField="id"
-                  :params="{ pageSize: -1,status:1 }"
+                  :params="{ pageSize: -1 }"
                   optionFilterProp="label"
                 />
               </a-form-item>

+ 7 - 0
src/views/purchase/purchaseOrder/PurchaseOrderForm.data.ts

@@ -25,6 +25,13 @@ export const columns: BasicColumn[] = [
     title: '项目(project)',
     align: 'center',
     dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
   },
   {
     title: '供应商(supplier)',

+ 10 - 8
src/views/purchase/purchaseOrder/components/PurchaseOrderFormForm.vue

@@ -248,6 +248,11 @@
                 <a-input v-model:value="formData.notes" AutoComplete="off" />
               </a-form-item>
             </a-col>
+			<a-col :span="12">
+			  <a-form-item label="附件(attachs)" v-bind="validateInfos.attachs" id="PurchaseOrderFormModal-attachs" name="attachs">
+			    <JUpload v-model:value="formData.attachs" />
+			  </a-form-item>
+			</a-col>
             <a-col :span="12">
               <a-form-item
                 label="收件人地址(recipient address)"
@@ -259,7 +264,7 @@
               </a-form-item>
             </a-col>
 			
-			<a-col :span="12">
+			<a-col :span="36"  style="left: -14.7%;">
 			  <!-- <a-form-item
 			    label="协议条款(agreement terms)"
 			    v-bind="validateInfos.agreementTerms"
@@ -285,11 +290,7 @@
 			  				<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="附件(attachs)" v-bind="validateInfos.attachs" id="PurchaseOrderFormModal-attachs" name="attachs">
-                <JUpload v-model:value="formData.attachs" />
-              </a-form-item>
-            </a-col>
+            
           </a-row>
         </a-form>
       </template>
@@ -318,7 +319,7 @@
           >选择供应商报价选定(select supplier quotation selection)</a-button
         >
         <a-button @click="showModal" v-auth="'purCode:pur_order:changeQuotation'"
-          type="primary" danger
+          type="primary" danger :disabled="disabled"
           style="margin-right: 1%; margin-bottom: 1%"
           >变更报价(Change quotation)</a-button
         >
@@ -764,6 +765,7 @@
         });
       }
       function addFormSaleOrder(data) {
+		  
         data.map((item) => {
           item.model = item.childModel;
           item.sourceId = item.childId;
@@ -780,7 +782,7 @@
         purOrderFormShipFormProductTable.dataSource = arrProduct;
         notAllowEdit.value = true;
 		
-		if(data[0].supplier==null || data[0].supplier==''){
+		if(data[0].supplierId==null || data[0].supplierId==''){
 			return;
 		}
         if (formData.sourceCode2.includes(data[0].billCode)) {

+ 8 - 1
src/views/purchase/purchaseOrderB2B/PurchaseOrderFormB2B.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '项目(project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '供应商(supplier)',

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

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '报价项目(quotation project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.quotationProject_dictText==1){
+        return text;
+      }else if(record.quotationProject_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '报价供应商(quotation supplier)',

+ 4 - 1
src/views/purchase/purchaseQuotationFrm/components/PurchaseQuotationFormForm.vue

@@ -179,7 +179,7 @@
             </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="请选择" dictCode="currency" disabled />
+                <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">
@@ -312,6 +312,7 @@
   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',
@@ -339,6 +340,7 @@
     },
     emits: ['success'],
     setup(props, { emit }) {
+		const { hasPermission } = usePermission();
       const loading = ref(false);
       const formRef = ref();
       var showField = ref('currency_dictText+name');
@@ -687,6 +689,7 @@
         PuechaseQuotationFormProductTable.dataSource = [...xTable];
       }
       return {
+		  hasPermission,
         PuechaseQuotationFormShipTableRef,
         PuechaseQuotationFormShipTable,
         PuechaseQuotationFormProductTableRef,

+ 8 - 1
src/views/purchase/selectionQuotationForm/SelectionQuotationForm.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '询问价项目(inquiry project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.inquiryProject_dictText==1){
+        return text;
+      }else if(record.inquiryProject_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '优先级(priority)',

+ 8 - 1
src/views/saleCode/advancePayment/advancePaymentForm.data.ts

@@ -25,7 +25,14 @@ export const columns: BasicColumn[] = [
     title: '项目(project)',
     align:"center",
     ellipsis:true,
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '订单编号(sale order number)',

+ 5 - 0
src/views/saleCode/deliveryNotice/components/deliveryNoticeForm.vue

@@ -665,6 +665,9 @@
         SelectSaleOrderModalRef.value.getTable(obj, 'delivery');
       }
       function addFormSaleOrder(data) {
+		  
+		  //由于发货单主子表备注字段均为notes,故此处赋值后清空源值(不放入子表)
+		formData.notes = data[0].notes;
         data.map((item) => {
           item.model = item.childModel;
           item.sourceId = item.childId;
@@ -672,6 +675,7 @@
           item.orderMoney = item.discountedAmount;
           item.money = item.discountedAmount;
           item.taxPrice = item.discountedPrice;
+          item.notes = '';
         });
         var xTable = deliveryDetailFormProductTableRef.value!.getXTable(); //关键代码 如果不更新 重新加载表格即可
         var arrProduct = xTable.data.concat(data);
@@ -698,6 +702,7 @@
         formData.warrantyPeriod = data[0].warrantyPeriod;
         formData.invoiceHeader = data[0].invoiceHeader;
         formData.afterId = data[0].afterId;
+       
         getShipList(data[0].headId);
       }
       function getShipList(id) {

+ 8 - 1
src/views/saleCode/deliveryNotice/delivertNoticeForm.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
     title: '项目(project)',
     align:"center",
     width:250,
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '客户(customer)',

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

@@ -134,12 +134,13 @@
                 :labelCol="formItemLayout.labelCol1"
                 :wrapperCol="formItemLayout.wrapperCol1"
               >
-                <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" @select="changeExchangeRate" disabled />
-              </a-form-item>
+                <!-- <JDictSelectTag v-model:value="formData.currency" placeholder="请选择" dictCode="currency" @select="changeExchangeRate" disabled /> -->
+                <JDictSelectTag v-model:value="formData.currency" :disabled="formData.status == '1' || !hasPermission('saleCode:sale_quotation:editBZ')" :showChooseOption='false' placeholder="请选择" dictCode="currency" @change="handleChangeCurrency" />
+			  </a-form-item>
             </a-col>
             <a-col :span="12">
               <a-form-item label="汇率(exchangeRate)" v-bind="validateInfos.exchangeRate" id="quotationFormForm-exchangeRate" name="exchangeRate">
-                <a-input-number
+                <a-input-number disabled
                   v-model:value="formData.exchangeRate"
                   placeholder="请输入"
                   allow-clear
@@ -384,7 +385,7 @@
 </template>
 
 <script lang="ts">
-  import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
+  import { defineComponent, ref, reactive, computed, toRaw, onMounted, watch } from 'vue';
   import { defHttp } from '/@/utils/http/axios';
   import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
   import {
@@ -417,6 +418,8 @@
   import { useUserStore } from '/@/store/modules/user';
   import dayjs from 'dayjs';
   import { useGlobSetting } from '/@/hooks/setting';
+  import moment from 'moment';
+  import { usePermission } from '/@/hooks/web/usePermission';
   const { domainUrl } = useGlobSetting();
   const userStore = useUserStore();
   const useForm = Form.useForm;
@@ -447,6 +450,7 @@
     },
     emits: ['success'],
     setup(props, { emit }) {
+		const { hasPermission } = usePermission();
       const baseUrl = domainUrl + '/sys/common/static/';
       const loading = ref(false);
       const formRef = ref();
@@ -523,6 +527,7 @@
         model: [{ required: true, message: '请选择机型(model)' }],
         deliveryTerms: [{ required: true, message: '请选择贸易方式(delivery terms)' }],
         deliveryDayHead: [{ required: true, message: '请选择交期(deliveryDayHead)' }],
+        exchangeRate: [{ required: true, message: '汇率不能为空(exchangeRate)' }],
       });
       const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
       const dbData = {};
@@ -560,7 +565,111 @@
         formData.saleDepartmentName = userStore.getUserInfo.orgName;
         notAllowEdit.value = false;
         linkOption.value = [];
-      }
+      };
+	  
+	  watch(() => formData.currency,
+	    async (newVal, oldVal) => {
+	  			
+	      if (newVal && newVal !== oldVal && oldVal!=null && oldVal!='') {
+	        // setExchangeRate();
+	        await handleChangeCurrency(newVal, oldVal);
+	      }
+	    },
+	    { immediate: true }
+	  );
+	  
+	   async function handleChangeCurrency(newCurrency?: string, oldCurrency?: string) {
+		  if (!newCurrency || !oldCurrency){
+		  	  			  
+		  	  			  formData.exchangeRate = '';
+		  	  				return
+		  	  		  }
+		  	  
+		  const date = moment(formData.billDate);
+		  const year = date.format('YYYY');
+		  const month = date.format('MM');
+		  
+		  // 获取旧币种汇率(原币种)与 新币种汇率(新币种),并展示新币种汇率
+		  var oldRateRes = formData.exchangeRate;
+		  var newRateRes = '1';
+		  
+		  try {
+		   
+		   try{
+			   
+			   oldRateRes = await queryRate({ year, month, currency: oldCurrency });
+			   newRateRes = await queryRate({ year, month, currency: newCurrency });
+			   
+		   } catch (err) {
+			   formData.currency = '美元';
+		       message.warning('当前币种未维护汇率,默认按照USD进行');
+			 
+		   }
+			
+		    const oldExchangeRate = parseFloat(oldRateRes || '0');
+		  	  			if(oldExchangeRate == 0){
+		  	  				formData.exchangeRate = '';
+		  	  				return
+		  	  			}
+		   
+		    const newExchangeRate = parseFloat(newRateRes || '0');
+		  	  			if(newExchangeRate == 0){
+		  	  				formData.exchangeRate = '';
+		  	  				return
+		  	  			}
+		  	  			
+		    formData.exchangeRate = isNaN(newExchangeRate) ? '' : newExchangeRate;
+		    saleQuotationFormProductTable.dataSource = saleQuotationFormProductTable.dataSource.map(item => {
+		  				
+		      const purchasePrice = item.purchasePrice;//采购单价
+		      const purchaseAmount = item.purchaseAmount;//采购金额
+		      const taxPriceOriginal = item.taxPriceOriginal;//折前单价
+		      const salePrice = item.salePrice;//折后单价
+		      const quantity = item.quantity;//数量
+		  			  
+		      if (!purchasePrice && purchasePrice!=0) return item;
+		      if (!purchaseAmount && purchaseAmount!=0) return item;
+		      if (!taxPriceOriginal && taxPriceOriginal!=0) return item;
+		      if (!salePrice && salePrice!=0) return item;
+			  
+		      // 换算逻辑:原币种金额 × 原汇率 ÷ 新汇率
+		      const purchasePriceNew = purchasePrice * oldExchangeRate / newExchangeRate;
+		      const purchaseAmountNew = purchasePriceNew * quantity;
+		      const taxPriceOriginalNew = taxPriceOriginal * oldExchangeRate / newExchangeRate;
+		      const salePriceNew = salePrice * oldExchangeRate / newExchangeRate;
+		      const taxAmount = salePriceNew * quantity;
+		      return {
+		        ...item,
+		        purchasePrice: purchasePriceNew.toFixed(4).replace(/\.?0+$/, '') || '',
+		        purchaseAmount: purchaseAmountNew.toFixed(2).replace(/\.?0+$/, '') || '',
+		        taxPriceOriginal: taxPriceOriginalNew.toFixed(4).replace(/\.?0+$/, '') || '',
+		        salePrice: salePriceNew.toFixed(4).replace(/\.?0+$/, '') || '',
+		        taxAmount: taxAmount.toFixed(2).replace(/\.?0+$/, '') || '',
+		        _needUpdate: true // 标记需要更新的行
+		      };
+		    });
+		  			
+		    // 手动触发 changeValues 计算其他字段
+		      const updatedDataSource = saleQuotationFormProductTable.dataSource;
+		      updatedDataSource.forEach((row,index) => {
+		      if (row._needUpdate) {
+		        changeValues({
+		          col: { key: 'quantity' },
+		          row: row,
+		          rowIndex: index
+		        });
+		      }
+		    });
+		  } catch (err) {
+		    console.error('汇率换算失败:', err);
+		    // formData.exchangeRate = '';
+		    // formData.currency = oldCurrency;
+		  }
+		  
+		  
+		  
+	  }
+	  
       async function changeExchangeRate() {
         if (formData.currency !== '美元') {
           var param = {
@@ -998,6 +1107,9 @@
         }
         if (prop.col.key == 'discount' && prop.row.taxPriceOriginal) {
           prop.row.salePrice = (Number(prop.row.taxPriceOriginal) * (1 - prop.row.discount / 100)).toFixed(2);
+		  if (prop.row.quantity) {
+		    prop.row.taxAmount = (prop.row.salePrice * prop.row.quantity).toFixed(2);
+		  }
         }
         //计算金额
         if (prop.col.key == 'quantity' && prop.row.salePrice && prop.row.quantity) {
@@ -1123,6 +1235,7 @@
         }
       }
       return {
+		  hasPermission,
         saleQuotationFormShipTableRef,
         saleQuotationFormShipTable,
         saleQuotationFormProductTableRef,

+ 9 - 1
src/views/saleCode/quotation/quotationForm.data.ts

@@ -26,8 +26,16 @@ export const columns: BasicColumn[] = [
     title: '报价项目(quotation project)',
     align:"center",
     width:200,
-    dataIndex: 'quotationProjectName'
+    dataIndex: 'quotationProjectName',
+    customRender:({text,record}) =>{
+      if(record.quotationProject_dictText==1){
+        return text;
+      }else if(record.quotationProject_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
+  
    {
     title: '报价客户(quotation customer)',
     align:"center",

+ 8 - 1
src/views/saleCode/receiptOrder/receiptOrderForm.data.ts

@@ -43,7 +43,14 @@ export const columns: BasicColumn[] = [
     title: '项目(project)',
     align:"center",
     ellipsis:true,
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '发票号码(invoice code)',

+ 7 - 0
src/views/saleCode/saleContract/SaleContract.data.ts

@@ -24,6 +24,13 @@ export const columns: BasicColumn[] = [
     title: '项目(Project)',
     align: 'center',
     dataIndex: 'quotationProjectName',
+    customRender:({text,record}) =>{
+      if(record.quotationProject_dictText==1){
+        return text;
+      }else if(record.quotationProject_dictText==0){
+        return text+'(停用)'
+      }
+    }
   },
   {
     title: '客户(Customer)',

+ 8 - 1
src/views/saleCode/saleInquiryForm/SaleInquiryForm.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '询价项目(inquiry project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.projectName_dictText==1){
+        return text;
+      }else if(record.projectName_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '询价客户(inquiry customer)',

+ 1 - 1
src/views/saleCode/saleInquiryForm/SaleInquiryFormList.vue

@@ -21,7 +21,7 @@
                   resultField="records"
                   labelField="code"
                   valueField="id"
-                  :params="{ pageSize: -1,status:1}"
+                  :params="{ pageSize: -1}"
                   optionFilterProp="label"
                 />
               </a-form-item>

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

@@ -232,7 +232,7 @@ export const columns: BasicColumn[] = [
    {
     title: '获取日期',
     align:"center",
-    dataIndex: 'createdTiem'
+    dataIndex: 'createdTime'
    },
    {
     title: '最后修改日期',
@@ -584,7 +584,7 @@ export const saleInterfaceItemColumns: JVxeColumn[] = [
     {
       title: 'quantity',
       key: 'quantity',
-      type: JVxeTypes.input,
+      type: JVxeTypes.inputNumber,
       width:"200px",
       placeholder: '请输入${title}',
       defaultValue:'',

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

@@ -26,6 +26,13 @@ export const columns: BasicColumn[] = [
     align: 'center',
     ellipsis: true,
     dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
   },
   {
     title: '客户订单号(customer order number)',

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

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '项目(project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '客户(customer)',

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

@@ -271,7 +271,7 @@
                 <a-input v-model:value="formData.notes" AutoComplete="off" />
               </a-form-item>
             </a-col>
-            <a-col :span="12">
+            <a-col :span="36" style="left: -12.5%;">
             <!--  <a-form-item
                 label="协议条款(agreement terms)"
                 v-bind="validateInfos.agreementTerms"

+ 8 - 1
src/views/saleCode/salesOrderB2B/SaleOrderB2BForm.data.ts

@@ -24,7 +24,14 @@ export const columns: BasicColumn[] = [
    {
     title: '项目(project)',
     align:"center",
-    dataIndex: 'projectName'
+    dataIndex: 'projectName',
+    customRender:({text,record}) =>{
+      if(record.project_dictText==1){
+        return text;
+      }else if(record.project_dictText==0){
+        return text+'(停用)'
+      }
+    }
    },
    {
     title: '客户(customer)',