|
@@ -16,6 +16,11 @@
|
|
|
<div class="table_caption" style="height: 30px;line-height: 30px;">库存统计(今日)</div>
|
|
|
<el-table class="titletable" cellspacing="0" cellpadding="0" height="330px" width="800px" :data="datalist">
|
|
|
<el-table-column label="种类" align="center" prop="name" fixed></el-table-column>
|
|
|
+ <el-table-column label="当前库存" align="center" prop="curr">
|
|
|
+ <template #default="scope">
|
|
|
+ <a javascript="void(0)" @click="currDetail(scope.row)" style="color: cornflowerblue;text-decoration: underline;">{{ scope.row.curr }}</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="入库数量" align="center" prop="in"></el-table-column>
|
|
|
<el-table-column label="出库数量" align="center" prop="out"></el-table-column>
|
|
|
<el-table-column label="最大库存量" align="center" prop="max"></el-table-column>
|
|
@@ -43,6 +48,29 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog :title="currDlgTitle" v-model="currOpenDetail" width="900px" append-to-body>
|
|
|
+ <el-form style="height:550px;width:100%;display: flex;">
|
|
|
+ <el-table ref="currtable" row-key="id" :data="currdata" style="height:530px;width:50%;" highlight-current-row>
|
|
|
+ <el-table-column label="长丝旦数(D)" align="left" prop="lot13" ></el-table-column>
|
|
|
+ <el-table-column label="整经根数/验布幅宽(cm)" align="left" prop="lot15" width="200"></el-table-column>
|
|
|
+ <el-table-column label="盘头数量" align="left" prop="num">
|
|
|
+ <template #default="scope">
|
|
|
+ <a javascript="void(0)" @click="currNumDetail(scope.row,1)" style="color: cornflowerblue;text-decoration: underline;">{{ scope.row.num }}</a>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-table row-key="id" :data="currdetaildata" style="height:530px;width:48%;margin-left: 2%;">
|
|
|
+ <el-table-column label="时间" align="left" prop="date" ></el-table-column>
|
|
|
+ <el-table-column label="生产人员" align="left" prop="lot12" ></el-table-column>
|
|
|
+ <el-table-column label="生产机台" align="left" prop="lot17"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="currOpenDetail=false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
<script>
|
|
|
import { ref,onMounted,watch } from 'vue';
|
|
@@ -64,8 +92,13 @@
|
|
|
const top10 = ref(null);
|
|
|
const detaildata=ref([]);
|
|
|
const openDetail=ref(false);
|
|
|
+ const currOpenDetail=ref(false);
|
|
|
+ const currDlgTitle=ref('');
|
|
|
+ const currdata=ref([]);
|
|
|
+ const currdetaildata=ref([]);
|
|
|
const loading=ref(true);
|
|
|
const cacheData=ref({});
|
|
|
+ const currtable=ref(null);
|
|
|
function impquery(){
|
|
|
detailDataList.value=[];
|
|
|
datalist.value=[];
|
|
@@ -92,6 +125,26 @@
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
+ function currDetail(data){
|
|
|
+ if(data.curr!=null && data.curr>0){
|
|
|
+ currOpenDetail.value=true;
|
|
|
+ currDlgTitle.value=data.name + "—当前库存详情";
|
|
|
+ currdata.value = data.calc;
|
|
|
+ currNumDetail(data.calc[0],null);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function currNumDetail(data,flag){
|
|
|
+ if(data.details!=null && data.details.length>0){
|
|
|
+ currdetaildata.value = data.details;
|
|
|
+ if(flag==null){
|
|
|
+ setTimeout(() => {
|
|
|
+ currtable.value.$el.querySelector('tbody tr').classList.add('current-row');
|
|
|
+ }, 50);
|
|
|
+ }else{
|
|
|
+ currtable.value.$el.querySelector('tbody tr').classList.remove('current-row');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
function showLine(data){
|
|
|
var myChart = echarts.init(echarts1.value);
|
|
|
const dataColor = ['#4EB2FE', '#f19051', '#F47505', '#20d450'];
|
|
@@ -622,7 +675,20 @@
|
|
|
top10,
|
|
|
openDetail,
|
|
|
detaildata,
|
|
|
+ currDetail,
|
|
|
+ currOpenDetail,
|
|
|
+ currDlgTitle,
|
|
|
+ currdata,
|
|
|
+ currNumDetail,
|
|
|
+ currdetaildata,
|
|
|
+ currtable,
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.el-table__body tr.current-row>td.el-table__cell
|
|
|
+{
|
|
|
+ background-color: #aacbec;
|
|
|
+}
|
|
|
+</style>
|