浏览代码

销售报价单-bug修改

jingbb 4 月之前
父节点
当前提交
f2d672e3f9

+ 3 - 3
src/views/saleCode/quotation/components/SelectShipSModal.vue → src/views/publicComponents/SelectShipSModal.vue

@@ -9,7 +9,7 @@
       @cancel="handleCancel">
       <div>
             <!--引用表格-->
-        <BasicTable @register="registerTable" :rowSelection="rowSelection"></BasicTable>
+        <BasicTable @register="registerTable" :rowSelection="rowSelection" size="small"></BasicTable>
         </div>
       </a-modal>
 </template>
@@ -17,8 +17,8 @@
   import {ref, reactive } from 'vue';
   import {BasicTable, useTable, TableAction} from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage'
-  import {columns, searchFormSchema} from './BaseShipArchive.data';
-  import {list} from './BaseShipArchive.api';
+  import {columns, searchFormSchema} from './components/BaseShipArchive.data';
+  import {list} from './components/BaseShipArchive.api';
   import { useMessage } from '/@/hooks/web/useMessage';
   const queryParam = reactive<any>({});
   var visible = ref(false);

+ 0 - 0
src/views/saleCode/quotation/components/BaseShipArchive.api.ts → src/views/publicComponents/components/BaseShipArchive.api.ts


+ 16 - 14
src/views/saleCode/quotation/components/BaseShipArchive.data.ts → src/views/publicComponents/components/BaseShipArchive.data.ts

@@ -44,22 +44,23 @@ export const searchFormSchema: FormSchema[] = [
     labelWidth: 180,
 
    },
+   {
+    label: "船类型(ship type)",
+    field: 'shipType',
+    component: 'JSelectMultiple',
+    labelWidth: 150,
+    componentProps:{
+      dictCode:"ship_type"
+   },
+        //colProps: {span: 6},
+  },
 	{
       label: "hull number",
       field: 'hullNumber',
       component: 'Input',
       //colProps: {span: 6},
  	},
-   {
-    label: "船厂(ship factory)",
-    field: 'shipFactory',
-    component: 'JSelectMultiple',
-    labelWidth: 150,
-    componentProps:{
-      dictCode:"ship_factory"
-   },
-    //colProps: {span: 6},
- },
+   
  {
   label: "造船日期(ship date)",
   field: "shipDate",
@@ -71,15 +72,16 @@ export const searchFormSchema: FormSchema[] = [
   },
   //colProps: {span: 6},
 },
