123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- <template>
- <div class="box-card">
- <el-card>
- <el-form :model="timeList" :inline="true" @submit.native.prevent>
- <el-form-item label="日期:">
- <el-date-picker
- v-model="timeList"
- type="daterange"
- range-separator="To"
- start-placeholder="Start date"
- end-placeholder="End date"
- value-format="YYYY-MM-DD"
- @change="changeTime" />
- </el-form-item>
- </el-form>
- </el-card>
- <el-row :gutter="10" style="padding-top: 10px">
- <el-col :span="6">
- <el-card v-loading="topLeft">
- <div class="cardTitle">MES今日生产出库数据</div>
- <div class="firstRowBoard">
- <span style="font-size: 16px !important">BOM出库总数(个)</span>
- <span style="font-weight: 700; font-size: 20px !important">{{ TLData.count || 0 }}</span>
- </div>
- <el-table
- :data="TLData.list"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-card>
- </el-col>
- <el-col :span="9">
- <el-card v-loading="topCenter">
- <div class="cardTitle">MES&万里牛今日订单和BOM差异(不含自建订单)</div>
- <div class="firstRowBoard">
- <span style="font-size: 16px !important">差异订单总数(单)</span>
- <span style="font-weight: 700; font-size: 20px !important">{{ TCData.count || 0 }}</span>
- </div>
- <el-table
- :data="TCData.list"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="BOM编号" prop="bomSpecCode" width="120" />
- <el-table-column label="MES" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.mesQuantity">{{ Number(row.mesQuantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- <el-table-column label="万里牛" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.wlnQuantity">{{ Number(row.wlnQuantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- <el-table-column label="差异订单号" prop="orderWlnCodes" min-width="140" />
- </el-table>
- </el-card>
- </el-col>
- <el-col :span="9">
- <el-card v-loading="topRight" style="height: 100%">
- <div class="cardTitle">MES今日自建订单数据</div>
- <div class="firstRowBoard">
- <div style="width: 50%; padding: 0 8px; display: flex">
- <span style="font-size: 16px !important">自建订单总数(单)</span>
- <span style="font-weight: 700; font-size: 20px !important; padding-left: 16px">{{ TRData.sumOrderCount || 0 }}</span>
- </div>
- <div style="width: 50%; padding: 0 8px">
- <span style="font-size: 16px !important">自建订单BOM总数(个)</span>
- <span style="font-weight: 700; font-size: 20px !important; padding-left: 16px">{{ TRData.sumBomCount || 0 }}</span>
- </div>
- </div>
- <el-table
- :data="TRData.outStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-card>
- </el-col>
- </el-row>
- <el-row :gutter="10" style="padding-top: 10px">
- <el-col :span="12">
- <el-card v-loading="centerLeft">
- <div class="cardTitle">万里牛今日销售出库数据</div>
- <el-row :gutter="20">
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>销售出库订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.sumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>BOM销售出库总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.sumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CLData.outStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>佰卓销售出库订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.bzSumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>佰卓出库BOM总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.bzSumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CLData.bzOutStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>宝恒盛销售出库订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.sySumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>宝恒盛出库BOM总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CLData.sySumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CLData.syOutStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- </el-row>
- </el-card>
- </el-col>
- <el-col :span="12">
- <el-card v-loading="centerRight">
- <div class="cardTitle">MES今日生产订单数据(不含自建订单)</div>
- <el-row :gutter="20">
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>生产订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.sumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>BOM生产总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.sumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CRData.outStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>佰卓生产订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.bzSumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>佰卓生产BOM总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.bzSumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CRData.bzOutStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="8">
- <div class="secondRowBoardTop">
- <div>宝恒盛生产订单总数(单)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.sySumOrderCount || 0 }}
- </div>
- </div>
- <div class="secondRowBoardBottom">
- <div>宝恒盛生产BOM总数(个)</div>
- <div style="font-weight: 700; margin-top: 10px; font-size: 20px !important">
- {{ CRData.sySumBomCount || 0 }}
- </div>
- </div>
- <el-table
- :data="CRData.syOutStorageBomList"
- :cell-style="{ padding: '0' }"
- :row-style="{ height: '50px' }"
- header-row-class-name="tableHeader"
- height="30vh"
- style="margin-top: 20px">
- <el-table-column label="序号" align="center" type="index" width="60" />
- <el-table-column label="BOM编号" prop="bomSpecCode" min-width="140" />
- <el-table-column label="数量" align="center" width="80">
- <template #default="{ row }">
- <span v-if="row.quantity">{{ Number(row.quantity) }}</span>
- <span v-else>0</span>
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- </el-row>
- </el-card>
- </el-col>
- </el-row>
- <!-- <div style="padding-top: 10px">
- <el-card v-loading="bottomCenter">
- <div class="cardTitle">MES今日自建订单数据</div>
- <el-row :gutter="20">
- <el-col :span="8">
- <div class="firstRowBoard">
- <span style="font-size: 16px !important">自建订单总数(单)</span>
- <span style="font-weight: 700; font-size: 20px !important">{{ BCData.sumOrderCount }}</span>
- </div>
- </el-col>
- <el-col :span="8">
- <div class="firstRowBoard">
- <span style="font-size: 16px !important">自建订单BOM总数(个)</span>
- <span style="font-weight: 700; font-size: 20px !important">{{ BCData.sumBomCount }}</span>
- </div>
- </el-col>
- </el-row>
- <el-row :gutter="20" v-if="BCData.outStorageBomList && BCData.outStorageBomList.length > 0">
- <el-col :span="8" style="margin-top: 20px" v-for="(item, index) in BCData.outStorageBomList" :key="index">
- <el-row :gutter="2">
- <el-col :span="8">
- <div style="background-color: #eeeeee; padding: 20px">BOM编号</div>
- </el-col>
- <el-col :span="16">
- <div style="background-color: #eeeeee; padding: 20px">{{ item.bomSpecCode }}</div>
- </el-col>
- </el-row>
- <el-row :gutter="2" style="margin-top: 2px">
- <el-col :span="8">
- <div style="background-color: #eeeeee; padding: 20px">数量</div>
- </el-col>
- <el-col :span="16">
- <div style="background-color: #eeeeee; padding: 20px">{{ item.quantity }}</div>
- </el-col>
- </el-row>
- </el-col>
- </el-row>
- </el-card>
- </div> -->
- </div>
- </template>
- <script setup>
- import moment from "moment";
- import { ElMessage } from "element-plus";
- const { proxy } = getCurrentInstance();
- const timeList = ref([moment().format("yyyy-MM-DD"), moment().format("yyyy-MM-DD")]);
- const topLeft = ref(false);
- const topCenter = ref(false);
- const topRight = ref(false);
- const centerLeft = ref(false);
- const centerRight = ref(false);
- const TLData = ref({
- count: 0,
- list: [],
- });
- const TCData = ref({
- count: 0,
- list: [],
- });
- const TRData = ref({
- sumOrderCount: 0,
- sumBomCount: 0,
- outStorageBomList: [],
- });
- const CLData = ref({
- sumOrderCount: 0,
- sumBomCount: 0,
- outStorageBomList: [],
- bzSumOrderCount: 0,
- bzSumBomCount: 0,
- bzOutStorageBomList: [],
- sySumOrderCount: 0,
- sySumBomCount: 0,
- syOutStorageBomList: [],
- });
- const CRData = ref({
- sumOrderCount: 0,
- sumBomCount: 0,
- outStorageBomList: [],
- bzSumOrderCount: 0,
- bzSumBomCount: 0,
- bzOutStorageBomList: [],
- sySumOrderCount: 0,
- sySumBomCount: 0,
- syOutStorageBomList: [],
- });
- const changeTime = () => {
- if (timeList.value && timeList.value.length == 2) {
- getList();
- } else {
- ElMessage("请选择日期");
- }
- };
- const getList = () => {
- TLData.value = {
- count: 0,
- };
- topLeft.value = true;
- proxy.post("/dailyBoard/getProductionOutStorageList", { beginDate: timeList.value[0] + " 00:00:00", endDate: timeList.value[1] + " 23:59:59" }).then(
- (res) => {
- if (res && res.length > 0) {
- res.map(function (item) {
- TLData.value.count += item.quantity || 0;
- });
- TLData.value.list = res;
- } else {
- TLData.value = {
- count: 0,
- list: [],
- };
- }
- topLeft.value = false;
- },
- (err) => {
- console.log(err);
- topLeft.value = false;
- }
- );
- TCData.value = {
- count: 0,
- };
- topCenter.value = true;
- proxy.post("/dailyBoard/getOrderBomDifferenceList", { beginDate: timeList.value[0] + " 00:00:00", endDate: timeList.value[1] + " 23:59:59" }).then(
- (res) => {
- if (res && res.length > 0) {
- res.map(function (item) {
- TCData.value.count += item.orderWlnCodes.length || 0;
- });
- TCData.value.list = res;
- } else {
- TCData.value = {
- count: 0,
- list: [],
- };
- }
- topCenter.value = false;
- },
- (err) => {
- console.log(err);
- topCenter.value = false;
- }
- );
- CLData.value = {};
- centerLeft.value = true;
- proxy.post("/dailyBoard/getWlnSalesOutStorageInfo", { beginDate: timeList.value[0] + " 00:00:00", endDate: timeList.value[1] + " 23:59:59" }).then(
- (res) => {
- CLData.value = res;
- centerLeft.value = false;
- },
- (err) => {
- console.log(err);
- centerLeft.value = false;
- }
- );
- CRData.value = {};
- centerRight.value = true;
- proxy.post("/dailyBoard/getMesProductionOutStorageInfo", { beginDate: timeList.value[0] + " 00:00:00", endDate: timeList.value[1] + " 23:59:59" }).then(
- (res) => {
- CRData.value = res;
- centerRight.value = false;
- },
- (err) => {
- console.log(err);
- centerRight.value = false;
- }
- );
- TRData.value = {};
- topRight.value = true;
- proxy.post("/dailyBoard/getSelfOrderOutStorageInfo", { beginDate: timeList.value[0] + " 00:00:00", endDate: timeList.value[1] + " 23:59:59" }).then(
- (res) => {
- TRData.value = res;
- topRight.value = false;
- },
- (err) => {
- console.log(err);
- topRight.value = false;
- }
- );
- };
- getList();
- </script>
- <style lang="scss" scoped>
- .box-card {
- height: calc(100vh - 120px);
- overflow-y: auto;
- }
- ::v-deep(.tableHeader th) {
- background-color: #eeeeee;
- height: 56px;
- padding: 0;
- }
- ::v-deep(.el-card__body) {
- padding: 20px !important;
- }
- .cardTitle {
- border-left: 2px solid #487cff;
- padding-left: 10px;
- font-size: 16px !important;
- }
- .firstRowBoard {
- padding: 20px;
- margin-top: 20px;
- background-color: #eff6ff;
- display: flex;
- justify-content: space-between;
- border-radius: 10px;
- }
- .secondRowBoardTop {
- padding: 20px;
- margin-top: 20px;
- background-color: #eff6ff;
- border-radius: 10px;
- div {
- font-size: 16px !important;
- }
- }
- .secondRowBoardBottom {
- padding: 20px;
- margin-top: 20px;
- background-color: #fff8ef;
- border-radius: 10px;
- div {
- font-size: 16px !important;
- }
- }
- </style>
|