Ver Fonte

招标书

jingbb há 6 horas atrás
pai
commit
edac9c874c

+ 32 - 0
src/views/saleCode/rfp/SaleRfp.api.ts

@@ -8,7 +8,9 @@ enum Api {
   save='/saleCode/saleRfp/add',
   edit='/saleCode/saleRfp/edit',
   deleteOne = '/saleCode/saleRfp/delete',
+  submitBatch = '/saleCode/saleRfp/submitBatch',
   deleteBatch = '/saleCode/saleRfp/deleteBatch',
+  cancelSubmitBatch = '/saleCode/saleRfp/returnSubmitBatch',
   importExcel = '/saleCode/saleRfp/importExcel',
   exportXls = '/saleCode/saleRfp/exportXls',
 }
@@ -36,6 +38,36 @@ export const deleteOne = (params,handleSuccess) => {
     handleSuccess();
   });
 }
+// 提交
+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();
+      });
+    }
+  });
+}
 /**
  * 批量删除
  * @param params

+ 182 - 119
src/views/saleCode/rfp/SaleRfp.data.ts

@@ -3,15 +3,19 @@ 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';
+import {ref,onMounted} from 'vue';
+var customerOption = ref([])
+var projectOption = ref([])
 //列表数据
 export const columns: BasicColumn[] = [
-   {
-    title: '状态(1-启用,0-停用)',
+    {
+    title: '单据编码(bill code)',
     align:"center",
-    dataIndex: 'status'
+    dataIndex: 'billCode'
    },
    {
-    title: '单据日期',
+    title: '单据日期(bill date)',
     align:"center",
     dataIndex: 'billDate',
     customRender:({text}) =>{
@@ -19,171 +23,176 @@ export const columns: BasicColumn[] = [
       return text;
     },
    },
+   
    {
-    title: '单据编码',
-    align:"center",
-    dataIndex: 'billCode'
-   },
-   {
-    title: '项目',
+    title: '项目(project)',
     align:"center",
     dataIndex: 'projectId'
    },
    {
-    title: '客户',
+    title: '客户(customer)',
     align:"center",
     dataIndex: 'customerId'
    },
    {
-    title: '采购方式',
+    title: '采购方式(procurement method)',
     align:"center",
     dataIndex: 'procurementMethod'
    },
    {
-    title: '招标项目号',
+    title: '招标项目号(tender code)',
     align:"center",
     dataIndex: 'tenderCode'
    },
    {
-    title: '招标项目名称',
+    title: '招标项目名称(tender name)',
     align:"center",
     dataIndex: 'tenderName'
    },
    {
-    title: '包号',
-    align:"center",
-    dataIndex: 'packetNumber'
-   },
-   {
-    title: '投标时间',
+    title: '投标时间(bid Time)',
     align:"center",
     dataIndex: 'bidTime'
    },
    {
-    title: '开标时间',
+    title: '开标时间(opening time)',
     align:"center",
     dataIndex: 'openingTime'
    },
    {
-    title: '项目总价',
+    title: '项目总价(total money)',
     align:"center",
     dataIndex: 'totalMoney'
    },
    {
-    title: '投标结果',
+    title: '投标结果(tender result)',
     align:"center",
     dataIndex: 'tenderResult'
    },
    {
-    title: '中标方',
-    align:"center",
-    dataIndex: 'winningBidder'
-   },
-   {
-    title: '中标价',
-    align:"center",
-    dataIndex: 'bidPrice'
-   },
-   {
-    title: '参与家数',
-    align:"center",
-    dataIndex: 'households'
-   },
-   {
-    title: '备注',
+    title: '备注(notes)',
     align:"center",
     dataIndex: 'notes'
    },
    {
-    title: '附件',
-    align:"center",
-    dataIndex: 'attachs'
-   },
-   {
-    title: '提交(0未提交,1已提交)',
+    title: '提交(submit)',
     align:"center",
-    dataIndex: 'submit'
+    dataIndex: 'submit',
+    customRender:function (t, r, index) {
+      if(t.text==1){
+        return '是(yes)'
+      }else if(t.text==0){
+        return '否(no)'
+      }
+    }
    },
 ];
 //查询数据
 export const searchFormSchema: FormSchema[] = [
 	{
-      label: "单据编码",
+      label: "单据编码(bill code)",
       field: 'billCode',
       component: 'Input',
+      labelWidth:150
       //colProps: {span: 6},
  	},
+	
 	{
-      label: "项目",
-      field: 'projectId',
-      component: 'Input',
-      //colProps: {span: 6},
- 	},
-	{
-      label: "客户",
+      label: "客户(customer)",
       field: 'customerId',
-      component: 'Input',
+      labelWidth:150,
+      component: 'JSelectInput',
+      componentProps:{
+        options:customerOption
+      },
+
       //colProps: {span: 6},
  	},
+  {
+    label: "投标结果(tender result)",
+    field: 'tenderResult',
+    component: 'JSelectMultiple',
+    componentProps:{
+      dictCode:"tender_result" 
+    },
+    labelWidth:180
+    //colProps: {span: 6},
+  },
 	{
-      label: "招标项目号",
+      label: "招标项目号(tender code)",
       field: 'tenderCode',
       component: 'Input',
+      labelWidth:200,
       //colProps: {span: 6},
  	},
-	{
-      label: "招标项目名称",
-      field: 'tenderName',
-      component: 'Input',
-      //colProps: {span: 6},
- 	},
-     {
-      label: "投标时间",
-      field: "bidTime",
-      component: 'RangePicker',
-      componentProps: {
-          valueType: 'Date',
-          showTime:true
-      },
+  {
+    label: "项目(project)",
+    field: 'projectId',
+    component: 'JSelectInput',
+    labelWidth:150,
+    componentProps:{
+      options:projectOption
+    },
+    //colProps: {span: 6},
+  },
+	
+ {
+    label: "投标时间(bid Time)",
+    field: "bidTime",
+    component: 'RangePicker',
+    labelWidth:150,
+    componentProps: {
+      valueType: 'Date',
+      showTime:true
+    },
       //colProps: {span: 6},
 	},
-     {
-      label: "开标时间",
-      field: "openingTime",
-      component: 'RangePicker',
-      componentProps: {
-          valueType: 'Date',
-          showTime:true
-      },
+  {
+    label: "开标时间(opening time)",
+    field: "openingTime",
+    component: 'RangePicker',
+    labelWidth:180,
+    componentProps: {
+      valueType: 'Date',
+      showTime:true
+    },
       //colProps: {span: 6},
 	},
 	{
-      label: "投标结果",
-      field: 'tenderResult',
-      component: 'InputNumber',
-      //colProps: {span: 6},
- 	},
+    label: "招标项目名称(tender name)",
+    field: 'tenderName',
+    component: 'Input',
+    labelWidth:200
+    //colProps: {span: 6},
+ },
+  {
+    label: "备注(notes)",
+    field: 'tenderCode',
+    component: 'Input',
+    labelWidth:150
+    //colProps: {span: 6},
+  },
 	{
-      label: "提交(0未提交,1已提交)",
+      label: "提交(submit)",
       field: 'submit',
-      component: 'InputNumber',
+      component: 'JSelectMultiple',
+      labelWidth:150,
+      componentProps:{
+        dictCode:"yes_or_no" 
+      },
       //colProps: {span: 6},
  	},
 ];
 //表单数据
 export const formSchema: FormSchema[] = [
   {
-    label: '状态(1-启用,0-停用)',
-    field: 'status',
-    component: 'InputNumber',
-  },
-  {
-    label: '单据日期',
+    label: '单据日期(bill date)',
     field: 'billDate',
     component: 'DatePicker',
     componentProps: {
       valueFormat: 'YYYY-MM-DD'
     },
+    labelWidth:150,
     dynamicRules: ({model,schema}) => {
           return [
                  { required: true, message: '请输入单据日期!'},
@@ -191,14 +200,19 @@ export const formSchema: FormSchema[] = [
      },
   },
   {
-    label: '单据编码',
+    label: '单据编码(bill code)',
     field: 'billCode',
     component: 'Input',
+    labelWidth:220,
   },
   {
-    label: '项目',
+    label: '项目(project)',
     field: 'projectId',
-    component: 'Input',
+    component: 'JSelectInput',
+    componentProps:{
+      options:projectOption
+    },
+    labelWidth:150,
     dynamicRules: ({model,schema}) => {
           return [
                  { required: true, message: '请输入项目!'},
@@ -206,43 +220,55 @@ export const formSchema: FormSchema[] = [
      },
   },
   {
-    label: '客户',
-    field: 'customerId',
-    component: 'Input',
+    label: '采购方式(procurement method)',
+    field: 'procurementMethod',
+    component: 'JDictSelectTag',
+    componentProps:{
+      dictCode:"procurement_method"
+    },
+    labelWidth:220,
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请输入客户!'},
+                 { required: true, message: '请输入采购方式!'},
           ];
      },
   },
   {
-    label: '采购方式',
-    field: 'procurementMethod',
-    component: 'InputNumber',
+    label: '客户(customer)',
+    field: 'customerId',
+    component: 'JSelectInput',
+    componentProps:{
+      options:customerOption
+    },
+    labelWidth:150,
     dynamicRules: ({model,schema}) => {
           return [
-                 { required: true, message: '请输入采购方式!'},
+                 { required: true, message: '请输入客户!'},
           ];
      },
   },
   {
-    label: '招标项目号',
+    label: '招标项目号(tender code)',
     field: 'tenderCode',
     component: 'Input',
+    labelWidth:220,
   },
   {
-    label: '招标项目名称',
-    field: 'tenderName',
+    label: '包号(packet number)',
+    field: 'packetNumber',
+    labelWidth:150,
     component: 'Input',
   },
   {
-    label: '包号',
-    field: 'packetNumber',
+    label: '招标项目名称(tender name)',
+    field: 'tenderName',
     component: 'Input',
+    labelWidth:220,
   },
   {
-    label: '投标时间',
+    label: '投标时间(bid Time)',
     field: 'bidTime',
+    labelWidth:150,
     component: 'DatePicker',
     componentProps: {
        showTime: true,
@@ -250,8 +276,9 @@ export const formSchema: FormSchema[] = [
      },
   },
   {
-    label: '开标时间',
+    label: '开标时间(opening time)',
     field: 'openingTime',
+    labelWidth:220,
     component: 'DatePicker',
     componentProps: {
        showTime: true,
@@ -259,39 +286,49 @@ export const formSchema: FormSchema[] = [
      },
   },
   {
-    label: '项目总价',
+    label: '项目总价(total money)',
+    labelWidth:150,
     field: 'totalMoney',
     component: 'InputNumber',
   },
   {
-    label: '投标结果',
+    label: '投标结果(tender result)',
     field: 'tenderResult',
-    component: 'InputNumber',
+    labelWidth:220,
+    component: 'JDictSelectTag',
+    componentProps:{
+      dictCode:"tender_result" 
+    },
   },
   {
-    label: '中标方',
+    label: '中标方(winning bidder)',
     field: 'winningBidder',
+    labelWidth:150,
     component: 'Input',
   },
   {
-    label: '中标价',
+    label: '中标价(bid price)',
     field: 'bidPrice',
+    labelWidth:220,
     component: 'InputNumber',
   },
   {
-    label: '参与家数',
+    label: '参与家数(households)',
     field: 'households',
+    labelWidth:150,
     component: 'Input',
   },
   {
-    label: '备注',
+    label: '备注(notes)',
     field: 'notes',
+    labelWidth:220,
     component: 'Input',
   },
   {
-    label: '附件',
+    label: '附件(attachs)',
     field: 'attachs',
-    component: 'Input',
+    labelWidth:150,
+    component: 'JUpload',
   },
 	// TODO 主键隐藏字段,目前写死为ID
 	{
@@ -332,4 +369,30 @@ export const superQuerySchema = {
 export function getBpmFormSchema(_formData): FormSchema[]{
   // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
   return formSchema;
-}
+}
+export function getCustomerOptions(){
+  let params = {pageSize:'-1'}
+  defHttp.get({url:'/cuspCode/cuspCustomerProfile/list',params}, { isTransformResponse: false }).then(res=>{
+    if(res){
+      res.result.records.forEach(item=>{
+        customerOption.value.push({
+          label: item.name,
+          value: item.id
+        })
+      })
+    }
+  })
+}
+export function getProjectOptions(){
+  let params = {pageSize:'-1'}
+  defHttp.get({url:'/baseCode/baseProjectArchive/list',params}, { isTransformResponse: false }).then(res=>{
+    if(res){
+      res.result.records.forEach(item=>{
+        projectOption.value.push({
+          label: item.name,
+          value: item.id
+        })
+      })
+    }
+  })
+}

+ 50 - 38
src/views/saleCode/rfp/SaleRfpList.vue

@@ -1,18 +1,19 @@
 <template>
   <div>
     <!--引用表格-->
-   <BasicTable @register="registerTable" :rowSelection="rowSelection">
+   <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small">
      <!--插槽:table标题-->
       <template #tableTitle>
-          <a-button type="primary" v-auth="'saleCode:sale_rfp:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
-          <a-button  type="primary" v-auth="'saleCode:sale_rfp:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
-          <j-upload-button type="primary" v-auth="'saleCode:sale_rfp:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
+          <a-button type="primary" v-auth="'saleCode:sale_rfp:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增(add)</a-button>
+          <a-button  type="primary" v-auth="'saleCode:sale_rfp:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出(export)</a-button>
+          <a-button  type="primary" v-auth="'saleCode:sale_rfp:exportXls'" preIcon="ant-design:export-outlined" @click="submit"> 提交(submit)</a-button>
+          <a-button  type="primary" v-auth="'saleCode:sale_rfp:exportXls'" preIcon="ant-design:export-outlined" @click="cancelSubmission"> 取消提交(cancelSubmit)</a-button>
           <a-dropdown v-if="selectedRowKeys.length > 0">
               <template #overlay>
                 <a-menu>
                   <a-menu-item key="1" @click="batchHandleDelete">
                     <Icon icon="ant-design:delete-outlined"></Icon>
-                    删除
+                    删除(delete)
                   </a-menu-item>
                 </a-menu>
               </template>
@@ -20,8 +21,6 @@
                 <Icon icon="mdi:chevron-down"></Icon>
               </a-button>
         </a-dropdown>
-        <!-- 高级查询 -->
-        <super-query :config="superQueryConfig" @search="handleSuperQuery" />
       </template>
        <!--操作栏-->
       <template #action="{ record }">
@@ -37,13 +36,14 @@
 </template>
 
 <script lang="ts" name="saleCode-saleRfp" setup>
-  import {ref, reactive, computed, unref} from 'vue';
+  import {ref, reactive, computed, unref,onMounted} from 'vue';
   import {BasicTable, useTable, TableAction} from '/@/components/Table';
   import {useModal} from '/@/components/Modal';
   import { useListPage } from '/@/hooks/system/useListPage'
   import SaleRfpModal from './components/SaleRfpModal.vue'
-  import {columns, searchFormSchema, superQuerySchema} from './SaleRfp.data';
-  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './SaleRfp.api';
+  import { message } from 'ant-design-vue';
+  import {columns, searchFormSchema, superQuerySchema,getCustomerOptions,getProjectOptions} from './SaleRfp.data';
+  import {list, deleteOne, batchDelete, getImportUrl,getExportUrl,batchSubmit,cancelBatchSubmit} from './SaleRfp.api';
   import { downloadFile } from '/@/utils/common/renderUtils';
   import { useUserStore } from '/@/store/modules/user';
   const queryParam = reactive<any>({});
@@ -71,7 +71,7 @@
               ],
             },
            actionColumn: {
-               width: 120,
+               width: 200,
                fixed:'right'
             },
             beforeFetch: (params) => {
@@ -91,18 +91,10 @@
 
   const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
 
-  // 高级查询配置
-  const superQueryConfig = reactive(superQuerySchema);
-
-  /**
-   * 高级查询事件
-   */
-  function handleSuperQuery(params) {
-    Object.keys(params).map((k) => {
-      queryParam[k] = params[k];
-    });
-    reload();
-  }
+  onMounted(() => {
+    getProjectOptions()
+    getCustomerOptions()
+  })
    /**
     * 新增事件
     */