+
 {
-  label: "船类型(ship type)",
-  field: 'shipType',
+  label: "船厂(ship factory)",
+  field: 'shipFactory',
   component: 'JSelectMultiple',
   labelWidth: 180,
   componentProps:{
-    dictCode:"ship_type"
+    dictCode:"ship_factory"
  },
-      //colProps: {span: 6},
+  //colProps: {span: 6},
 },
 
 {

+ 0 - 14
src/views/saleCode/quotation/components/BaseProjectArchive.api.ts

@@ -1,14 +0,0 @@
-import {defHttp} from '/@/utils/http/axios';
-import { useMessage } from "/@/hooks/web/useMessage";
-
-const { createConfirm } = useMessage();
-
-enum Api {
-  list = '/baseCode/baseProjectArchive/list'
-}
-/**
- * 列表接口
- * @param params
- */
-export const list = (params) =>
-  defHttp.get({url: Api.list, params});

+ 0 - 84
src/views/saleCode/quotation/components/BaseProjectArchive.data.ts

@@ -1,84 +0,0 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
-import { getWeekMonthQuarterYear } from '/@/utils';
-//列表数据
-export const columns: BasicColumn[] = [
-  {
-    title: '编码(code)',
-    align:"center",
-    dataIndex: 'code'
-   },
-   {
-    title: '名称(name)',
-    align:"center",
-    dataIndex: 'name'
-   },
-  
-   {
-    title: '客户(customer)',
-    align:"center",
-    dataIndex: 'customerId_dictText'
-   },
-   {
-    title: '备注(notes)',
-    align:"center",
-    dataIndex: 'notes'
-   },
-   {
-    title: '创建时间(create time)',
-    align:"center",
-    dataIndex: 'createTime'
-   },
-   {
-    title: '创建人(create by)',
-    align:"center",
-    dataIndex: 'createBy'
-   },
-];
-//查询数据
-export const searchFormSchema: FormSchema[] = [
-	  {
-      label: "编码(code)",
-      field: 'code',
-      component: 'Input',
-      componentProps:{
-      },
-      //colProps: {span: 6},
- 	  },
-   {
-      label: "名称(name)",
-      field: 'name',
-      component: 'Input',
-        //colProps: {span: 6},
-    },
-    {
-      label: "客户(customer)",
-      field: 'customerId',
-      component: 'JDictSelectTag',
-      componentProps:{
-          dictCode: 'customer',
-      },
-      //colProps: {span: 6},
- 	  },
-     {
-      label: "创建时间(create time)",
-      field: "createTime",
-      component: 'RangePicker',
-      labelWidth: 150,
-      componentProps: {
-          valueType: 'Date',
-          showTime:true
-      },
-      //colProps: {span: 6},
-	},
-	{
-    label: "创建人(create by)",
-    field: 'createBy',
-    component: 'Input',
-    labelWidth: 120,
-    //colProps: {span: 6},
-   },
-	
-];

+ 0 - 48
src/views/saleCode/quotation/components/BaseShipArchiveAccessories.data.ts

@@ -1,48 +0,0 @@
-import {BasicColumn} from '/@/components/Table';
-import {FormSchema} from '/@/components/Table';
-import { rules} from '/@/utils/helper/validator';
-import { render } from '/@/utils/common/renderUtils';
-import { getWeekMonthQuarterYear } from '/@/utils';
-//列表数据
-export const columns: BasicColumn[] = [
-   
-   {
-    title: '配件类型(accessory type)',
-    align:"center",
-    dataIndex: 'accessoryType',
-    key: 'accessoryType'
-   },
-   {
-    title: '规格(specifications)',
-    align:"center",
-    dataIndex: 'specifications',
-    key: 'specifications'
-   },
-   {
-    title: '型号(model)',
-    align:"center",
-    dataIndex: 'model',
-    key: 'model'
-   },
-   {
-    title: '序列号(serial number)',
-    align:"center",
-    dataIndex: 'serialNumber',
-    key: 'serialNumber'
-   },
-   /* {
-    title: '备注',
-    align:"center",
-    dataIndex: 'notes',
-    key: 'notes'
-   },
-   {
-    title: '附件',
-    align:"center",
-    dataIndex: 'attachs',
-    key: 'attachs'
-   }, */
-];
-//查询数据
-export const searchFormSchema: FormSchema[] = [
-];

+ 0 - 104
src/views/saleCode/quotation/components/BaseShipArchiveAccessoriesModal.vue

@@ -1,104 +0,0 @@
-<template>
- <a-modal
-      title="配件明细(accessories details)"
-      width="70%"
-      :visible="visible"
-      :maskClosable="false"
-      switchFullscreen
-      @cancel="handleCancel">
-        <div>
-          <a-table
-                :columns="columns"
-                :row-key="record => record.id"
-                :data-source="dataSource"
-                bordered
-                size="small"
-                height="500"
-                :pagination="false"
-                :scroll="{ x: 1000, y: 500 }"
-            > 
-                <template #attachs="{ text, record,index }">
-                    <a :href="baseUrl+record.attachs">{{record.attachs}}</a>
-                </template>
-            </a-table>
-        </div>
-   </a-modal>
-</template>
-
-<script lang="ts" setup>
-    import {ref, computed, unref,reactive} from 'vue';
-    import { useGlobSetting } from '/@/hooks/setting';
-    import {defHttp} from '/@/utils/http/axios';
-    const { domainUrl } = useGlobSetting();
-    var visible = ref(false);
-    var columns = ref([
-          {
-          title: '配件类型(accessory type)',
-          align:"center",
-          dataIndex: 'accessoryType',
-          key: 'accessoryType'
-        },
-        {
-          title: '规格(specifications)',
-          align:"center",
-          dataIndex: 'specifications',
-          key: 'specifications'
-        },
-        {
-          title: '型号(model)',
-          align:"center",
-          dataIndex: 'model',
-          key: 'model'
-        },
-        {
-          title: '序列号(serial number)',
-          align:"center",
-          dataIndex: 'serialNumber',
-          key: 'serialNumber'
-        },
-        {
-          title: '备注(notes)',
-          align:"center",
-          dataIndex: 'notes',
-          key: 'notes'
-        },
-        {
-          title: '附件(attachs)',
-          align:"center",
-          dataIndex: 'attachs',
-          key: 'attachs',
-          slots: { customRender: 'attachs' },
-        },
-    ])
-    var dataSource=ref([])
-    const baseUrl = domainUrl + '/sys/common/static/';
-    function getTable(record){
-        visible.value = true
-        let params={headId:record.id}
-        defHttp.get({url:"/baseCode/baseShipArchiveAccessories/list",params}).then(res=>{
-        if(res){
-          dataSource.value = res.records
-        }
-    })
-    }
-    function handleCancel(){
-      visible.value = false;
-    }
-    defineExpose({
-      getTable
-    });
-  </script>
-
-<style lang="less" scoped>
-	/** 时间和数字输入框样式 */
-  :deep(.ant-input-number) {
-    width: 100%;
-  }
-
-  :deep(.ant-calendar-picker) {
-    width: 100%;
-  }
-  /deep/.ant-modal-body{
-    padding: 14px !important;
-  }
-</style>

+ 0 - 94
src/views/saleCode/quotation/components/SelectProjectModal.vue

@@ -1,94 +0,0 @@
-<template>
-    <a-modal
-      title="选择项目(select project)"
-      width="95%"
-      :visible="visible"
-      :maskClosable="false"
-      switchFullscreen
-      @ok = "handleOk"
-      @cancel="handleCancel">
-      <div>
-            <!--引用表格-->
-        <BasicTable @register="registerTable" :rowSelection="rowSelection"></BasicTable>
-        </div>
-      </a-modal>
-</template>
-<script lang="ts" name="baseCode-baseShipArchive" setup>
-  import {ref, reactive } from 'vue';
-  import {BasicTable, useTable, TableAction} from '/@/components/Table';
-  import { useListPage } from '/@/hooks/system/useListPage'
-  import {columns, searchFormSchema} from './BaseProjectArchive.data';
-  import {list} from './BaseProjectArchive.api';
-  import { message } from 'ant-design-vue';
-
-  const queryParam = reactive<any>({});
-  var visible = ref(false);
-  const emit = defineEmits([ 'selectProject']); //定义emit
-  //注册table数据
-  const { tableContext} = useListPage({
-      tableProps:{
-           api:list,
-           columns,
-           canResize:false,
-           formConfig: {
-              schemas: searchFormSchema,
-              autoSubmitOnEnter:true,
-              showAdvancedButton:true,
-              fieldMapToNumber: [
-              ],
-              fieldMapToTime: [
-                 ['shipDate', ['shipDate_begin', 'shipDate_end'], 'YYYY-MM-DD HH:mm:ss'],
-              ],
-            },
-           showTableSetting:false,
-           showActionColumn:false,
-           actionColumn: {
-               width: 200,
-               fixed:'right'
-            },
-            beforeFetch: (params) => {
-              return Object.assign(params, queryParam);
-            },
-      }
-  })
-
-  const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
-  
-  function handleCancel() {
-    visible.value = false;
-    selectedRowKeys.value = []
-  }
-  async function getCustom(quotationProject){
-    let params = {
-      id:quotationProject
-    }
-    var cc =[]
-    await list(params).then((res)=>{
-       cc =  res.records
-    })
-    return cc
-  }
-  function handleOk() {
-        if(selectedRowKeys.value.length!==1){
-          message.warning('请选择一条数据数据')
-        }else{
-            emit('selectProject',rowSelection.selectedRows)
-            handleCancel()
-        }  
-  }
-   function getTable(){
-    visible.value = true
-   }
-   defineExpose({
-    getTable,
-    getCustom
-  });
-
-
-</script>
-
-<style lang="less" scoped>
-  :deep(.ant-picker),:deep(.ant-input-number){
-    width: 100%;
-  }
-</style>

+ 0 - 340
src/views/saleCode/quotation/components/SelectPrpductModal.vue

@@ -1,340 +0,0 @@
-<template>
-    <a-modal
-      title="选择产品(select product)"
-      width="95%"
-      :visible="visible"
-      :maskClosable="false"
-      switchFullscreen
-      @ok = "handleOk"
-      @cancel="handleCancel">
-        <div>
-          <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
-            <div class="table-page-search-wrapper">
-                <a-form :model="queryParams" :label-col="labelCol" :wrapper-col="wrapperCol" @keyup.enter.native="searchQuery">
-                <a-row :gutter="24">
-                    <a-col :md="6" :sm="8">
-                        <a-form-item label="分类(class)">
-                            <!-- <a-input placeholder="请输入" v-model:value="queryParams.classId"></a-input> -->
-                            <JSelectInput   v-model:value="queryParams.classId"  placeholder="请选择" :options="classOption" ></JSelectInput>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="8">
-                        <a-form-item label="编码(code)">
-                            <a-input placeholder="请输入" v-model:value="queryParams.code"></a-input>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="8">
-                        <a-form-item label="中文名(Chinese name)">
-                            <a-input placeholder="请输入" v-model:value="queryParams.chineseName"></a-input>
-                        </a-form-item>
-                    </a-col>
-                    <template v-if="toggleSearchStatus">
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="英文名(English name)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.englishName"></a-input>
-                            </a-form-item>
-                        </a-col>
-                        <!-- <a-col :md="6" :sm="8">
-                            <a-form-item label="规格(specifications)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.specifications"></a-input>
-                            </a-form-item>
-                        </a-col> -->
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="型号(model)">
-                                <a-input placeholder="请输入" v-model:value="queryParams.model"></a-input>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="虚拟产品(virtual product)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                                <JDictSelectTag v-model:value="queryParams.virtualProduct" placeholder="请选择" dictCode="yes_or_no"/>
-                            </a-form-item>
-                        </a-col>
-                        <a-col :md="6" :sm="8">
-                            <a-form-item label="有害物质(harmful substances)" :label-col="labelCol1" :wrapper-col="wrapperCol1">
-                                <JDictSelectTag v-model:value="queryParams.harmfulSubstances" placeholder="请选择" dictCode="yes_or_no"/>
-                            </a-form-item>
-                        </a-col>
-                    </template>
-                    <a-col :md="6" :sm="8">
-                        <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-                            <a-button type="primary" @click="searchQuery" >查询(search)</a-button>
-                            <a-button type="primary" @click="searchReset"  style="margin-left: 8px">重置(reset)</a-button>
-                            <a @click="handleToggleSearch" style="margin-left: 8px">
-                            {{ toggleSearchStatus ? '收起' : '展开' }}
-                            <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
-                            </a>
-                        </span>
-                    </a-col>
-                </a-row>
-            </a-form>
-           </div>
-        </a-card>
-
-        <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
-            <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
-            <template #message>
-                <template v-if="selectedRowKeys.length > 0">
-                <span>已选中 {{ selectedRowKeys.length }} 条记录</span>
-                <a-divider type="vertical" />
-                <a @click="selectedRowKeys = []">清空</a>
-                </template>
-                <template v-else>
-                <span>未选中任何数据</span>
-                </template>
-            </template>
-            </a-alert>
-            <a-table
-                :columns="columns"
-                :row-key="record => record.id"
-                :data-source="dataSource"
-                bordered
-                size="small"
-                @change="handleTableChange"
-                :pagination="pagination"
-                :scroll="{ x: 2500, y: 300 }"
-                :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-            >
-            </a-table>
-        </a-card>
-      </div>
-    </a-modal>
-</template>
-<script lang="ts" setup>
-    import {ref, reactive } from 'vue';
-    import { defHttp } from '/@/utils/http/axios';
-    import { message } from 'ant-design-vue';
-    import { filterObj, getFileAccessHttpUrl } from '/@/utils/common/compUtils';
-    import { JDictSelectTag} from '/@/components/Form';
-    import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
-    const emit = defineEmits([ 'selectProduct']); //定义emit
-    let classOption = ref([])
-    var visible = ref(false)
-    const columns = [
-        {
-            title: '分类(class)',
-            dataIndex: 'classId_dictText',
-            key: 'classId_dictText',
-            align:"center"
-        },
-        {
-            title: '编码(code)',
-            dataIndex: 'code',
-            key: 'code',
-            align:"center"
-        },
-        {
-            title: '中文名(Chinese name)',
-            dataIndex: 'chineseName',
-            key: 'chineseName',
-            align:"center",
-            width:200
-        },
-        {
-            title: '英文名(English name)',
-            key: 'englishName',
-            dataIndex: 'englishName',
-            align:"center"
-        },
-        // {
-        //     title: '规格(specifications)',
-        //     key: 'specifications',
-        //     dataIndex: 'specifications',
-        //     align:"center"
-        // },
-        {
-            title: '型号(model)',
-            key: 'model',
-            dataIndex: 'model',
-            align:"center"
-        },
-        {
-            title: '计量单位(measurement unit)',
-            key: 'measurementUnit',
-            dataIndex: 'measurementUnit',
-            align:"center",
-            width:250
-        },
-        {
-            title: '虚拟产品(virtual product)',
-            key: 'virtualProduct',
-            dataIndex: 'virtualProduct',
-            align:"center",
-            customRender:function (t, r, index) {
-              if(t.text==1){
-                return '是(yes)'
-              }else if(t.text==0){
-                return '否(no)'
-              }else{
-                return ''
-              } 
-            }
-        },
-        {
-            title: '有害物质(harmful substances)',
-            key: 'harmfulSubstances',
-            dataIndex: 'harmfulSubstances',
-            align:"center",
-            width:250,
-            customRender:function (t, r, index) {
-              if(t.text==1){
-                return '是(yes)'
-              }else if(t.text==0){
-                return '否(no)'
-              }else{
-                return ''
-              } 
-            }
-        },
-    ];
-    const labelCol = ref({
-    xs: { span: 24 },
-    sm: { span: 9 },
-    });
-    const wrapperCol = ref({
-        xs: { span: 24 },
-        sm: { span: 15 },
-    });
-    const labelCol1 = ref({
-    xs: { span: 24 },
-    sm: { span: 12 },
-    });
-    const wrapperCol1 = ref({
-        xs: { span: 24 },
-        sm: { span: 12 },
-    });
-    const dataSource =ref([]);
-    let selectedRowKeys = ref([]);
-    let selectedRows = ref([]);
-    const toggleSearchStatus = ref(false);
-    const queryParams = ref({
-        classId:'',
-        code:'',
-        chineseName:'',
-        englishName:'',
-        specifications:'',
-        model:'',
-        chineseAlias:'',
-        englishAlias:'',
-        status:'',
-        virtualProduct:'',
-        harmfulSubstances:'',
-    });
-    let pagination = ref({
-      current: 1,
-      pageSize: 10,
-      total: '', // 假设总共有100条数据
-      showSizeChanger: true,
-      showQuickJumper: true,
-      showTotal: (total, range) => {
-          return range[0] + "-" + range[1] + " 共" + total + "条"
-      },
-      size:'small'
-    });
-    function loadData(){
-        let params = getQueryParams();
-        defHttp
-        .get({ url: '/baseCode/baseProductArchive/list',params}, { isTransformResponse: false })
-        .then((res) => {
-            if (res.success) {
-                dataSource.value = res.result.records;
-                pagination.value.total = res.result.total;
-                pagination.value.current = res.result.current;
-                pagination.value.pageSize = res.result.size;                
-            } else {
-                message.error(res.message);
-            }
-        })
-        .finally(() => {
-            // loading.value = false;
-        });
-    }
-    function getQueryParams(){
-        let params = Object.assign(queryParams.value);
-        params.pageNo = pagination.value.current;
-        params.pageSize = pagination.value.pageSize;
-        return filterObj(params);
-    }
-    function handleTableChange(paginations, filters, sorter){
-        pagination.value.total = paginations.total;
-        pagination.value.current = paginations.current;
-        pagination.value.pageSize = paginations.pageSize;
-        loadData()
-    };
-    function getOptiom(){
-    defHttp
-        .get({ url: 'baseCode/baseProductClass/list'}, { isTransformResponse: false })
-        .then((res) => {
-            if (res.success) {
-              classOption.value = []
-              res.result.records.forEach(element => {
-                  var obj = {
-                    label: element.name?element.name:'无名称请维护',
-                    value: element.id?element.id:''
-                  };
-                  classOption.value.push( obj)
-              });    
-            }
-        })
-        .finally(() => {
-            // loading.value = false;
-        });
-  }
-    function searchQuery(){
-        loadData();
-    }
-    function searchReset(){
-        queryParams.value = {
-            classId:'',
-            code:'',
-            chineseName:'',
-            englishName:'',
-            specifications:'',
-            model:'',
-            chineseAlias:'',
-            englishAlias:'',
-            status:'',
-            virtualProduct:'',
-            harmfulSubstances:'',
-        }
-        pagination.value.current =1;
-        pagination.value.pageSize = 10; 
-        loadData();
-    }
-    function handleToggleSearch(){
-        toggleSearchStatus.value = !toggleSearchStatus.value;
-    }
-    function onSelectChange(keys,rows){
-        selectedRowKeys.value = keys
-        selectedRows.value = rows
-    }
-    function handleOk(){
-      if(selectedRowKeys.value.length==0){
-        message.error('请勾选数据');
-      }else{
-        emit('selectProduct', selectedRows.value)
-        handleCancel()
-      }
-    }
-    function handleCancel(){
-      visible.value = false
-      selectedRowKeys.value = []
-      selectedRows.value=[]
-    }
-    function getTable(){
-        visible.value = true
-        loadData()
-        getOptiom()
-    }
-    defineExpose({
-      getTable
-    });
-</script>
-<style scoped lang="less">
-/deep/.ant-form-item{
-    margin-bottom: 8px !important;
-}
-// /deep/.ant-table-wrapper .ant-table-thead > tr > th, .ant-table-wrapper .ant-table-thead > tr > td{
-//     padding: 8px !important;
-// }
-
-</style>

+ 14 - 2
src/views/saleCode/quotation/components/SelectSupplierQuotation.vue

@@ -268,7 +268,7 @@
         if(fatherProjectName.value&&fatherProjectName.value!==''){
             queryParams.value.projectName = fatherProjectName.value
         }else{
-            queryParams.value.projectName = ''
+            queryParams.value.projectName = params.projectName
         }
         return filterObj(params);
     }
