cz il y a 1 an
Parent
commit
e8e65cf354

+ 5 - 0
src/components/process/SF/Purchase.vue

@@ -296,6 +296,8 @@ import { useRoute } from "vue-router";
 import Editor from "@/components/Editor/index.vue";
 import * as echarts from "echarts";
 import $bus from "@/bus/index.js";
+import moment from "moment";
+
 const route = useRoute();
 const { proxy } = getCurrentInstance();
 // 接收父组件的传值
@@ -457,6 +459,9 @@ const formConfig = computed(() => {
       prop: "deliveryTime",
       label: "交付日期",
       itemWidth: 50,
+      disabledFn: (date) => {
+        return moment(date).isBefore(moment());
+      },
     },
     {
       type: "number",

+ 1 - 1
src/views/EHSD/procurement/purchasedEHSD/index.vue

@@ -249,7 +249,7 @@ const config = computed(() => {
                 ? {
                     attrs: {
                       label: "作废",
-                      type: "primary",
+                      type: "danger",
                       text: true,
                     },
                     el: "button",

+ 14 - 5
src/views/EHSD/saleContract/PriceSheetDetail.vue

@@ -345,7 +345,7 @@ getDict();
 const getFileData = () => {
   let ids = [];
   formData.data.quotationProductList.map((x) => {
-    ids.push(x.productId);
+    // ids.push(x.productId);
     x.quotationProductBomList.map((y) => {
       ids.push(y.materialId);
     });
@@ -357,10 +357,10 @@ const getFileData = () => {
     })
     .then((fileObj) => {
       formData.data.quotationProductList.map((x) => {
-        x.fileList = fileObj[x.productId] || [];
-        if (x.fileList && x.fileList.length > 0) {
-          x.fileUrl = x.fileList[0].fileUrl;
-        }
+        // x.fileList = fileObj[x.productId] || [];
+        // if (x.fileList && x.fileList.length > 0) {
+        //   x.fileUrl = x.fileList[0].fileUrl;
+        // }
         x.quotationProductBomList.map((y) => {
           y.fileList = fileObj[y.materialId] || [];
           if (y.fileList && y.fileList.length > 0) {
@@ -493,6 +493,15 @@ const getData = (query) => {
       getCityData(formData.data.buyProvinceId, "30");
     }
     getFileData();
+    let productIds = formData.data.quotationProductList.map((x) => x.productId);
+    proxy.getFileData({
+      businessIdList: productIds,
+      data: formData.data.quotationProductList,
+      att: "productId",
+      businessType: "0",
+      fileAtt: "productFile",
+      filePathAtt: "fileUrl",
+    });
     changeQuantity();
     loading.value = false;
     // if (res.quotationTrendList && res.quotationTrendList.length >= 2) {

+ 18 - 3
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -50,16 +50,17 @@
               </div>
               <template #reference>
                 <div style="display:flex;height:65px;position:relative;top:15px">
-                  <div v-for="(product,index) in item.contractProductList" :key="product.id" style="margin-right:10px;">
+                  <div v-for="(product,index) in item.contractProductList" :key="product.id" style="margin-right:10px;position:relative;">
                     <el-badge :value="product.quantity" :min="0" :max="999999" v-if="index<3">
                       <img :src="product.productImgUrl" class="pic" @click="handleClickFile(product.productImgUrl)">
                     </el-badge>
-                    <div v-if="index==3" style="margin-top:15px;font-weight:700">. . .</div>
+                    <div v-if="index==3" class="more">
+                      共{{item.contractProductList.length}}款
+                    </div>
                   </div>
                 </div>
               </template>
             </el-popover>
-
           </div>
         </template>
 
@@ -1454,4 +1455,18 @@ onBeforeUnmount(() => {
   color: #fff;
   border-radius: 4px;
 }
+.more {
+  position: absolute;
+  left: -60px;
+  background: rgba(0, 0, 0, 0.8);
+  color: #fff;
+  opacity: 0.5;
+  height: 65px;
+  padding-top: 8px;
+  width: 50px;
+  border-radius: 3px;
+  text-align: center;
+  cursor: pointer;
+  pointer-events: none;
+}
 </style>

+ 23 - 5
src/views/EHSD/saleContract/priceSheetEHSD/index.vue

@@ -711,7 +711,7 @@ const isChange = ref(false);
 const getFileData = () => {
   let ids = [];
   formData.data.quotationProductList.map((x) => {
-    ids.push(x.productId);
+    // ids.push(x.productId);
     x.quotationProductBomList.map((y) => {
       ids.push(y.materialId);
     });
@@ -723,10 +723,10 @@ const getFileData = () => {
     })
     .then((fileObj) => {
       formData.data.quotationProductList.map((x) => {
-        x.fileList = fileObj[x.productId] || [];
-        if (x.fileList && x.fileList.length > 0) {
-          x.fileUrl = x.fileList[0].fileUrl;
-        }
+        // x.fileList = fileObj[x.productId] || [];
+        // if (x.fileList && x.fileList.length > 0) {
+        //   x.fileUrl = x.fileList[0].fileUrl;
+        // }
         x.quotationProductBomList.map((y) => {
           y.fileList = fileObj[y.materialId] || [];
           if (y.fileList && y.fileList.length > 0) {
@@ -754,6 +754,15 @@ const getDtl = (row, flag, change = false) => {
     }
     // 文件数据回显
     getFileData();
+    let productIds = formData.data.quotationProductList.map((x) => x.productId);
+    proxy.getFileData({
+      businessIdList: productIds,
+      data: formData.data.quotationProductList,
+      att: "productId",
+      businessType: "0",
+      fileAtt: "productFile",
+      filePathAtt: "fileUrl",
+    });
     // 价格计算
     changeQuantity();
 
@@ -1421,6 +1430,15 @@ const handleForeign = (row) => {
     }
     // 文件数据回显
     getFileData();
+    let productIds = formData.data.quotationProductList.map((x) => x.productId);
+    proxy.getFileData({
+      businessIdList: productIds,
+      data: formData.data.quotationProductList,
+      att: "productId",
+      businessType: "0",
+      fileAtt: "productFile",
+      filePathAtt: "fileUrl",
+    });
   });
 };
 

+ 139 - 22
src/views/EHSD/saleContract/priceSheetEstimate/index.vue

@@ -56,6 +56,11 @@
 
     <el-dialog v-if="openAddDialog" v-model="openAddDialog" title="报价评估" width="90%" append-to-body>
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="formDom">
+        <template #chart>
+          <div style="width:100%;padding-left:25px">
+            <div ref="chartDom" style="height:300px"></div>
+          </div>
+        </template>
         <template #commodity>
           <div style="width: 100%;padding-left:25px">
             <el-table :data="formData.data.quotationProductList" style="width: 100%;" default-expand-all>
@@ -169,6 +174,8 @@
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import { ref } from "vue";
+import * as echarts from "echarts";
+
 const { proxy } = getCurrentInstance();
 const sourceList = ref({
   data: [],
@@ -351,10 +358,24 @@ const formOption = reactive({
   disabled: false,
 });
 const isShowBackRemark = ref(false);
+let myChart = null;
+const chartDom = ref(null);
+const chartData = ref([]);
+const isShowChart = ref(false);
 const formConfig = computed(() => {
   return [
     {
       type: "title1",
+      title: "报价趋势",
+      isShow: isShowChart.value,
+    },
+    {
+      type: "slot",
+      slotName: "chart",
+      isShow: isShowChart.value,
+    },
+    {
+      type: "title1",
       title: "退回原因",
       isShow: isShowBackRemark.value,
     },
@@ -394,6 +415,90 @@ const rules = ref({
   price: [{ required: true, message: "请输入单价", trigger: "blur" }],
 });
 const isDetail = ref(false);
+const chartOption = reactive({
+  data: {
+    tooltip: {
+      trigger: "axis",
+    },
+    // legend: {
+    //   data: ["价格"],
+    // },
+    grid: {
+      left: "3%",
+      right: "6%",
+      top: "10%",
+      bottom: "3%",
+      containLabel: true,
+    },
+    tooltip: {
+      show: true,
+      trigger: "axis",
+      // 格式化函数
+      // valueFormatter: (val) => {
+      //   return val + "aaa";
+      // },
+      formatter: (params, ticket, callback) => {
+        return `
+        ${params[0].seriesName}:${params[0].value}
+        <br/>
+         报价单号:${chartData.value[params[0].dataIndex].code}
+        `;
+      },
+      textStyle: {
+        fontSize: 12,
+      },
+    },
+    // toolbox: {
+    //   feature: {
+    //     saveAsImage: {},
+    //   },
+    // },
+    xAxis: {
+      type: "category",
+      boundaryGap: false,
+      data: [],
+    },
+    yAxis: {
+      type: "value",
+    },
+    series: [
+      {
+        name: "报价金额",
+        type: "line",
+        symbolSize: 10,
+        data: [],
+      },
+    ],
+  },
+});
+const getFileData = () => {
+  let ids = [];
+  formData.data.quotationProductList.map((x) => {
+    // ids.push(x.productId);
+    x.quotationProductBomList.map((y) => {
+      ids.push(y.materialId);
+    });
+  });
+  ids = Array.from(new Set(ids));
+  proxy
+    .post("/fileInfo/getList", {
+      businessIdList: ids,
+    })
+    .then((fileObj) => {
+      formData.data.quotationProductList.map((x) => {
+        // x.fileList = fileObj[x.productId] || [];
+        // if (x.fileList && x.fileList.length > 0) {
+        //   x.fileUrl = x.fileList[0].fileUrl;
+        // }
+        x.quotationProductBomList.map((y) => {
+          y.fileList = fileObj[y.materialId] || [];
+          if (y.fileList && y.fileList.length > 0) {
+            y.fileUrl = y.fileList[0].fileUrl;
+          }
+        });
+      });
+    });
+};
 const getDtl = (row, flag = false) => {
   formOption.disabled = flag;
   isDetail.value = flag;
@@ -416,32 +521,44 @@ const getDtl = (row, flag = false) => {
     // 价格计算
     changeQuantity();
     // 文件数据回显
-    let ids = [];
-    formData.data.quotationProductList.map((x) => {
-      ids.push(x.productId);
-      x.quotationProductBomList.map((y) => {
-        ids.push(y.materialId);
-      });
+    getFileData();
+    let productIds = formData.data.quotationProductList.map((x) => x.productId);
+    proxy.getFileData({
+      businessIdList: productIds,
+      data: formData.data.quotationProductList,
+      att: "productId",
+      businessType: "0",
+      fileAtt: "productFile",
+      filePathAtt: "fileUrl",
     });
-    ids = Array.from(new Set(ids));
-    proxy
-      .post("/fileInfo/getList", {
-        businessIdList: ids,
-      })
-      .then((fileObj) => {
-        formData.data.quotationProductList.map((x) => {
-          x.fileList = fileObj[x.productId] || [];
-          if (x.fileList && x.fileList.length > 0) {
-            x.fileUrl = x.fileList[0].fileUrl;
+    //折线图
+    if (res.quotationTrendList && res.quotationTrendList.length >= 2) {
+      isShowChart.value = true;
+      nextTick(() => {
+        myChart = echarts.init(chartDom.value);
+        window.addEventListener("resize", () => {
+          myChart.resize();
+        });
+        chartData.value = res.quotationTrendList;
+        chartOption.data.xAxis.data = chartData.value.map((item) => {
+          return item.createTime.slice(0, 10);
+        });
+        chartOption.data.series[0].data = chartData.value.map((item, index) => {
+          if (item.code == row.code) {
+            return {
+              value: item.amount || 0,
+              itemStyle: { color: "red" },
+            };
+          } else {
+            return item.amount || 0;
           }
-          x.quotationProductBomList.map((y) => {
-            y.fileList = fileObj[y.materialId] || [];
-            if (y.fileList && y.fileList.length > 0) {
-              y.fileUrl = y.fileList[0].fileUrl;
-            }
-          });
         });
+        myChart.setOption(chartOption.data);
+        myChart.resize();
       });
+    } else {
+      isShowChart.value = false;
+    }
   });
 };
 

+ 48 - 27
src/views/MES/productionBoard/equipmentCapacity/index.vue

@@ -2,35 +2,35 @@
   <div class="main">
     <div class="top">
       <div class="public-title">
-        资源分配情况
+        当天设备运行情况
       </div>
-      <div style="display:flex;text-align:center;align-items:center;padding-left:60px;margin-top:20px">
+      <div style="display:flex;text-align:center;align-items:center;padding-left:110px;margin-top:20px">
         <div class="bk-box" style="background:#F9CB19">
         </div>
         <div style="color:#fff;margin-right:30px;font-size:12px">
-          已分配
+          工作时长
         </div>
-        <div class="bk-box" style="background:#268EFF">
+        <!-- <div class="bk-box" style="background:#268EFF">
         </div>
         <div style="color:#fff;font-size:12px">
-          未分配
-        </div>
+          工作时长
+        </div> -->
       </div>
-      <div style="height:150px" ref="pie_1"></div>
-      <div style="height:150px" ref="pie_2"></div>
-      <div style="height:150px" ref="pie_3"></div>
+      <div style="height:200px" ref="pie_1"></div>
+      <div style="height:200px" ref="pie_2"></div>
+      <div style="height:200px" ref="pie_3"></div>
     </div>
     <div class="bottom">
       <div class="public-title">
-        资源使用情况
+        近7天设备产能
       </div>
       <div style="height:250px;margin-top:8px" ref="line"></div>
       <div class="table">
         <div class="public-title">
-          应用资源使用排名
+          生产明细
         </div>
         <div class="row-box">
-          <div style="width:50%;padding:20px 20px">
+          <!-- <div style="width:50%;padding:20px 20px">
             <table class="table-box">
               <tr>
                 <td style="width:20%;color:#5D94C6;background:#243B6D;padding:5px 0">
@@ -58,18 +58,24 @@
               </template>
 
             </table>
-          </div>
-          <div style="width:50%;padding:20px 20px">
+          </div> -->
+          <div style="width:100%;padding:20px 20px">
             <table class="table-box">
               <tr>
+                <td style="width:15%;color:#5D94C6;background:#243B6D;padding:5px 0">
+                  设备名称
+                </td>
+                <td style="width:15%;color:#5D94C6;background:#243B6D;padding:5px 0" class="hasBorder">
+                  生产订单
+                </td>
                 <td style="width:20%;color:#5D94C6;background:#243B6D;padding:5px 0">
-                  排名
+                  产品编码
                 </td>
                 <td style="width:40%;color:#5D94C6;background:#243B6D;padding:5px 0" class="hasBorder">
-                  应用系统名称
+                  产品名称
                 </td>
-                <td style="width:40%;color:#5D94C6;background:#243B6D;padding:5px 0">
-                  CPU使用率(%)
+                <td style="width:10%;color:#5D94C6;background:#243B6D;padding:5px 0">
+                  标刻用时(秒)
                 </td>
               </tr>
               <template v-for="(item,index) in tableData" :key="index">
@@ -83,6 +89,12 @@
                   <td>
                     {{item.rate}}
                   </td>
+                  <td class="hasBorder">
+                    {{item.label}}
+                  </td>
+                  <td>
+                    {{item.rate}}
+                  </td>
                 </tr>
               </template>
 
@@ -113,8 +125,8 @@ const getOption = () => {
   return {
     title: {
       show: true,
-      text: "设备",
-      bottom: "-4%",
+      text: "设备名称:设备1\n当天标刻数量:10\n在线工作时长(分钟):100",
+      bottom: "-2%",
       left: "center",
       textStyle: {
         color: "#fff",
@@ -137,7 +149,10 @@ const getOption = () => {
       {
         name: "设备",
         type: "pie",
-        radius: ["48%", "75%"],
+        // center: ["50%", "50%"],
+        radius: ["40%", "65%"],
+        top: "0%",
+        bottom: "5%",
         avoidLabelOverlap: false,
         label: {
           show: false,
@@ -156,15 +171,15 @@ const getOption = () => {
         },
         data: [
           {
-            value: 1048,
-            name: "已分配",
+            value: 1200,
+            name: "工作时长",
             itemStyle: {
               color: "#F9CB19",
             },
           },
           {
-            value: 735,
-            name: "未分配",
+            value: 300,
+            name: "",
             itemStyle: {
               color: "#268EFF",
             },
@@ -312,8 +327,10 @@ onMounted(() => {
   pie_1Chart.resize();
 
   option2 = getOption();
-  option2.series[0].data[0].value = 65;
-  option2.series[0].data[1].value = 98;
+  option2.title.text =
+    "设备名称:设备2\n当天标刻数量:1\n在线工作时长(分钟):50";
+  option2.series[0].data[0].value = 600;
+  option2.series[0].data[1].value = 900;
   pie_2Chart = echarts.init(pie_2.value);
   window.addEventListener("resize", () => {
     pie_2Chart.resize();
@@ -322,6 +339,10 @@ onMounted(() => {
   pie_2Chart.resize();
 
   option3 = getOption();
+  option3.title.text =
+    "设备名称:设备3\n当天标刻数量:20\n在线工作时长(分钟):200";
+  option3.series[0].data[0].value = 1300;
+  option3.series[0].data[1].value = 200;
   pie_3Chart = echarts.init(pie_3.value);
   window.addEventListener("resize", () => {
     pie_3Chart.resize();

+ 1 - 0
src/views/purchaseManage/purchaseManage/purchase/index.vue

@@ -289,6 +289,7 @@ const config = computed(() => {
         label: "操作",
         width: "80",
         align: "center",
+        fixed: "right",
       },
       // 渲染 el-button,一般用在最后一列。
       renderHTML(row) {

+ 12 - 3
src/views/purchaseSales/outAndInWarehouse/waitingForStorage/index.vue

@@ -6,7 +6,7 @@
       </byTable>
     </div>
 
-    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="400" v-loading="loadingDialog">
+    <el-dialog title="入库" v-if="dialogVisible" v-model="dialogVisible" width="1200" v-loading="loadingDialog">
       <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
       </byForm>
       <template #footer>
@@ -246,7 +246,8 @@ const formData = reactive({
 const formConfig = computed(() => {
   return [
     {
-      label: "待入库信息",
+      type: "title1",
+      title: "待入库信息",
     },
     {
       type: "select",
@@ -254,6 +255,7 @@ const formConfig = computed(() => {
       label: "数据来源",
       disabled: true,
       data: businessType.value,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -261,6 +263,7 @@ const formConfig = computed(() => {
       label: "单号",
       itemType: "text",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -268,6 +271,7 @@ const formConfig = computed(() => {
       label: "物品名称",
       itemType: "text",
       disabled: true,
+      itemWidth: 50,
     },
     {
       type: "input",
@@ -275,9 +279,12 @@ const formConfig = computed(() => {
       label: "待入库数量",
       itemType: "text",
       disabled: true,
+      itemWidth: 50,
     },
+
     {
-      label: "本次入库",
+      type: "title1",
+      title: "本次入库",
     },
     {
       type: "select",
@@ -285,6 +292,7 @@ const formConfig = computed(() => {
       label: "仓库名称",
       required: true,
       data: warehouseList.value,
+      itemWidth: 50,
     },
     {
       type: "number",
@@ -293,6 +301,7 @@ const formConfig = computed(() => {
       precision: 0,
       min: 1,
       controls: false,
+      itemWidth: 50,
     },
   ];
 });

+ 20 - 20
src/views/purchaseSales/warehouseConfig/warehouse/index.vue

@@ -95,12 +95,12 @@ const config = computed(() => {
         return proxy.dictKeyValue(type, warehouseType.value);
       },
     },
-    {
-      attrs: {
-        label: "仓管员名称",
-        prop: "keeperName",
-      },
-    },
+    // {
+    //   attrs: {
+    //     label: "仓管员名称",
+    //     prop: "keeperName",
+    //   },
+    // },
     {
       attrs: {
         label: "备注",
@@ -199,20 +199,20 @@ const formConfig = computed(() => [
     prop: "name",
     label: "仓库名称",
   },
-  {
-    type: "select",
-    prop: "keeperId",
-    label: "仓管员",
-    isLoad: {
-      url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
-        useUserStore().user.tenantId
-      }`,
-      labelKey: "nickName",
-      labelVal: "userId",
-      method: "get",
-      resUrl: "rows",
-    },
-  },
+  // {
+  //   type: "select",
+  //   prop: "keeperId",
+  //   label: "仓管员",
+  //   isLoad: {
+  //     url: `/tenantUser/list?pageNum=1&pageSize=9999&tenantId=${
+  //       useUserStore().user.tenantId
+  //     }`,
+  //     labelKey: "nickName",
+  //     labelVal: "userId",
+  //     method: "get",
+  //     resUrl: "rows",
+  //   },
+  // },
   {
     type: "input",
     itemType: "textarea",