Forráskód Böngészése

销售报价历史价格

yuansh 1 hónapja
szülő
commit
ad6650b893

+ 2 - 1
src/router/routes/modules/dashboard.ts

@@ -7,7 +7,8 @@ const dashboard: AppRouteModule = {
   path: '/dashboard',
   name: 'Dashboard',
   component: LAYOUT,
-  redirect: '/dashboard/analysis',
+  // redirect: '/dashboard/analysis',
+  redirect: '/dashboard/workbench',
   meta: {
     orderNo: 10,
     icon: 'ion:grid-outline',

+ 31 - 20
src/views/saleCode/quotation/components/ViewHistoryQuotationModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     title="历史报价查看(view historical quotations)"
-    width="55%"
+    width="70%"
     :visible="visible"
     :maskClosable="false"
     switchFullscreen
@@ -11,7 +11,7 @@
       </template>
       <div>
         <a-card  :body-style="{ padding: '10px' }" :bordered="false" style="margin: 10px;">
-            <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
+            <!-- <a-alert type="info" show-icon class="alert" style="margin-bottom: 8px">
             <template #message>
                 <template v-if="selectedRowKeys.length > 0">
                 <span>已选中 {{ selectedRowKeys.length }} 条记录</span>
@@ -22,7 +22,7 @@
                 <span>未选中任何数据</span>
                 </template>
             </template>
-            </a-alert>
+            </a-alert> -->
             <a-table
                 :columns="columns"
                 :row-key="record => record.id"
@@ -32,7 +32,6 @@
                 @change="handleTableChange"
                 :pagination="pagination"
                 :scroll="{ x: 1000, y: 300 }"
-                :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
             >
             </a-table>
         </a-card>
@@ -51,22 +50,24 @@
   const columns = [
       {
           title: '项目号(project code)',
-          dataIndex: 'projectCode',
-          key: 'projectCode',
-          align:"center"
+          dataIndex: 'quotationProjectName',
+          key: 'quotationProjectName',
+          align:"center",
+          width:150
       },
       {
           title: '报价时间(quotation date)',
-          dataIndex: 'quotationDate',
-          key: 'quotationDate',
-          align:"center"
+          dataIndex: 'billDate',
+          key: 'billDate',
+          align:"center",
+          width:150
       },
       {
           title: '价格(price)',
-          dataIndex: 'price',
-          key: 'price',
+          dataIndex: 'saleAmount',
+          key: 'saleAmount',
           align:"center",
-          width:200
+          width:100
       },
   ];
   const dataSource =ref([]);
@@ -83,15 +84,24 @@
     },
     size:'small'
   });
-  function loadData(){
-     
-  }
+  
+  function loadData(quotationCustomer,productId){
+     let params={quotationCustomer:quotationCustomer,productId:productId}
+     defHttp.get({url:"/saleCode/saleQuotation/queryHisByInfo",params}).then(res=>{
+       console.log("ssssssssssssss");
+       console.log(res);
+       console.log(res.result);
+         if(res){
+           dataSource.value = res
+         }
+     })
+  };
 
   function handleTableChange(paginations, filters, sorter){
       pagination.value.total = paginations.total;
       pagination.value.current = paginations.current;
       pagination.value.pageSize = paginations.pageSize;
-      loadData()
+      // loadData()
   };
   function onSelectChange(keys,rows){
       selectedRowKeys.value = keys
@@ -102,9 +112,10 @@
     selectedRowKeys.value = []
     selectedRows.value=[]
   }
-  function getTable(){
+  function getTable(quotationCustomer,productId){
+    console.log("sssssssssssssssssssaaaaaaaaaaaaaa");
       visible.value = true
-      loadData()
+      loadData(quotationCustomer,productId)
   }
   defineExpose({
     getTable
@@ -118,4 +129,4 @@
 //     padding: 8px !important;
 // }
 
-</style>
+</style>

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

@@ -335,7 +335,8 @@
           @value-change="changeValues"
         >
           <template #lastPrice="props">
-            <a @click="viewHistory">{{ props.row.lastPrice }}</a>
+            <!-- <a @click="viewHistory(props.row.productId)">{{ props.row.lastPrice }}</a> -->
+            <a @click="viewHistory(props.row.productId)">查看</a>
           </template>
           <template #action="props">
             <a-popconfirm title="确定删除吗?" @confirm="handleDelete1(props)" v-if="!(formData.id !== '' && formData.status == '1') && !disabled">
@@ -832,8 +833,10 @@
         }
       }
       //查看上次报价
-      function viewHistory() {
-        ViewHistoryQuotationModalRef.value.getTable();
+      function viewHistory(id) {
+        // console.log("sssssssssssssss"+formData.quotationCustomer);
+        // console.log("sssssssssssssss"+id);
+        ViewHistoryQuotationModalRef.value.getTable(formData.quotationCustomer,id);
       }
       //查看版本详情
       async function VersionDetail(record) {

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

@@ -356,6 +356,7 @@ export const saleQuotationFormProductColumns: JVxeColumn[] = [
       placeholder: '请输入${title}',
       width:"200px",
       defaultValue:'',
+      slotName: 'salePrice',
       
     },
     {
@@ -364,7 +365,7 @@ export const saleQuotationFormProductColumns: JVxeColumn[] = [
       type: JVxeTypes.slot,
       placeholder: '请输入${title}',
       width:"200px",
-      defaultValue:'',
+      defaultValue:'查看',
       slotName: 'lastPrice',
     },
     {