@@ -343,10 +343,22 @@
       visible.value = false
       selectedRowKeys.value = []
       selectedRows.value=[]
+      queryParams.value = {
+            billCode:'',
+            billDate:'',
+            quotationSuppiler:'',
+            priority:'',
+            productionClass:'',
+            model:'',
+            maker:'',
+            productionCode:'',
+            quotationProject:'',
+            projectName:''
+        }
     }
     function getTable(formData){
         visible.value = true
-        if(formData.projectName&&formData.projectName!==''){
+        if(formData.quotationProjectName&&formData.quotationProjectName!==''){
             fatherProjectName.value = formData.quotationProjectName
         }else{
             fatherProjectName.value = ''

+ 55 - 28
src/views/saleCode/quotation/components/quotationFormForm.vue

@@ -16,7 +16,7 @@
 						</a-col>
 						<a-col :span="12">
 							<a-form-item label="报价项目(quotation project)" v-bind="validateInfos.quotationProjectName" id="quotationFormForm-quotationProjectName" name="quotationProjectName">
-								<a-input-search v-model:value="formData.quotationProjectName" placeholder="请输入报价项目(inquiry project)"  allow-clear enter-button="Search" :disabled="saleQuotationFormProductTable.dataSource.length!==0" @search="onSearchProject"></a-input-search>
+								<a-input-search v-model:value="formData.quotationProjectName" placeholder="请输入报价项目(inquiry project)"  allow-clear enter-button="Search" :disabled="notAllowEdit" @search="onSearchProject"></a-input-search>
 							</a-form-item>
 						</a-col>
 						<a-col :span="12">
@@ -168,7 +168,7 @@
       </a-tab-pane>
     </a-tabs>
     <SelectShipSModal ref="SelectShipSModalRef" @select="addShip"></SelectShipSModal>
-    <BaseShipArchiveAccessoriesList ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesList>
+    <BaseShipArchiveAccessoriesModal ref="BaseShipArchiveAccessoriesListRef"></BaseShipArchiveAccessoriesModal>
     <SelectPrpductModal ref="SelectPrpductModalRef" @selectProduct="addProduct"></SelectPrpductModal>
     <SelectProjectModal ref="SelectProjectModalRef" @selectProject="addProject"></SelectProjectModal>
     <ViewHistoryQuotationModal ref="ViewHistoryQuotationModalRef" ></ViewHistoryQuotationModal>
@@ -183,17 +183,17 @@
   import { querysaleQuotationFormShipListByMainId,querysaleVersonFormShipListByMainId,querySaleQuotationFormProductListByMainId, querySaleVersonProductListByMainId,queryDataById, saveOrUpdate,HistoryQuotation,queryVersonHistoryById } from '../quotationForm.api';
   import { JVxeTable } from '/@/components/jeecg/JVxeTable';
   import {saleQuotationFormShipColumns, saleQuotationFormProductColumns} from '../quotationForm.data';
-  import SelectShipSModal from './SelectShipSModal.vue';
-  import BaseShipArchiveAccessoriesList from './BaseShipArchiveAccessoriesModal.vue';
-  import SelectPrpductModal from './SelectPrpductModal.vue';
-  import SelectProjectModal from './SelectProjectModal.vue';
+  import SelectShipSModal from '../../../publicComponents/SelectShipSModal.vue';
+  import BaseShipArchiveAccessoriesModal from '../../../publicComponents/BaseShipArchiveAccessoriesModal.vue';
+  import SelectPrpductModal from '../../../publicComponents/SelectPrpductModal.vue';
+  import SelectProjectModal from '../../../publicComponents/SelectProjectModal.vue';
   import SelectSupplierQuotation from './SelectSupplierQuotation.vue';
   import ViewHistoryQuotationModal from './ViewHistoryQuotationModal.vue';
   import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
   import JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
   import { JDictSelectTag,JSelectMultiple} from '/@/components/Form';
   import JSelectInput from '/@/components/Form/src/jeecg/components/JSelectInput.vue';
-  import { Form } from 'ant-design-vue';
+  import { Form,message } from 'ant-design-vue';
   import { useUserStore } from '/@/store/modules/user';
   import moment from 'moment';
   import { useGlobSetting } from '/@/hooks/setting';
@@ -206,7 +206,7 @@
       JVxeTable,
 			JFormContainer,
       SelectShipSModal,
-      BaseShipArchiveAccessoriesList,
+      BaseShipArchiveAccessoriesModal,
       SelectPrpductModal,
       JUpload,
       SelectProjectModal,
@@ -249,6 +249,7 @@
       var SelectShipSModalRef = ref();
       var BaseShipArchiveAccessoriesListRef = ref();
       const activeKey = ref('saleQuotationFormShip');
+      var notAllowEdit = ref(false);
       var classOption = ref([]);
       var customerOption =ref([]);
       const formData = reactive<Record<string, any>>({
@@ -334,7 +335,7 @@
         getCustomerOptions()
         quotationPeriod.value[0]=formData.quotationPeriodBegin?moment(formData.quotationPeriodBegin):''
         quotationPeriod.value[1]=formData.quotationPeriodEnd?moment(formData.quotationPeriodEnd):''
-        
+        notAllowEdit.value=true
       }
       //获取主表
       async function queryMainData(id) {
@@ -372,15 +373,19 @@
       }
       //保存
       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
-        const isRevise = values.status=='1' ? true : false
-        await saveOrUpdate(values, isUpdate,isRevise);
-        //关闭弹窗
-        emit('success');
+        if(formData.sourceCode==''){
+          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
+          const isRevise = values.status=='1' ? true : false
+          await saveOrUpdate(values, isUpdate,isRevise);
+          //关闭弹窗
+          emit('success');
+        }        
       }
       
       function setFieldsValue(values) {
@@ -410,6 +415,21 @@
         var newArray = [...saleQuotationFormProductTable.dataSource]
         newArray.splice(prop.rowIndex, 1)
         saleQuotationFormProductTable.dataSource = newArray  
+        if( saleQuotationFormProductTable.dataSource.length!==0){
+          var arr = []
+          saleQuotationFormProductTable.dataSource.map(item=>{
+            if(item.sourceId){
+              arr.push(item.sourceId)
+            } 
+          })
+          if(arr.length==0){
+            formData.sourceCode=''
+            notAllowEdit.value=false
+          }
+        }else{
+           formData.sourceCode=''
+           notAllowEdit.value=false
+        }
       }
       //查询船
       function selectShip(){
@@ -435,15 +455,20 @@
       }
       //选择项目
       function addProject(data) {
-        formData.quotationProject = data[0].id
-        formData.quotationProjectName = data[0].name
-        formData.quotationCustomer =data[0].customerId
-        formData.quotationCustomerName =data[0].customerId_dictText
-        customerOption.value.map(item=>{
-          if(item.value==data[0].customerId){
-            formData.priority =item.priority
-          }
-        })
+        if(data.length==0){
+          formData.quotationProject = 
+          formData.quotationProjectName = ''
+        }else{
+          formData.quotationProject = data[0].id
+          formData.quotationProjectName = data[0].name
+          formData.quotationCustomer =data[0].customerId
+          formData.quotationCustomerName =data[0].customerId_dictText
+          customerOption.value.map(item=>{
+            if(item.value==data[0].customerId){
+              formData.priority =item.priority
+            }
+          })
+        }
       }
       //获取客户列表
       function getCustomerOptions(){
@@ -555,6 +580,7 @@
           item.supplierCurrency = item.currency
         })
         saleQuotationFormProductTable.dataSource=arrProduct     
+        notAllowEdit.value=true
         formData.quotationProject = data[0].quotationProject
         formData.quotationProjectName = data[0].projectName
         formData.sourceCode = data[0].billCode
@@ -613,7 +639,8 @@
         baseUrl,
         VersionDetail,
         queryVersonHistoryData,
-        addProductFromSupplier
+        addProductFromSupplier,
+        notAllowEdit
       }
     }
   });