|
|
@@ -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
|