1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096 |
- <template>
- <div class="app-container ">
- <div class="stat-warp">
- <div style="margin-bottom:15px">
- <TitleInfo :content="'工作事项'"></TitleInfo>
- </div>
- <ul>
- <li class="theme1" @click="toUrl(1)">
- <div class="num">{{ toBeProcessedData.total }}</div>
- <div class="label">待审批</div>
- <div class="icon-box">
- <i class="icon iconfont icon-iconm_waixht"></i>
- </div>
- </li>
- <li class="theme2" @click="toUrl(2)">
- <div class="num">{{ allData[0].total }}</div>
- <div class="label">待报价</div>
- <div class="icon-box">
- <svg-icon :icon-class="'baojia'" className="svg-class1" />
- </div>
- </li>
- <li class="theme3" @click="toUrl(3)">
- <div class="num">{{ allData[1].total }}</div>
- <div class="label">待投产</div>
- <div class="icon-box">
- <svg-icon :icon-class="'touchang'" className="svg-class" />
- </div>
- </li>
- <li class="theme4" @click="toUrl(4)">
- <div class="num">{{ allData[2].total }}</div>
- <div class="label">待入库</div>
- <div class="icon-box">
- <svg-icon :icon-class="'ruku'" className="svg-class1" />
- </div>
- </li>
- <li class="theme5" @click="toUrl(5)">
- <div class="num">{{ allData[3].total }}</div>
- <div class="label">待出库</div>
- <div class="icon-box">
- <svg-icon :icon-class="'chuku'" className="svg-class1" />
- </div>
- </li>
- <!-- <li class="theme6" @click="toUrl(6)" v-if="useUserStore().user.companyId =='100'">
- <div class="num">{{ allData[4].total }}</div>
- <div class="label">待认领</div>
- <div class="icon-box">
- <svg-icon :icon-class="'renling'" className="svg-class1" />
- </div>
- </li> -->
- <li class="theme6" @click="toUrl(6)">
- <div class="num">{{ allData[5].total }}</div>
- <div class="label">库存预警</div>
- <div class="icon-box">
- <svg-icon :icon-class="'kucun'" className="svg-class1" />
- </div>
- </li>
- </ul>
- <div class="table-card">
- <el-card style="width:32%">
- <TitleInfo :content="'待审批'"></TitleInfo>
- <el-table :data="toBeProcessedData.rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="title" label="流程标题" />
- <el-table-column label="操作" width="60" align="right">
- <template #default="{row,$index}">
- <div style="width:100%">
- <el-button type="primary" link style="font-size:12px" @click="pushProcessApproval(row)">办理</el-button>
- </div>
- </template>
- </el-table-column>
- </el-table>
- </el-card>
- <el-card style="width:32%">
- <TitleInfo :content="'待报价'"></TitleInfo>
- <el-table :data="allData[0].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="code" label="报价单号">
- <template #default="{row,$index}">
- <div style="width:100%">
- <span class="el-click" @click="handleOpenDetail(row)">{{row.code}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="amount" label="报价金额" width="110" />
- </el-table>
- </el-card>
- <el-card style="width:32%">
- <TitleInfo :content="'待投产'"></TitleInfo>
- <el-table :data="allData[1].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="code" label="订单号">
- <template #default="{row,$index}">
- <div style="width:100%">
- <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="deliveryPeriod" label="交期" width="150" />
- </el-table>
- </el-card>
- </div>
- <div class="table-card ">
- <el-card style="width:32%">
- <TitleInfo :content="'待入库'"></TitleInfo>
- <el-table :data="allData[2].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="productName" label="产品名称" />
- <el-table-column prop="quantity" label="数量" width="100" />
- </el-table>
- </el-card>
- <el-card style="width:32%">
- <TitleInfo :content="'待出库'"></TitleInfo>
- <el-table :data="allData[3].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="productName" label="产品名称" />
- <el-table-column prop="quantity" label="数量" width="100" />
- </el-table>
- </el-card>
- <!-- <el-card style="width:32%" v-if="useUserStore().user.companyId =='100'">
- <TitleInfo :content="'待认领'"></TitleInfo>
- <el-table :data="allData[4].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="accountManagementName" label="账户名称" />
- <el-table-column prop="amount" label="到账金额" width="100" />
- <el-table-column prop="transactionTime" label="到账时间" width="150" />
- </el-table>
- </el-card> -->
- <el-card style="width:32%">
- <TitleInfo :content="'库存预警'"></TitleInfo>
- <el-table :data="allData[5].rows" style="width: 100%" :height="tableHeight">
- <el-table-column prop="productCode" label="产品编码" />
- <el-table-column prop="productName" label="产品名称" />
- <el-table-column prop="stockThreshold" label="安全库存" width="100" />
- <el-table-column prop="quantity" label="当前库存" width="100" />
- </el-table>
- </el-card>
- </div>
- </div>
- <div class="table-warp">
- <div style="margin-bottom:15px">
- <TitleInfo :content="'监控告警'"></TitleInfo>
- </div>
- <el-card style="margin-bottom:20px">
- <TitleInfo :content="'逾期生产订单'+` (${allData[6].total})`"></TitleInfo>
- <el-table :data="allData[6].rows" style="width: 100%" :height="tableHeightOne">
- <el-table-column prop="code" label="订单号">
- <template #default="{row,$index}">
- <div style="width:100%">
- <span class="el-click" @click="lookDetails(row)">{{row.code}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="deliveryPeriod" label="交期" width="150" />
- </el-table>
- </el-card>
- <el-card style="margin-bottom:20px">
- <TitleInfo :content="'报损情况(近30天)'"></TitleInfo>
- <div class="baosun">
- <div class="theme2 q" @click="toUrl(7)">
- <span class="label">报损</span>
- <span class="num">{{ reportLossesData.replenishSumQuantity }}</span>
- </div>
- <div class="theme3 q" @click="toUrl(7)">
- <span class="label">丢件</span>
- <span class="num">{{ reportLossesData.lossSumQuantity }}</span>
- </div>
- </div>
- </el-card>
- <el-card>
- <TitleInfo :content="'设备运行情况'"></TitleInfo>
- <div style="display:flex;align-items:center">
- <div style="width:100px;font-size:12px">
- 设备名称:设备1 <br><br> 当天标刻数量:10<br><br>在线工作时长(分钟):1000
- </div>
- <div style="height:190px;width:calc(100% - 100px)" ref="pie_1"></div>
- </div>
- </el-card>
- </div>
- <el-dialog v-if="detailDialog" v-model="detailDialog" title="报价详情" width="90%" append-to-body>
- <PriceSheetDetailList :rowData="detailRowData" dataType="1" @changeLeftData="changeLeftData"></PriceSheetDetailList>
- </el-dialog>
- <el-dialog :title="'查看'" v-model="dialogVisible" width="90%" destroy-on-close>
- <el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-change="handleTabChange">
- <el-tab-pane label="订单详情" name="1">
- </el-tab-pane>
- <el-tab-pane label="物料结存" name="2">
- </el-tab-pane>
- </el-tabs>
- <byForm :formConfig="formConfig" :formOption="formOptionOne" v-model="formData.orderData" ref="formDom">
- <template #commodity>
- <div style="width: 100%">
- <el-table :data="formData.orderData.contractProductList" style="width: 100%; ">
- <el-table-column type="expand" width="50" align="center">
- <template #default="scope">
- <div style="padding-left:50px">
- <div style="margin-bottom:10px;">
- <TitleInfo content='BOM单:'></TitleInfo>
- </div>
- <el-table :data="scope.row.contractProductBomList" style="width: 100%;" border class="bom-table">
- <el-table-column label="图片" width="80">
- <template #default="{ row }">
- <div v-if="row.fileUrl">
- <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
- </div>
- <div v-else></div>
- </template>
- </el-table-column>
- <el-table-column prop="productCode" label="物料编码" width="190" />
- <el-table-column prop="productName" label="物料名称" min-width="200" />
- <el-table-column label="规格尺寸 (cm)" width="150">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="quantity" label="数量" width="110" />
- <el-table-column prop="remark" label="备注" width="180" />
- </el-table>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="商品图片" width="80">
- <template #default="{ row }">
- <div v-if="row.fileUrl">
- <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
- </div>
- <div v-else></div>
- </template>
- </el-table-column>
- <el-table-column prop="productCnName" label="商品名称" min-width="130" />
- <el-table-column prop="productCode" label="商品编码" width="130" />
- <el-table-column label="规格尺寸 (cm)" width="150">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="productColor" label="颜色" width="100" />
- <!-- <el-table-column label="设计图稿" width="80">
- <template #default="{ row, $index }">
- <div style="width: 100%">
- <el-upload :action="uploadUrl" accept=".gif, .jpeg, .jpg, .png" :show-file-list="false" :data="uploadData"
- :before-upload="(file)=>handleBeforeUpload(file,$index)" :on-success="()=>handleSuccess($index)">
- <div v-loading="row.imgLoading">
- <img v-if="row.imageUrl" :src="row.imageUrl" class="pic" />
-
- </div>
- </el-upload>
- </div>
- </template>
- </el-table-column> -->
- <el-table-column label="生产plt文件" width="140">
- <template #default="{ row, $index }">
- <div style="width:100%">
- <div v-if="row.isShowProductFile &&row.fileListOne && row.fileListOne.length > 0">
- <span class="el-click" @click="onPicture(row.fileListOne[0].fileUrl)">{{row.fileListOne[0].fileName}}</span>
- </div>
- <div v-else>
- <div v-if="row.prodFileList && row.prodFileList.length > 0">
- <span class="el-click" @click="onPicture(row.prodFileList[0].fileUrl)">{{row.prodFileList[0].fileName}} (定制)</span>
- </div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="数量" width="150" prop="quantity" />
- <el-table-column label="备注" min-width="200" prop="remark" />
- </el-table>
- </div>
- </template>
- <template #commodityOne>
- <div style="width: 100%">
- <el-table :data="formData.orderData.materialList" style="width: 100%; ">
- <el-table-column label="物料图片" width="80">
- <template #default="{ row }">
- <div v-if="row.fileUrl">
- <img :src="row.fileUrl" class="pic" @click="onPicture(row.fileUrl)" />
- </div>
- <div v-else></div>
- </template>
- </el-table-column>
- <el-table-column prop="materialCode" label="物料编码" width="200" />
- <el-table-column prop="materialName" label="物料名称" min-width="150" />
- <el-table-column prop="quantity" label="应发数量" width="150" />
- <el-table-column prop="unclaimedQuantity" label="未领数量" width="150" />
- <el-table-column prop="receivedQuantity" label="已领数量" width="150" />
- <el-table-column prop="workshopInventoryQuantity" label="车间结存" width="150">
- <template #default="{ row, $index }">
- <div style="color:red">
- {{row.workshopInventoryQuantity}}
- </div>
- </template>
- </el-table-column>
- <el-table-column prop="purchaseTransitQuantity" label="采购在途" width="100" />
- </el-table>
- </div>
- </template>
- </byForm>
- <template #footer>
- <el-button @click="dialogVisible = false" size="defualt">取 消</el-button>
- </template>
- </el-dialog>
- </div>
- </template>
- <script setup name="Index">
- import { createApp, onMounted, ref } from "vue";
- import byTableDemo from "../components/byTable/demo";
- import html2canvas from "html2canvas";
- import JsPDF from "jspdf";
- import * as echarts from "echarts";
- import PriceSheetDetailList from "@/views/EHSD/saleContract/PriceSheetDetailList";
- import byForm from "@/components/byForm/index";
- const { proxy } = getCurrentInstance();
- const tableHeight = ref(0);
- const tableHeightOne = ref(0);
- const getTableHeight = () => {
- tableHeight.value = (window.innerHeight - 390) / 2;
- tableHeightOne.value = window.innerHeight - 610;
- };
- getTableHeight();
- window.addEventListener("resize", () => {
- getTableHeight();
- });
- function goTarget(url) {
- window.open(url, "__blank");
- }
- const toBeProcessedData = ref({
- total: 0,
- rows: [],
- });
- const allData = ref({
- 0: {
- total: 0,
- rows: [],
- },
- 1: { total: 0, rows: [] },
- 2: { total: 0, rows: [] },
- 3: { total: 0, rows: [] },
- 4: { total: 0, rows: [] },
- 5: { total: 0, rows: [] },
- 6: { total: 0, rows: [] },
- });
- const reportLossesData = ref({});
- const pushProcessApproval = (row) => {
- if (row.status != 1 && row.status != 0) {
- proxy.$router.push({
- path: "/platform_manage/process/processApproval",
- query: {
- flowKey: row.flowKey,
- id: row.id,
- processType: 20,
- version: row.version,
- businessId: row.businessId,
- submitType: "10",
- },
- });
- return;
- }
- proxy.post("flowExample/getApprovalRecord", { id: row.id }).then((res) => {
- if (res.recordList.length > 0) {
- let data = res.recordList.filter((item) => item.status === 2);
- let nodeType = 0;
- if (data && data.length > 0) {
- nodeType = data[0].nodeType;
- }
- proxy.$router.push({
- path: "/platform_manage/process/processApproval",
- query: {
- flowKey: row.flowKey,
- id: row.id,
- processType: nodeType == 1 ? 30 : 10,
- businessId: row.businessId,
- },
- });
- }
- });
- };
- const pushProcessApprovalOne = (row) => {
- proxy.$router.push({
- path: "/platform_manage/process/processApproval",
- query: {
- flowKey: row.flowKey,
- id: row.id,
- processType: 20,
- version: row.version,
- businessId: row.businessId,
- submitType: "10",
- },
- });
- return;
- };
- const getData = () => {
- proxy
- .post("/flowExample/getToBeProcessedPage", {
- pageNum: 1,
- pageSize: 5,
- })
- .then((res) => {
- toBeProcessedData.value = res;
- });
- // 待报价
- proxy
- .post("/saleQuotation/page", {
- pageNum: 1,
- pageSize: 5,
- isEstimate: proxy.useUserStore().user.companyId == "100" ? "" : "1",
- })
- .then((res) => {
- allData.value[0] = res;
- });
- // 待投产
- proxy
- .post("/produceOrder/page", {
- pageNum: 1,
- pageSize: 5,
- isProduce: "0",
- })
- .then((res) => {
- allData.value[1] = res;
- });
- // 待入库
- proxy
- .post("/stockWaitDetails/page", {
- pageNum: 1,
- pageSize: 5,
- type: 1,
- })
- .then((res) => {
- allData.value[2] = res;
- });
- // 待出库
- proxy
- .post("/stockWaitDetails/page", {
- pageNum: 1,
- pageSize: 5,
- type: 2,
- })
- .then((res) => {
- allData.value[3] = res;
- });
- // 待认领
- proxy
- .post("/sale/accountRunningWater/page", {
- pageNum: 1,
- pageSize: 5,
- isClaim: "0,2",
- dataType: "1",
- })
- .then((res) => {
- allData.value[4] = res;
- });
- // 库存预警
- proxy
- .post("/stock/stockWarningPage", {
- pageNum: 1,
- pageSize: 5,
- })
- .then((res) => {
- allData.value[5] = res;
- });
- // 逾期生产订单
- proxy
- .post("/produceOrder/page", {
- pageNum: 1,
- pageSize: 10,
- isOverdue: "1",
- })
- .then((res) => {
- allData.value[6] = res;
- });
- // 补单统计
- proxy.post("/reportLossesDetails/lossesStatistics").then((res) => {
- reportLossesData.value = res;
- });
- };
- const toUrl = (att) => {
- //获取name为name的路由的基础信息
- // const route = proxy.$router.resolve({ name: name, params: {} });
- let pageObj = {
- 1: "Backlog",
- 2:
- proxy.useUserStore().user.companyId == "100"
- ? "PriceSheetEHSD"
- : "PriceSheetEstimate",
- 3: "ProductionOrder",
- 4: "WaitingForStorage",
- 5: "WaitingForDelivery",
- 6: "Claim",
- 7: "InventoryInquiry",
- };
- proxy.$router.push({
- name: pageObj[att],
- });
- };
- getData();
- //
- const getOption = () => {
- return {
- title: {
- show: true,
- text: "",
- bottom: "0%",
- left: "center",
- textStyle: {
- color: "#fff",
- fontSize: 12,
- fontWeight: 400,
- },
- },
- tooltip: {
- trigger: "item",
- },
- grid: {
- show: false,
- bottom: 0,
- },
- // legend: {
- // top: "0%",
- // left: "center",
- // },
- series: [
- {
- name: "设备1",
- type: "pie",
- // center: ["50%", "50%"],
- radius: ["45%", "75%"],
- top: "0%",
- bottom: "0%",
- avoidLabelOverlap: false,
- label: {
- show: false,
- position: "center",
- },
- emphasis: {
- label: {
- show: true,
- fontSize: 14,
- fontWeight: "bold",
- color: "#fff",
- },
- },
- labelLine: {
- show: false,
- },
- data: [
- {
- value: 1000,
- name: "工作时长",
- itemStyle: {
- color: "#F9CB19",
- },
- },
- {
- value: 440,
- name: "",
- itemStyle: {
- color: "#268EFF",
- },
- },
- ],
- },
- ],
- };
- };
- const pie_1 = ref(null);
- let pie_1Chart = null;
- let option1 = {};
- onMounted(() => {
- option1 = getOption();
- pie_1Chart = echarts.init(pie_1.value);
- window.addEventListener("resize", () => {
- pie_1Chart.resize();
- });
- pie_1Chart.setOption(option1);
- pie_1Chart.resize();
- });
- const detailDialog = ref(false);
- const detailRowData = ref({});
- const handleOpenDetail = (item) => {
- detailRowData.value = item;
- detailDialog.value = true;
- };
- const handleOpenOrderDetail = (row) => {
- proxy.$router.push({
- path: "/platform_manage/process/processApproval",
- query: {
- flowKey: "contract_flow",
- id: row.flowId || "",
- processType: 20,
- businessId: row.contractId,
- },
- });
- };
- const formData = reactive({
- data: {},
- orderData: {},
- });
- const formOptionOne = reactive({
- inline: true,
- labelWidth: 100,
- itemWidth: 100,
- disabled: true,
- });
- const dialogVisible = ref(false);
- const formDom = ref(null);
- const formConfig = computed(() => {
- return [
- {
- type: "title1",
- title: "基本信息",
- isShow: activeName.value == "1",
- },
- {
- type: "text",
- prop: "code",
- label: "合同号:",
- disabled: true,
- isShow: formData.orderData.code && activeName.value == "1" ? true : false,
- },
- {
- type: "title1",
- title: "商品信息",
- haveLine: true,
- isShow: activeName.value == "1",
- },
- {
- type: "slot",
- slotName: "commodity",
- label: "",
- isShow: activeName.value == "1",
- },
- {
- type: "title1",
- title: "物料结存",
- haveLine: false,
- isShow: activeName.value == "2",
- },
- {
- type: "slot",
- slotName: "commodityOne",
- label: "",
- isShow: activeName.value == "2",
- },
- ];
- });
- const getFileData = () => {
- let ids = [];
- formData.orderData.contractProductList.map((x) => {
- // ids.push(x.productId);
- x.contractProductBomList.map((y) => {
- ids.push(y.materialId);
- });
- });
- ids = Array.from(new Set(ids));
- proxy
- .post("/fileInfo/getList", {
- businessIdList: ids,
- })
- .then((fileObj) => {
- formData.orderData.contractProductList.map((x) => {
- // if (fileObj[x.productId] && fileObj[x.productId].length > 0) {
- // x.fileUrl = fileObj[x.productId][0].fileUrl;
- // }
- x.contractProductBomList.map((y) => {
- y.fileList = fileObj[y.materialId] || [];
- if (y.fileList && y.fileList.length > 0) {
- y.fileUrl = y.fileList[0].fileUrl;
- }
- });
- });
- });
- };
- const activeName = ref("1");
- const lookDetails = (item) => {
- activeName.value = "1";
- proxy.post("/contract/detail", { id: item.contractId }).then(async (res) => {
- formData.orderData = res;
- dialogVisible.value = true;
- proxy
- .post("/produceOrder/materialBalanceList", { id: item.id })
- .then((sonRes) => {
- formData.orderData.materialList = sonRes;
- if (sonRes && sonRes.length > 0) {
- let ids = sonRes.map((x) => x.materialId);
- proxy.getFileData({
- businessIdList: ids,
- data: formData.orderData.materialList,
- att: "materialId",
- businessType: "0",
- fileAtt: "fileList",
- filePathAtt: "fileUrl",
- });
- }
- });
- if (
- formData.orderData.contractProductList &&
- formData.orderData.contractProductList.length > 0
- ) {
- getFileData();
- let ids = formData.orderData.contractProductList.map((x) => x.id);
- let productIds = formData.orderData.contractProductList.map(
- (x) => x.productId
- );
- const productAllFile = await proxy.getFileData({
- businessIdList: productIds,
- getAll: true,
- });
- for (let i = 0; i < formData.orderData.contractProductList.length; i++) {
- const ele = formData.orderData.contractProductList[i];
- for (const key in productAllFile) {
- if (
- ele.productId == key &&
- productAllFile[ele.productId] &&
- productAllFile[ele.productId].length > 0
- ) {
- ele.productFile = productAllFile[ele.productId].filter(
- (x) => x.businessType == "0"
- );
- if (ele.productFile && ele.productFile.length > 0) {
- ele.fileUrl = ele.productFile[0].fileUrl;
- }
- break;
- }
- }
- }
- proxy
- .getFileData({
- businessIdList: ids,
- getAll: true,
- })
- .then((fileObj) => {
- if (fileObj && Object.keys(fileObj).length > 0) {
- for (
- let i = 0;
- i < formData.orderData.contractProductList.length;
- i++
- ) {
- const ele = formData.orderData.contractProductList[i];
- for (const key in fileObj) {
- if (
- ele.id == key &&
- fileObj[ele.id] &&
- fileObj[ele.id].length > 0
- ) {
- let imageUrlList = fileObj[ele.id].filter(
- (x) => x.businessType == "0"
- );
- if (imageUrlList && imageUrlList.length > 0) {
- ele.imageUrl = imageUrlList[0].fileUrl;
- }
- ele.prodFileList = fileObj[ele.id]
- .filter((x) => x.businessType == "1")
- .map((x) => ({ ...x, name: x.fileName, url: x.fileUrl }));
- if (ele.prodFileList && ele.prodFileList.length > 0) {
- ele.isShowProductFile = false;
- } else {
- ele.isShowProductFile = true;
- if (productAllFile[ele.productId]) {
- ele.fileListOne = productAllFile[ele.productId].filter(
- (x) => x.businessType == "2"
- );
- }
- }
- }
- }
- }
- } else {
- for (
- let i = 0;
- i < formData.orderData.contractProductList.length;
- i++
- ) {
- const ele = formData.orderData.contractProductList[i];
- ele.isShowProductFile = true;
- for (const key in productAllFile) {
- if (
- ele.productId == key &&
- productAllFile[ele.productId] &&
- productAllFile[ele.productId].length > 0
- ) {
- ele.fileListOne = productAllFile[ele.productId].filter(
- (x) => x.businessType == "2"
- );
- break;
- }
- }
- }
- }
- });
- }
- });
- };
- </script>
- <style scoped lang="scss">
- .app-container {
- display: flex;
- width: 100vw;
- padding: 10px;
- font-size: 14px !important;
- // height: 100%;
- .announcement {
- padding: 0;
- margin: 0;
- li {
- list-style: none;
- border-radius: 2px;
- padding: 14px 20px;
- background: #eeeeee;
- margin-bottom: 10px;
- font-size: 14px;
- cursor: pointer;
- .time {
- color: #999;
- }
- .content {
- margin-top: 10px;
- color: #333;
- }
- }
- li:hover {
- background: #eff6ff;
- }
- }
- .table-warp {
- width: 400px;
- //页面全屏,占据剩下的位置
- height: calc(100vh - 120px);
- background: #fff;
- padding: 10px;
- // border-radius: 5px;
- .baosun {
- display: flex;
- justify-content: space-between;
- margin-top: 15px;
- .q {
- padding: 10px;
- min-width: 150px;
- display: flex;
- cursor: pointer;
- justify-content: space-between;
- border-radius: 10px;
- .num {
- font-size: 20px;
- font-weight: 700;
- }
- }
- .theme2 {
- background: linear-gradient(180deg, #eae8fb 0%, #ded9ff 100%);
- }
- //#FFF1E1 #FF9315
- .theme3 {
- background: #fff1e1;
- }
- }
- .card {
- height: calc(50% - 10px);
- background: #fff;
- float: left;
- border-radius: 5px;
- padding: 20px;
- overflow-y: auto;
- }
- .odd {
- width: calc(66.5% - 10px);
- }
- .even {
- margin-left: 10px;
- width: 33.5%;
- }
- // .card:nth-child(2n + 1) {
- // margin-right: 20px;
- // }
- .card:nth-child(1) {
- margin-bottom: 10px;
- }
- .card:nth-child(2) {
- margin-bottom: 10px;
- }
- }
- .stat-warp {
- width: calc(100% - 400px - 10px);
- height: calc(100vh - 120px);
- margin-right: 10px;
- // margin-bottom: 10px;
- background: #fff;
- padding: 10px;
- // padding: 20px;
- // overflow: hidden;
- // position: relative;
- // border-radius: 5px;
- .title {
- height: 60px;
- select {
- height: 60px;
- border: none;
- outline: none;
- -webkit-appearance: none;
- appearance: none;
- font-size: 14px;
- font-weight: bold;
- background: url("@/assets/images/sanjiao.png") no-repeat right center;
- padding-right: 20px;
- }
- div {
- height: 60px;
- font-size: 14px;
- font-weight: bold;
- line-height: 60px;
- }
- }
- ul {
- padding: 0;
- // overflow: hidden;
- margin: 0;
- display: flex;
- width: 100%;
- flex-wrap: nowrap;
- overflow: hidden;
- justify-content: space-between;
- li {
- flex: 1;
- list-style: none;
- min-width: 150px;
- box-sizing: border-box;
- margin-right: 20px;
- background: linear-gradient(360deg, #c7e3fe 0%, #dfecff 100%);
- // float: left;
- // overflow: hidden;
- padding: 10px;
- color: #333333;
- position: relative;
- border-radius: 10px;
- cursor: pointer;
- .label {
- font-size: 14px;
- margin-top: 10px;
- }
- .label::before {
- // width: 10px;
- // height: 10px;
- // content: '';
- // border-radius: 50%;
- // background: #0084ff;
- // display: inline-block;
- // margin-right: 10px;
- }
- .num {
- font-size: 24px;
- font-weight: bold;
- }
- .icon-box {
- position: absolute;
- height: 40px;
- width: 40px;
- right: 20px;
- top: 20px;
- background: #fff;
- border-radius: 10px;
- text-align: center;
- line-height: 40px;
- i {
- font-size: 20px;
- color: #0084ff;
- }
- }
- }
- //#F5F3FF #9E64ED
- .theme2 {
- background: linear-gradient(180deg, #eae8fb 0%, #ded9ff 100%);
- .label::before {
- background: #7566f0;
- }
- .icon-box i {
- color: #7566f0;
- }
- }
- //#FFF1E1 #FF9315
- .theme3 {
- background: #fff1e1;
- .label::before {
- background: #ff9315;
- }
- .icon-box i {
- color: #ff9315;
- }
- }
- //#E2FBE8 #39C55A
- .theme4 {
- background: #e2fbe8;
- .label::before {
- background: #39c55a;
- }
- }
- .theme5 {
- background: #ffebe9;
- .label::before {
- background: #f94539;
- }
- }
- .theme6 {
- background: #e4f9f9;
- .label::before {
- background: #53cbcb;
- }
- }
- .multi-data {
- .label::before {
- display: none;
- }
- .label {
- font-size: 14px;
- font-weight: bold;
- color: #333;
- margin-bottom: 8px;
- }
- .num-warp {
- overflow: hidden;
- .num-box {
- float: left;
- min-width: 80px;
- margin-right: 20px;
- .num-small {
- font-size: 16px;
- font-weight: bold;
- margin-bottom: 8px;
- }
- .label-small {
- color: #666;
- font-size: 14px;
- }
- }
- }
- }
- }
- }
- .table-card {
- display: flex;
- justify-content: space-between;
- margin-top: 20px;
- }
- }
- :deep(
- .el-table .el-table__header-wrapper th,
- .el-table .el-table__fixed-header-wrapper th
- ) {
- height: auto !important;
- }
- .svg-class {
- font-size: 16px;
- }
- .svg-class1 {
- font-size: 19px;
- margin-top: 10px;
- }
- :deep(.el-table .cell) {
- font-size: 12px !important;
- line-height: 24px !important;
- }
- </style>
|