Browse Source

出货开票预测管理,项目项目预测管理、销售预测设置调整

qymljy 2 years ago
parent
commit
067ce0dab4

+ 18 - 2
src/HDrpManagement/invoicePredictionManage/details/index.vue

@@ -2,7 +2,7 @@
   <div>
     <newDetails ref="newDetails" :titleText="mainData.title" :mainAreaData="mainAreaData" idname="sa_salesforecastbillid" :editData="mainData" :tabs="['订单','项目','客户']">
       <template #bottomLeft>
-        <div style="height: calc(100vh - 180px)">
+        <div>
           <div style="display: flex;justify-content: space-between;">
             <div style="vertical-align: middle;line-height: 30px;float: left">预测单汇总</div>
             <div style="float: right">
@@ -175,6 +175,8 @@ export default {
         "content": {
         }
       },
+      screenWidth: 0, // 存储当前屏幕的宽度
+      multipleSize: 0, // 根据屏幕宽度计算得出的值
     }
   },
   methods:{
@@ -378,10 +380,24 @@ export default {
       this.param.content.dataid = ''
       this.param.content.isonlydep =this.isDepment? '1':'0'
       this.listData()
-    }
+    },
+    handleResize() {
+      // 更新屏幕宽度
+      this.screenWidth = window.innerWidth;
+    },
   },
   mounted() {
     this.queryMainData()
+    // 监听窗口大小变化
+    window.addEventListener("resize", this.handleResize);
+    // 初始化屏幕宽度
+    this.screenWidth = window.innerWidth;
+  },
+  watch: {
+    screenWidth(newWidth) {
+      // 根据新的屏幕宽度计算 multipleSize 属性的值
+      this.multipleSize = newWidth;
+    },
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).invoiceManageTotal.tablecols

+ 54 - 45
src/HDrpManagement/invoicePredictionManage/details/modules/order.vue

@@ -1,12 +1,12 @@
 <template>
-  <div style="height: calc(100vh - 345px)">
+  <div style="margin-bottom: -24px">
     <addOrder v-if="!isDisabled && tool.checkAuth($route.name,'order')" ref="addOrder" :param="paramAdd" :tablecols="tablecolsAdd" :title="'添加订单'" class="inline-16" @add="addOrder"
               @adds="addOrders" @uploadData="uploadData" @onSuccess="onSuccess" :dataType="'订单'"></addOrder>
     <el-button @click="delAll" :type="list.length === 0?'':'primary'" size="small" v-if="!isDisabled && tool.checkAuth($route.name,'order')" :disabled="list.length === 0">一键删除</el-button>
     <el-button v-if="!isDisabled && tool.checkAuth($route.name,'order')" :type="items.length > 0?'primary':''" size="small" @click="delOrders" class="inline-16" :disabled="items.length === 0">删 除</el-button>
     <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
-    <tableList height="240px" ref="orderRef" style="margin-top: 10px" :checkbox="true"  :layout="tablecols" :data="list" :opwidth="200" :custom="true"  fixedName="operation"
+    <tableList height="240px" ref="orderRef" style="margin-top: 10px;" :checkbox="true"  :layout="tablecols" :data="list" :opwidth="200" :custom="true"  fixedName="operation"
                highlight-current-row @selectionChange="selectionChange"  @rowClick="rowClick">
       <template v-slot:customcol="scope">
         <div v-if="scope.column.columnname === 'operation'">
@@ -44,31 +44,33 @@
                      @adds="addProducts" @uploadData="uploadDataProduct" @onSuccess="onSuccessProduct" :dataType="'产品'" btnType="text" :data="scope.data"></addProducts>
       </template>
     </tableList>
