瀏覽代碼

Merge remote-tracking branch 'origin/master'

hmc 1 年之前
父節點
當前提交
59bf0a9b62

+ 28 - 0
zkqy-ui/src/components/FormGroup/FormDetail.vue

@@ -60,10 +60,17 @@ export default {
         return [];
       },
     },
+    times: {
+      type: Number,
+      default: () => {
+        return 1;
+      },
+    },
   },
   components: {},
   data() {
     return {
+      myT: 1,
       form: {
         approvalStatus: "", //审批结果
         approvalRemark: "", //审批备注
@@ -110,6 +117,14 @@ export default {
     myFormList() {
       return this.disableHandler(this.formList);
     },
+    mytimes() {
+      return this.times;
+    },
+  },
+  watch: {
+    mytimes(val) {
+      this.myT = val;
+    },
   },
   methods: {
     /**
@@ -152,6 +167,14 @@ export default {
             subData.template.dfVueTemplate = disableFormItem(
               JSON.parse(subItem.showTemplate.dfVueTemplate)
             ); //禁用表单
+            console.log(
+              "subData.template.dfVueTemplate",
+              subData.template.dfVueTemplate
+            );
+            if (subData.template.dfVueTemplate.list[0]?.type == "batch") {
+              //动态表格禁用按钮
+              subData.template.dfVueTemplate.list[0].options.disabled = true;
+            }
             if (subItem.showTemplate.spare == "2") {
               //动态表单
               subData.template.defaultValue = this.getTableShowData(subItem);
@@ -185,6 +208,11 @@ export default {
         }
       });
       console.log(JSON.parse(JSON.stringify(formList)), "formList");
+      // console.log("times", this.myT);
+      // if (this.myT) {
+      //   this.myT--;
+      //   this.disableHandler(this.formList);
+      // }
       return formList;
     },
     // 获取动态表格的回显数据

+ 33 - 3
zkqy-ui/src/views/bussiness/detail/FlowChart.vue

@@ -33,6 +33,10 @@ export default {
       type: Object,
       default: () => {},
     },
+    nodeLogList: {
+      type: Array,
+      default: () => [],
+    },
   },
   data() {
     return {
@@ -114,19 +118,29 @@ export default {
 
     // 设置高亮颜色的
     fillColor(nodeData) {
+      console.log("nodeData", nodeData);
       const canvas = this.bpmnViewer.get("canvas");
+      let isReject = false;
       this.bpmnViewer
         .getDefinitions()
         .rootElements[0].flowElements.forEach((n) => {
           const completeTask = nodeData.find((m) => m.key === n.id);
+          console.log(completeTask);
+
           const todoTask = nodeData.find((m) => !m.completed);
           const endTask = nodeData[nodeData.length - 1];
           if (n.$type === "bpmn:UserTask") {
             if (completeTask) {
-              canvas.addMarker(
-                n.id,
-                completeTask.completed ? "highlight" : "highlight-todo"
+              const completeTaskData = this.nodeLogList.find(
+                (m) => m.taskNodeKey === completeTask.key
               );
+              let className = !completeTask.completed
+                ? "highlight-todo"
+                : completeTaskData.taskNodeOtherState == "pass"
+                ? "highlight"
+                : "highlight-reject";
+              console.log(className);
+              canvas.addMarker(n.id, className);
               n.outgoing?.forEach((nn) => {
                 const targetTask = nodeData.find(
                   (m) => m.key === nn.targetRef.id
@@ -294,6 +308,22 @@ export default {
   .highlight.djs-connection > .djs-visual > path {
     stroke: green !important;
   }
+  .highlight-reject.djs-shape .djs-visual > :nth-child(1) {
+    fill: rgb(238, 105, 52) !important;
+    stroke: rgb(238, 105, 52) !important;
+    fill-opacity: 0.2 !important;
+  }
+  .highlight-reject.djs-shape .djs-visual > :nth-child(2) {
+    fill: rgb(238, 105, 52) !important;
+  }
+  .highlight-reject.djs-shape .djs-visual > path {
+    fill: rgb(238, 105, 52) !important;
+    fill-opacity: 0.2 !important;
+    stroke: rgb(238, 105, 52) !important;
+  }
+  .highlight-reject.djs-connection > .djs-visual > path {
+    stroke: rgb(238, 105, 52) !important;
+  }
   .highlight-todo.djs-connection > .djs-visual > path {
     stroke: orange !important;
     stroke-dasharray: 4px !important;

+ 27 - 2
zkqy-ui/src/views/bussiness/detail/index.vue

@@ -10,17 +10,22 @@
           @click="goBack"
           >关闭</el-button
         >
+        <!-- <el-button type="primary" size="default" @click="reloade"
+          >test</el-button
+        > -->
       </div>
       <el-tabs
         tab-position="top"
         v-model="activeName"
         @tab-click="tabChangeHandler"
+        v-show="formDetailShow"
       >
         <!--表单信息-->
         <el-tab-pane label="表单信息" name="1">
           <el-col :span="16" :offset="4">
             <div class="test-form">
               <FormDetail
+                :times="times"
                 :formList="formList"
                 :nodeLogList="nodeLogList"
               ></FormDetail>
@@ -35,7 +40,11 @@
         </el-tab-pane>
         <!--流程图 -->
         <el-tab-pane label="流程图" name="3">
-          <FlowChart ref="flowChartRef" :flowData="flowData"></FlowChart>
+          <FlowChart
+            ref="flowChartRef"
+            :flowData="flowData"
+            :nodeLogList="nodeLogList"
+          ></FlowChart>
         </el-tab-pane>
       </el-tabs>
     </el-card>
@@ -61,6 +70,8 @@ import getNodeSequence from "@/utils/bpmn/getNodeSequence";
 // 模拟表单列表数据
 import formList from "./formList.js";
 import flowData from "./flowData.js";
+import { time } from "echarts";
+// import { set } from "vue/types/umd";
 export default {
   name: "Record",
   components: {
@@ -74,6 +85,8 @@ export default {
   props: {},
   data() {
     return {
+      formDetailShow: false,
+      times: 1, //重新加载页面
       activeName: "1",
       formList: [], //表单数据
       nodeLogList: [], //审批数据
@@ -83,11 +96,16 @@ export default {
   created() {},
   mounted() {
     let { taskNodeKey, taskProcessKey, taskPlanKey } = this.$route.query;
+    this.times = 1;
     if (taskNodeKey && taskProcessKey && taskPlanKey) {
       this.initFormData({ taskNodeKey, taskProcessKey, taskPlanKey });
     }
   },
   methods: {
+    reloade() {
+      console.log(111);
+      this.$forceUpdate();
+    },
     // xml字符串转xml对象
     xmlStr2XmlObj(xmlStr) {
       var xmlObj = {};
@@ -107,11 +125,17 @@ export default {
         if (res.code == 200) {
           this.formList = res.data;
           let row = window.sessionStorage.getItem("oaRow");
-          // console.log(object);
           if (row) {
             this.nodeLogList = JSON.parse(row).nodeLog?.slice(1);
             this.initFlowData(row);
           }
+          this.formDetailShow = true;
+        }
+        if (this.times == 1) {
+          setTimeout(() => {
+            this.initFormData(payLoad);
+            this.times = 0;
+          }, 1000);
         }
       } catch (error) {
         console.log(error);
@@ -125,6 +149,7 @@ export default {
       let nodeSequence = getNodeSequence(xmlObj);
       let currentNodeKey = row.benTaskNodeKey;
       let isCompleted = true;
+      console.log(currentNodeKey);
       let nodeData = nodeSequence.map((item, index, list) => {
         if (currentNodeKey === item.nodeId && index != list.length - 1) {
           isCompleted = false;

+ 6 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/AppearanceInspection.vue

@@ -101,6 +101,7 @@ export default {
         },
       ],
       formShow: true,
+      saleProductsData: {},
     };
   },
   watch: {
@@ -109,6 +110,8 @@ export default {
       deep: true,
       async handler(val) {
         console.log(val);
+        this.saleProductsData = val.resultMap.saleProducts.resultMap;
+        console.log(this.saleProductsData);
         await this.initFormInfo(); //初始化表单数据
         this.isEdit = Object.keys(val.resultMap.inspectionList.resultMap).length
           ? true
@@ -194,6 +197,7 @@ export default {
     async record() {
       let uuid = uuidv4();
       let { bepTaskName, bepTaskKey, benTaskNodeKey } = this.rowData;
+      let { lot_number, materieColorNumber } = this.saleProductsData;
       let payLoad = {
         id: this.isEdit ? this.inspectionId : null,
         inspectionListNo: this.isEdit ? this.inspectionListNo : uuid, //检验单编号
@@ -206,6 +210,8 @@ export default {
         indexType: "2", //1:物理指标  2:外观指标
         saleProductNo: this.saleProductNo, //销售产品编号
         inspectionListInfoList: [],
+        lotNumber: lot_number,
+        colourNumber: materieColorNumber,
       };
       // payLoad.inspectionListInfo = {
       //   ...this.dictForm,

+ 5 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/PhysicalInspection.vue

@@ -66,6 +66,7 @@ export default {
   components: {},
   data() {
     return {
+      saleProductsData: {},
       isAddSuccess: false,
       productName: "",
       productNo: "",
@@ -109,6 +110,7 @@ export default {
       deep: true,
       async handler(val) {
         console.log(val);
+        this.saleProductsData = val.resultMap.saleProducts.resultMap;
         await this.initFormInfo(); //初始化表单数据
         this.isEdit = Object.keys(val.resultMap.inspectionList.resultMap).length
           ? true
@@ -193,6 +195,7 @@ export default {
     async record() {
       let uuid = uuidv4();
       let { bepTaskName, bepTaskKey, benTaskNodeKey } = this.rowData;
+      let { lot_number, materieColorNumber } = this.saleProductsData;
       let payLoad = {
         id: this.isEdit ? this.inspectionId : null,
         inspectionListNo: this.isEdit ? this.inspectionListNo : uuid, //检验单编号
@@ -205,6 +208,8 @@ export default {
         indexType: "1", //1:物理指标  2:外观指标
         saleProductNo: this.saleProductNo, //销售产品编号
         inspectionListInfoList: [],
+        lotNumber: lot_number,
+        colourNumber: materieColorNumber,
       };
       // payLoad.inspectionListInfo = {
       //   ...this.dictForm,

+ 4 - 9
zkqy-ui/src/views/orderMange/approve.vue

@@ -712,7 +712,7 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="12">
+            <!-- <el-col :span="12">
               <el-form-item label="业务主管:">
                 <el-input
                   v-model="approveForm.saleLeader"
@@ -738,7 +738,7 @@
                   clearable
                 ></el-input>
               </el-form-item>
-            </el-col>
+            </el-col> -->
           </el-form>
         </el-row>
         <div slot="footer" class="dialog-footer">
@@ -1279,17 +1279,12 @@ export default {
                 <tr align="center">
                     <td colspan="2">业务员:</td>
                     <td colspan="2">${salesman}</td>
-                    <td colspan="2">业务主管:</td>
-                    <td colspan="2">${saleLeader}</td>
-                </tr>
-                <tr align="center">
                     <td colspan="2">财务部:</td>
                     <td colspan="2">${finance}</td>
-                    <td colspan="2">生产部:</td>
-                    <td colspan="2">${production}</td>
+                    
                 </tr>
                 <tr align="center">
-                    <td colspan="2">批准人:</td>
+                    <td colspan="2">业务主管:</td>
                     <td colspan="2">${saleApprover}</td>
                     <td></td>
                     <td></td>

+ 2 - 7
zkqy-ui/src/views/orderMange/financeApprove.vue

@@ -305,7 +305,7 @@
       </span>
     </el-dialog>
     <!-- 详情 -->
-    <el-dialog title="详情" :visible.sync="detailShow" width="1200px">
+    <el-dialog title="详情" :visible.sync="detailShow" width="1300px">
       <div ref="detailTable" id="detail"></div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="detailShow = false">取 消</el-button>
@@ -806,15 +806,10 @@ export default {
                 <tr align="center">
                     <td colspan="2">业务员:</td>
                     <td colspan="2">${salesman}</td>
-                    <td colspan="2">业务主管:</td>
-                    <td colspan="2">${saleLeader}</td>
-                </tr>
-                <tr align="center">
                     <td colspan="2">财务部:</td>
                     <td colspan="2">${finance}</td>
-                    <td colspan="2">生产部:</td>
-                    <td colspan="2">${production}</td>
                 </tr>
+                
                 <tr align="center">
                     <td colspan="2">批准人:</td>
                     <td colspan="2">${saleApprover}</td>

+ 10 - 7
zkqy-ui/src/views/orderMange/index.vue

@@ -2955,17 +2955,13 @@ export default {
                 <tr align="center">
                     <td colspan="2">业务员:</td>
                     <td colspan="2">${salesman}</td>
-                    <td colspan="2">业务主管:</td>
-                    <td colspan="2">${saleLeader}</td>
-                </tr>
-                <tr align="center">
                     <td colspan="2">财务部:</td>
                     <td colspan="2">${finance}</td>
-                    <td colspan="2">生产部:</td>
-                    <td colspan="2">${production}</td>
+                    
                 </tr>
+                
                 <tr align="center">
-                    <td colspan="2">批准人:</td>
+                    <td colspan="2">业务主管:</td>
                     <td colspan="2">${saleApprover}</td>
                     <td></td>
                     <td></td>
@@ -2976,6 +2972,13 @@ export default {
         </table>
         `;
         return printStr;
+        // <td colspan="2">业务主管:</td>
+        // <td colspan="2">${saleLeader}</td>
+        // <tr align="center">
+
+        //     // <td colspan="2">生产部:</td>
+        //     // <td colspan="2">${production}</td>
+        // </tr>
         //         <tr align="center">
         //             <td colspan="2"> 2</td>
         //             <td> </td>