Explorar el Código

Merge remote-tracking branch 'origin/master'

hmc hace 1 año
padre
commit
b979b5f5e1

+ 12 - 11
zkqy-ui/src/api/homePage/index.js

@@ -1,22 +1,22 @@
 import request from '@/utils/request'
 
-//工业流&审批流
-export function getProcess() {
+//任务统计
+export function getTask() {
     return request({
       url: '/statistics/info/getProcessInformation',
       method: 'get',
     })
 }
 
-//登录次数统计
-export function getLogin() {
+//管道统计
+export function getPipeline() {
    return request({
      url: '/statistics/info/getLoginInformationStatistics',
      method: 'get',
    })
 }
 
-//登录统计信息
+//操作日志
 export function getOperation() {
     return request({
       url: '/statistics/info/getOperationInformationStatistics',
@@ -24,17 +24,18 @@ export function getOperation() {
     })
 }
 
-//数据建模数量
-export function getData() {
+//原材料统计
+export function getMaterial() {
     return request({
-      url: '/statistics/info/getDataModelingStatistics',
+      url: '/statistics/info/getTabularStatistics',
       method: 'get',
     })
 }
-//表单表格
-export function getTabular() {
+
+//用户登录统计
+export function getLogin() {
     return request({
-      url: '/statistics/info/getTabularStatistics',
+      url: '/statistics/info/getDataModelingStatistics',
       method: 'get',
     })
 }

+ 209 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/Sorting.vue

@@ -0,0 +1,209 @@
+<template>
+  <div class="app-containeteamIdr">
+    <el-row gutter="10">
+      <el-form
+        :model="form"
+        ref="form"
+        label-width="100px"
+        align="left"
+        :inline="false"
+        size="normal"
+      >
+        <el-col :span="12">
+          <el-form-item label="机台号:" prop="productionLineNo">
+            {{ form.productionLineNo }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="任务:" prop="taskName">
+            {{ form.taskName }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="产品名:" prop="productName">
+            {{ form.productName }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="规格:" prop="productSpecifications">
+            {{ form.productSpecifications }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="类型:" prop="productType">
+            {{ form.productType }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="数量:" prop="productNumber">
+            {{ form.productNumber }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="18">
+          <el-form-item label="备注:" prop="remark">
+            <el-input
+              v-model="form.remark"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item>
+            <el-button
+              type="primary"
+              size="small"
+              @click="submitHandler"
+              icon="el-icon-success"
+              >记录</el-button
+            >
+          </el-form-item>
+        </el-col>
+      </el-form>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
+export default {
+  name: "Sorting",
+  props: ["formData", "row"],
+  data() {
+    return {
+      isEdit: false,
+      id: "",
+      form: {
+        remark: "",
+        productionLineNo: "", //机台号
+        taskName: "", //任务
+        productName: "", //产品名称
+        productSpecifications: "", //规格
+        productType: "", //类型
+        productNumber: "", //数量
+      },
+    };
+  },
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+  },
+  watch: {
+    myFormData: {
+      handler(nval) {
+        console.log("nval", nval);
+        console.log("row", this.row);
+        let { products, saleProducts, productAddAmmunition } = nval.resultMap;
+        if (products && saleProducts) {
+          let { production_line_no, task_name, product_number } =
+            saleProducts.resultMap;
+          let { product_name, product_specifications, product_type } =
+            products.resultMap;
+          this.form = {
+            remark: "",
+            productionLineNo: production_line_no, //机台号
+            taskName: task_name, //任务
+            productName: product_name, //产品名称
+            productSpecifications: product_specifications, //规格
+            productType: product_type, //类型
+            productNumber: product_number, //数量
+          };
+        }
+        this.isEdit = productAddAmmunition.resultMap.id ? true : false;
+        if (this.isEdit) {
+          this.form.remark = productAddAmmunition.resultMap.remark;
+          this.id = productAddAmmunition.resultMap.id;
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  mounted() {},
+  methods: {
+    async submitHandler() {
+      console.log(this.row);
+      let res = await this.$refs.form?.validate();
+      if (res) {
+        let payLoad = {};
+        let { remark } = this.form;
+        if (this.isEdit) {
+          // let { taskProcessKey, taskNodeKey } = this.myFormData.resultMap;
+          payLoad.updateCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "sale_product_add_ammunition",
+              },
+              conditionMap: {
+                // task_process_key: taskProcessKey,
+                // task_node_key: taskNodeKey,
+                id: this.id,
+              },
+              commMap: {
+                sale_product_id: this.row.bepTaskPlanKey,
+                add_ammunition_type: 1, //拣货1
+                remark: remark,
+              },
+            },
+          ];
+        } else {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "sale_product_add_ammunition",
+              },
+              addListMap: [
+                {
+                  sale_product_id: this.row.bepTaskPlanKey,
+                  add_ammunition_type: 1, //拣货1
+                  remark: remark,
+                  // taskProcessKey: this.row.benTaskProcessKey,
+                  // taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          if (response.code == 200) {
+            this.$modal.msgSuccess("保存成功");
+          } else {
+            this.$modal.error("保存失败,请稍后再试");
+          }
+        });
+      }
+    },
+    async getFormData() {
+      let formData = {
+        flag: false,
+        msg: "",
+      };
+      try {
+        let valid = await this.$refs.form.validate();
+        if (valid) {
+          formData.flag = true;
+          formData.data = this.form;
+          return formData;
+        } else {
+          formData.msg = "表单校验异常,请规范填写表单数据";
+          return formData;
+        }
+      } catch (error) {
+        // console.log(error);
+        formData.msg = "表单校验异常,请规范填写表单数据";
+        return formData;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-button {
+  background: rgb(123, 213, 195);
+  border: rgb(123, 213, 195);
+  float: right;
+}
+</style>

+ 209 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/UpSilk.vue

@@ -0,0 +1,209 @@
+<template>
+  <div class="app-containeteamIdr">
+    <el-row :gutter="10">
+      <el-form
+        :model="form"
+        ref="form"
+        label-width="100px"
+        align="left"
+        :inline="false"
+        size="normal"
+      >
+        <el-col :span="12">
+          <el-form-item label="机台号:" prop="productionLineNo">
+            {{ form.productionLineNo }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="任务:" prop="taskName">
+            {{ form.taskName }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="产品名:" prop="productName">
+            {{ form.productName }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="规格:" prop="productSpecifications">
+            {{ form.productSpecifications }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="类型:" prop="productType">
+            {{ form.productType }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="数量:" prop="productNumber">
+            {{ form.productNumber }}
+          </el-form-item>
+        </el-col>
+        <el-col :span="18">
+          <el-form-item label="备注:" prop="remark">
+            <el-input
+              v-model="form.remark"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item>
+            <el-button
+              type="primary"
+              size="small"
+              @click="submitHandler"
+              icon="el-icon-success"
+              >记录</el-button
+            >
+          </el-form-item>
+        </el-col>
+      </el-form>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
+export default {
+  name: "Sorting",
+  props: ["formData", "row"],
+  data() {
+    return {
+      isEdit: false,
+      id: "",
+      form: {
+        remark: "",
+        productionLineNo: "", //机台号
+        taskName: "", //任务
+        productName: "", //产品名称
+        productSpecifications: "", //规格
+        productType: "", //类型
+        productNumber: "", //数量
+      },
+    };
+  },
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+  },
+  watch: {
+    myFormData: {
+      handler(nval) {
+        console.log("nval", nval);
+        console.log("row", this.row);
+        let { products, saleProducts, productAddAmmunition } = nval.resultMap;
+        if (products && saleProducts) {
+          let { production_line_no, task_name, product_number } =
+            saleProducts.resultMap;
+          let { product_name, product_specifications, product_type } =
+            products.resultMap;
+          this.form = {
+            remark: "",
+            productionLineNo: production_line_no, //机台号
+            taskName: task_name, //任务
+            productName: product_name, //产品名称
+            productSpecifications: product_specifications, //规格
+            productType: product_type, //类型
+            productNumber: product_number, //数量
+          };
+        }
+        this.isEdit = productAddAmmunition.resultMap.id ? true : false;
+        if (this.isEdit) {
+          this.form.remark = productAddAmmunition.resultMap.remark;
+          this.id = productAddAmmunition.resultMap.id;
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  mounted() {},
+  methods: {
+    async submitHandler() {
+      console.log(this.row);
+      let res = await this.$refs.form?.validate();
+      if (res) {
+        let payLoad = {};
+        let { remark } = this.form;
+        if (this.isEdit) {
+          // let { taskProcessKey, taskNodeKey } = this.myFormData.resultMap;
+          payLoad.updateCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "sale_product_add_ammunition",
+              },
+              conditionMap: {
+                // task_process_key: taskProcessKey,
+                // task_node_key: taskNodeKey,
+                id: this.id,
+              },
+              commMap: {
+                sale_product_id: this.row.bepTaskPlanKey,
+                add_ammunition_type: 2, //拣货1 上丝2
+                remark: remark,
+              },
+            },
+          ];
+        } else {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "sale_product_add_ammunition",
+              },
+              addListMap: [
+                {
+                  sale_product_id: this.row.bepTaskPlanKey,
+                  add_ammunition_type: 2, //拣货1
+                  remark: remark,
+                  // taskProcessKey: this.row.benTaskProcessKey,
+                  // taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          if (response.code == 200) {
+            this.$modal.msgSuccess("保存成功");
+          } else {
+            this.$modal.error("保存失败,请稍后再试");
+          }
+        });
+      }
+    },
+    async getFormData() {
+      let formData = {
+        flag: false,
+        msg: "",
+      };
+      try {
+        let valid = await this.$refs.form.validate();
+        if (valid) {
+          formData.flag = true;
+          formData.data = this.form;
+          return formData;
+        } else {
+          formData.msg = "表单校验异常,请规范填写表单数据";
+          return formData;
+        }
+      } catch (error) {
+        // console.log(error);
+        formData.msg = "表单校验异常,请规范填写表单数据";
+        return formData;
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-button {
+  background: rgb(123, 213, 195);
+  border: rgb(123, 213, 195);
+  float: right;
+}
+</style>

+ 6 - 5
zkqy-ui/src/views/bussiness/processMange.vue

@@ -194,10 +194,7 @@
             v-if="myForm"
           ></component>
 
-          <!-- <AppearanceInspection
-            :formData="formData"
-            :row="row"
-          ></AppearanceInspection> -->
+          <!-- <Sorting ref="myFormRef" :formData="formData" :row="row"></Sorting> -->
           <!-- <PhysicalInspection
             :formData="formData"
             :row="row"
@@ -267,7 +264,9 @@ import Inspect from "./dialogCompments/GongYi/Inspect.vue";
 import PhysicalInspection from "./dialogCompments/GongYi/PhysicalInspection.vue";
 // 外观指标
 import AppearanceInspection from "./dialogCompments/GongYi/AppearanceInspection.vue";
-
+//
+import Sorting from "./dialogCompments/GongYi/Sorting.vue";
+import UpSilk from "./dialogCompments/GongYi/UpSilk.vue";
 export default {
   name: "processMange",
   props: [],
@@ -306,6 +305,8 @@ export default {
     WareHousing,
     PhysicalInspection,
     AppearanceInspection,
+    Sorting, //分拣
+    UpSilk, //上丝
   },
   dicts: ["bpm_type", "task_process_state"],
   data() {

+ 35 - 23
zkqy-ui/src/views/index.vue

@@ -110,11 +110,11 @@ import { mapGetters, mapState } from "vuex";
 import "swiper/css/swiper.css";
 import Swiper from "swiper";
 import {
-  getProcess,
+  getTask,
+  getPipeline,
   getOperation,
+  getMaterial,
   getLogin,
-  getTabular,
-  getData,
 } from "@/api/homePage/index";
 
 export default {
@@ -184,8 +184,8 @@ export default {
   },
   methods: {
     initData() {
-      //工业流&审批流
-      getProcess().then((response) => {
+      //任务统计
+      getTask().then((response) => {
         if (response.code == 200) {
           this.processList = response.data;
           //   console.log(this.processList);
@@ -202,8 +202,8 @@ export default {
         }
       });
 
-      //登录次数统计
-      getLogin().then((response) => {
+      //管道统计
+      getPipeline().then((response) => {
         if (response.code == 200) {
           //  console.log(response.data);
           //  console.log(response.data[0].date);
@@ -228,7 +228,7 @@ export default {
         }
       });
 
-      //登录统计信息
+      //操作日志
       getOperation().then((response) => {
         if (response.code == 200) {
           this.swiperList = response.data;
@@ -254,12 +254,12 @@ export default {
         }
       });
 
-      // 表格统计
-      getTabular().then((response) => {
+      //原材料统计
+      getMaterial().then((response) => {
         if (response.code == 200) {
           //  console.log(response.data);
           let tabularList = response.data;
-          tabularList.push({ name: "多表数量", value: 30 });
+          //  tabularList.push({ name: "多表数量", value: 30 });
           let labelList = response.data.map((item) => item.name);
           this.chartObj.myChart3.setOption({
             yAxis: {
@@ -277,8 +277,8 @@ export default {
         }
       });
 
-      //数据建模数量
-      getData().then((response) => {
+      //用户登录统计
+      getLogin().then((response) => {
         if (response.code == 200) {
           let modelData = response.data;
           //  console.log(modelData);
@@ -301,7 +301,7 @@ export default {
       let option = {
         color: ["#9370db", "#ffd700", "#00ccff", "#ff6600", "#ff9900"],
         title: {
-          text: "流程统计",
+          text: "任务统计",
           left: "left",
           textStyle: {
             fontSize: 16,
@@ -358,7 +358,7 @@ export default {
       let option = {
         color: ["#FF88E0", "#9FE080"],
         title: {
-          text: "用户登录统计",
+          text: "管道统计",
           textStyle: {
             fontSize: 16,
             fontWeight: "normal",
@@ -369,7 +369,7 @@ export default {
           trigger: "axis",
         },
         legend: {
-          data: ["客户端11", "工具端22"],
+          data: ["在产生产任务", "完成数量"],
         },
         grid: {
           left: "3%",
@@ -446,7 +446,7 @@ export default {
       let option = {
         color: ["#00ccff", "#ff6600", "#ff9900", "#9370db", "#ffd700"],
         title: {
-          text: "表格统计",
+          text: "原材料统计",
           left: "left",
           textStyle: {
             fontSize: 16,
@@ -480,7 +480,7 @@ export default {
 
         yAxis: {
           type: "category",
-          data: ["表单", "表格", "三级联动", "多表数量"],
+          data: ["总数", "入库数量", "出库数量"],
           inverse: true, // 使类目从右向左排列
         },
 
@@ -493,7 +493,6 @@ export default {
               { value: 88, name: "表单" },
               { value: 66, name: "表格" },
               { value: 33, name: "三级联动" },
-              { value: 55, name: "多表数量" },
             ],
             showBackground: true,
             backgroundStyle: {
@@ -510,7 +509,7 @@ export default {
       let option = {
         color: ["#5D84FE"],
         title: {
-          text: "数据建模统计",
+          text: "用户登录统计",
           textStyle: {
             fontSize: 16,
             fontWeight: "normal",
@@ -525,7 +524,20 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: ["数据建模"],
+          data: [
+            "1月",
+            "2月",
+            "3月",
+            "4月",
+            "5月",
+            "6月",
+            "7月",
+            "8月",
+            "9月",
+            "10月",
+            "11月",
+            "12月",
+          ],
         },
         yAxis: {
           type: "value",
@@ -739,7 +751,7 @@ export default {
       }
     }
     .echarts4 {
-      width: 48%;
+      width: 20%;
       height: 200px;
       margin: auto;
       padding: 20px 15px;
@@ -753,7 +765,7 @@ export default {
       }
     }
     .echarts5 {
-      width: 25%;
+      width: 53%;
       height: 200px;
       margin: auto;
       padding: 20px 15px;