-    <div class=" container "  style="text-align:left;float: left">
-      <span style="font-size: 14px">出货预测金额: ¥{{alloutamount > 10000?tool.formatAmount(alloutamount/10000,2)+'万':tool.formatAmount(alloutamount,2)}}</span>
-      <span style="font-size: 14px;margin-left: 10px">开票预测金额: ¥{{allinvoiceamount > 10000?tool.formatAmount(allinvoiceamount/10000,2)+'万':tool.formatAmount(allinvoiceamount,2)}}</span>
-    </div>
-    <div  class="container " style="text-align:right;float: right">
-      <el-pagination
-          background
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="param.content.pageNumber"
-          :page-sizes="[20, 50, 100, 200]"
-          :page-size="20"
-          layout="total,sizes, prev, pager, next, jumper"
-          :total="total">
-      </el-pagination>
+    <div style="display: flex;justify-content: space-between;padding: 10px">
+      <div style="line-height: 30px;vertical-align: middle">
+        <span style="font-size: 14px">出货预测金额: ¥{{alloutamount > 10000?tool.formatAmount(alloutamount/10000,2)+'万':tool.formatAmount(alloutamount,2)}}</span>
+        <span style="font-size: 14px;margin-left: 10px">开票预测金额: ¥{{allinvoiceamount > 10000?tool.formatAmount(allinvoiceamount/10000,2)+'万':tool.formatAmount(allinvoiceamount,2)}}</span>
+      </div>
+      <div>
+        <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="param.content.pageNumber"
+            :page-sizes="[20, 50, 100, 200]"
+            :page-size="20"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
     </div>
     <!-- 产品   -->
-    <div :style="{marginTop:'60px'}">
+    <div :style="{marginTop:multipleSize>1512?'10px':'10px'}">
       <div >
         <el-button @click="delAllProduct" :type="productList.length === 0?'':'primary'" size="small" v-if="!isDisabled && tool.checkAuth($route.name,'order')" :disabled="productList.length === 0">一键删除</el-button>
         <el-button v-if="!isDisabled && tool.checkAuth($route.name,'order')" :type="productItems.length > 0?'primary':''" size="small" @click="delProducts" class="inline-16" :disabled="productItems.length === 0">删 除</el-button>
         <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="productsParam.content.where.condition?productsParam.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="productsParam.content.where.condition" @keyup.native.enter="listProduct(productsParam.content.pageNumber = 1)" @clear="listProduct(productsParam.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
         </el-input>
       </div>
-      <tableList height="500px" ref="productRef" style="margin-top: 10px" :checkbox="true"  :layout="tablecolsProduct" :data="productList" :opwidth="200" :custom="true"  fixedName="operation"
+      <tableList :height="multipleSize>1512?'520px':'500px'" ref="productRef" style="margin-top: 10px" :checkbox="true"  :layout="tablecolsProduct" :data="productList" :opwidth="200" :custom="true"  fixedName="operation"
                  @selectionChange="selectionChangeProduct"  :headerOptions="['plandeliverydate']">
         <template v-slot:header="scope">
           <div v-if="scope.column.columnname == 'plandeliverydate'">
@@ -149,23 +151,26 @@
           <el-button v-if="tool.checkAuth($route.name,'order')" size="mini" type="text" @click="delProduct(scope.data)" :disabled="isDisabled" :loading="loading" >删 除</el-button>
         </template>
       </tableList>
-      <div class=" container "  style="text-align:left;float: left">
-        <span style="font-size: 14px">总数量:{{totalqty}}</span>
-        <span style="font-size: 14px;margin-left: 10px">总金额: ¥{{totalamount > 10000?tool.formatAmount(totalamount/10000,2)+'万':tool.formatAmount(totalamount,2)}}</span>
-        <span style="font-size: 14px;margin-left: 10px">折后金额: ¥{{totaldefaultamount > 10000?tool.formatAmount(totaldefaultamount/10000,2)+'万':tool.formatAmount(totaldefaultamount,2)}}</span>
-      </div>
-      <div  class="container " style="text-align:right;float: right">
-        <el-pagination
-            background
-            @size-change="handleSizeChangeProduct"
-            @current-change="handleCurrentChangeProduct"
-            :current-page="productsParam.content.pageNumber"
-            :page-sizes="[20, 50, 100, 200]"
-            :page-size="20"
-            layout="total,sizes, prev, pager, next, jumper"
-            :total="productTotal">
-        </el-pagination>
+      <div style="display: flex;justify-content: space-between;padding: 10px">
+        <div style="line-height: 30px;vertical-align: middle">
+          <span style="font-size: 14px">总数量:{{totalqty}}</span>
+          <span style="font-size: 14px;margin-left: 10px">总金额: ¥{{totalamount > 10000?tool.formatAmount(totalamount/10000,2)+'万':tool.formatAmount(totalamount,2)}}</span>
+          <span style="font-size: 14px;margin-left: 10px">折后金额: ¥{{totaldefaultamount > 10000?tool.formatAmount(totaldefaultamount/10000,2)+'万':tool.formatAmount(totaldefaultamount,2)}}</span>
+        </div>
+        <div >
+          <el-pagination
+              background
+              @size-change="handleSizeChangeProduct"
+              @current-change="handleCurrentChangeProduct"
+              :current-page="productsParam.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="productTotal">
+          </el-pagination>
+        </div>
       </div>
+
     </div>
   </div>
 </template>
@@ -264,7 +269,8 @@ export default {
       selectProduct:[],
       selectOrder:[],
       unoutamountOrder:0,
-      widthNew:0
+      screenWidth: 0, // 存储当前屏幕的宽度
+      multipleSize: 0, // 根据屏幕宽度计算得出的值
     }
   },
   methods:{
@@ -663,22 +669,25 @@ export default {
         }
       })
       this.onSuccessProduct()