@@ -156,32 +148,52 @@
   function getTableAction(record){
        return [
          {
-           label: '编辑',
+           label: '编辑(edit)',
            onClick: handleEdit.bind(null, record),
-           auth: 'saleCode:sale_rfp:edit'
-         }
-       ]
-   }
-     /**
-        * 下拉操作栏
-        */
-  function getDropDownAction(record){
-       return [
+           auth: 'saleCode:sale_rfp:edit',
+           ifShow: record.submit=='0'
+         },
          {
-           label: '详情',
+           label: '详情(detail)',
            onClick: handleDetail.bind(null, record),
-         }, {
-           label: '删除',
+            ifShow: record.submit=='1'
+         },
+         {
+           label: '删除(delete)',
            popConfirm: {
              title: '是否确认删除',
              confirm: handleDelete.bind(null, record),
              placement: 'topLeft',
            },
-           auth: 'saleCode:sale_rfp:delete'
+           auth: 'saleCode:sale_rfp:delete',
+           ifShow: record.submit==0
          }
        ]
    }
-
+     /**
+        * 下拉操作栏
+        */
+  function getDropDownAction(record){
+       return [
+          
+       ]
+   }
+   function submit(){
+    if(selectedRowKeys.value.length==0){
+      message.warning('请选择要提交的数据')
+    }else{
+      var ids = selectedRowKeys.value.join(',')
+      batchSubmit({ids: ids},handleSuccess);
+    }
+  }
+  function cancelSubmission(){
+    if(selectedRowKeys.value.length==0){
+      message.warning('请选择要提交的数据')
+    }else{
+      var ids = selectedRowKeys.value.join(',')
+      cancelBatchSubmit({ids: ids},handleSuccess);
+    }
+  }
 
 </script>
 

+ 1 - 1
src/views/saleCode/rfp/components/SaleRfpModal.vue

@@ -1,5 +1,5 @@
 <template>
-  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="896" @ok="handleSubmit">
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" width="95%" @ok="handleSubmit">
       <BasicForm @register="registerForm" name="SaleRfpForm" />
   </BasicModal>
 </template>