+    },
+    handleResize() {
+      // 更新屏幕宽度
+      this.screenWidth = window.innerWidth;
     }
   },
   mounted() {
     this.listData()
-    this.widthNew = window.innerWidth
+    // 监听窗口大小变化
+    window.addEventListener("resize", this.handleResize);
+    // 初始化屏幕宽度
+    this.screenWidth = window.innerWidth;
   },
   watch: {
-    width(newWidth) {
-      console.log('浏览器宽度变化为订单:', newWidth)
+    screenWidth(newWidth) {
+      // 根据新的屏幕宽度计算 multipleSize 属性的值
+      this.multipleSize = newWidth;
+      console.log(this.multipleSize,'当前屏幕宽度订单')
     },
-    immediate: true,
-    handler() {
-      window.addEventListener('resize', () => {
-        this.widthNew = window.innerWidth
-      })
-    }
   },
   created() {
     this.tablecolsAdd = this.tool.tabelCol(this.$route.name).orderAddTable.tablecols

+ 1 - 1
src/HDrpManagement/projectPredictionManage/details/index.vue

@@ -57,7 +57,7 @@
          </el-row>
          <el-row>
            <el-row :span="24">
-             <tableListRow  :layout="tablecols" :data="list" :opwidth="200" :custom="true"  height="calc(100vh - 340px)" fixedName="operation">
+             <tableListRow  :layout="tablecols" :data="list" :opwidth="200" :custom="true"  height="calc(100vh - 373px)" fixedName="operation">
                <template v-slot:customcol="scope">
                  <div v-if="scope.column.columnname === 'operation'">
                    <span>{{scope.column.data[scope.column.columnname]}}</span>

+ 36 - 30
src/HDrpManagement/projectPredictionManage/details/modules/projectList.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="height: calc(100vh - 345px)">
+  <div style="margin-bottom: -24px">
     <div >
       <addProject v-if="!isDisabled && tool.checkAuth($route.name,'projectProduct')" ref="addProject" :param="paramProject" class="inline-16" @add="addProject" @adds="addProjects" @uploadData="uploadData" @onSuccess="onSuccess"></addProject>
       <el-button @click="delProjectAll" :type="list.length === 0?'':'primary'" size="small" v-if="!isDisabled && tool.checkAuth($route.name,'projectProduct')" :disabled="list.length === 0">一键删除</el-button>
@@ -23,21 +23,24 @@
           <el-button size="mini" type="text" @click="delProject(scope.data)" :disabled="isDisabled" :loading="loading">删 除</el-button>
         </template>
       </tableList>
-      <div class=" container "  style="text-align:left;float: left">
-        <span style="font-size: 14px">预测金额: ¥{{projectPrice > 10000?tool.formatAmount(projectPrice/10000,2)+'万':tool.formatAmount(projectPrice,2)}}</span>
-      </div>
-      <div  class="container " style="text-align:right;float: right">
-        <el-pagination
-            background
-            @size-change="handleSizeChangeProject"
-            @current-change="handleCurrentChangeProject"
-            :current-page="projectParam.content.pageNumber"
-            :page-sizes="[20, 50, 100, 200]"
-            :page-size="20"
-            layout="total,sizes, prev, pager, next, jumper"
-            :total="totalProject">
-        </el-pagination>
+      <div style="display: flex;justify-content: space-between;padding: 10px">
+        <div style="line-height: 30px;vertical-align: middle">
+          <span style="font-size: 14px">预测金额: ¥{{projectPrice > 10000?tool.formatAmount(projectPrice/10000,2)+'万':tool.formatAmount(projectPrice,2)}}</span>
+        </div>
+        <div  >
+          <el-pagination
+              background
+              @size-change="handleSizeChangeProject"
+              @current-change="handleCurrentChangeProject"
+              :current-page="projectParam.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="totalProject">
+          </el-pagination>
+        </div>
       </div>
+
     </div>
     <div>
       <el-row>
@@ -53,7 +56,7 @@
           <span style="float: right;line-height: 40px;height:40px;font-size:13px;vertical-align: auto">折扣(%):</span>
         </el-col>
       </el-row>
-      <tableList :height="'calc(100vh - 690px)'" style="margin-top: 10px" :checkbox="true"  :layout="productCols" :data="productList" :opwidth="200" :custom="true"  fixedName="operation"
+      <tableList height="605px" style="margin-top: 10px" :checkbox="true"  :layout="productCols" :data="productList" :opwidth="200" :custom="true"  fixedName="operation"
                  @selectionChange="selectionChangePro">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname === 'operation'">
@@ -83,21 +86,24 @@
           <el-button size="mini" type="text" @click="delProduct(scope.data)" :disabled="isDisabled" :loading="loadingProduct">删 除</el-button>
         </template>
       </tableList>
-      <div class=" container "  style="text-align:left;float: left">
-        <span style="font-size: 14px">预测金额: ¥{{productPrice > 10000?tool.formatAmount(productPrice/10000,2)+'万':tool.formatAmount(productPrice,2)}}</span>
-      </div>
-      <div  class="container " style="text-align:right;float: right">
-        <el-pagination
-            background
-            @size-change="handleSizeChangeProduct"
-            @current-change="handleCurrentChangeProduct"
-            :current-page="productParam.content.pageNumber"
-            :page-sizes="[20, 50, 100, 200]"
-            :page-size="20"
-            layout="total,sizes, prev, pager, next, jumper"
-            :total="totalProduct">
-        </el-pagination>
+      <div style="display: flex;justify-content: space-between;padding: 10px">
+        <div style="line-height: 30px;vertical-align: middle">
+          <span style="font-size: 14px">预测金额: ¥{{productPrice > 10000?tool.formatAmount(productPrice/10000,2)+'万':tool.formatAmount(productPrice,2)}}</span>
+        </div>
+        <div  >
+          <el-pagination
+              background
+              @size-change="handleSizeChangeProduct"
+              @current-change="handleCurrentChangeProduct"
+              :current-page="productParam.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="20"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="totalProduct">
+          </el-pagination>
+        </div>
       </div>
+
     </div>
     <el-drawer
         title="添加商品"

+ 2 - 2
src/SDrpManagement/invoicePrediction/index.vue

@@ -85,8 +85,8 @@
         </p>
       </template>
       <template v-slot:tbOpreation="scope">
-        <el-button size="mini"  v-if="scope.data.data.status === '进行中' && tool.checkAuth($route.name,'update')" type="text" @click="goDetail(scope.data.data)">编 辑</el-button>
-        <el-button size="mini" v-else type="text" @click="goDetail(scope.data.data)">详 情</el-button>
+        <el-button size="mini" class="inline-16"  v-if="scope.data.data.status === '进行中' && tool.checkAuth($route.name,'update')" type="text" @click="goDetail(scope.data.data)">编 辑</el-button>
+        <el-button size="mini" class="inline-16"  v-else type="text" @click="goDetail(scope.data.data)">详 情</el-button>
       </template>
     </basicLayout>
   </div>

+ 1 - 3
src/components/newDetailTemp/index.vue

@@ -69,13 +69,11 @@ export default {
     window.addEventListener("resize", this.handleResize);
     // 初始化屏幕宽度
     this.screenWidth = window.innerWidth;
-    console.log(this.screenWidth,'屏幕宽度')
   },
   watch: {
     screenWidth(newWidth) {
       // 根据新的屏幕宽度计算 multipleSize 属性的值
-      this.multipleSize = newWidth / 3;
-      console.log(this.multipleSize)
+      this.multipleSize = newWidth;
     },
   },