From 8527b19d2b64db40db7b152ac9dcb207784a1b64 Mon Sep 17 00:00:00 2001
From: 王震 <10952869+daywangzhen@user.noreply.gitee.com>
Date: 星期四, 11 一月 2024 16:07:05 +0800
Subject: [PATCH] 	modified:   src/api/plan/manufacturingorder.js 	new file:   src/views/common/processinspect-part.vue 	modified:   src/views/plan/manufacturingorder/productorder-form.vue 	modified:   src/views/quality/processInspect/processInspect-form.vue 	modified:   src/views/technology/routing/routing-form.vue 	modified:   vue.config.js

---
 vue.config.js                                            |    6 
 src/views/technology/routing/routing-form.vue            |   12 -
 src/views/common/processinspect-part.vue                 |  258 ++++++++++++++++++++++++++++++++
 src/views/plan/manufacturingorder/productorder-form.vue  |  118 +++++++++++++-
 src/api/plan/manufacturingorder.js                       |    9 +
 src/views/quality/processInspect/processInspect-form.vue |   19 ++
 6 files changed, 400 insertions(+), 22 deletions(-)

diff --git a/src/api/plan/manufacturingorder.js b/src/api/plan/manufacturingorder.js
index e9b8d5d..ffa8ee1 100644
--- a/src/api/plan/manufacturingorder.js
+++ b/src/api/plan/manufacturingorder.js
@@ -24,6 +24,15 @@
     data: obj
   })
 }
+
+export function changeOrder(obj) {
+  return request({
+    url: '/mes/plan/manufacturingOrder/changeOrder',
+    method: 'post',
+    data: obj
+  })
+}
+
 export function refreshIfsOrderNo(obj) {
   return request({
     url: '/mes/plan/manufacturingOrder/refreshIfsOrderNo',
diff --git a/src/views/common/processinspect-part.vue b/src/views/common/processinspect-part.vue
new file mode 100644
index 0000000..f7f7ade
--- /dev/null
+++ b/src/views/common/processinspect-part.vue
@@ -0,0 +1,258 @@
+<template>
+    <div class="body">
+      <el-dialog
+        v-diadrag
+        width="60%"
+        title="鎶ユ淇℃伅"
+        top="5vh"
+        :visible.sync="innerVisible"
+        append-to-body
+        @close="$emit('update:currshowlist', false)"
+        :show="currshowlist"
+        class="part-dialog"
+        id="rawMaterial-part-dialog"
+      >
+        <ttable
+          :table="table"
+          @handleSelectionChange="handleSelectionChange"
+          @currentChange="handleCurrentChange"
+          :uploadInfo="uploadInfo"
+          :prelang="prelang"
+          :options="options"
+          :bottomOffset="150"
+          :ajaxFun="ajaxFun"
+          :paramObj="paramObj"
+          :isShowPagination="false"
+          ref="rawPartTable"
+        >
+          <template #toolbar></template>
+        </ttable>
+    
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="innerVisible = false">鍙� 娑�</el-button>
+          <el-button type="primary" @click="saveSelectRow">纭� 瀹�</el-button>
+        </div>
+      </el-dialog>
+    </div>
+    </template>
+    <script>
+    import ttable from '@/views/common/ztt-table'
+    import { chooseIFS } from '@/api/quality/rawMaterial'
+    export default {
+      props: {
+        currshowlist: {
+          type: Boolean,
+          default: false
+        },
+        paramObj: {
+          type: Object,
+          default: () => {
+            return {}
+          }
+        },
+        multiSelect: {
+          type: Boolean,
+          default: false
+        },
+        parentSelectedObj: {
+          type: Object,
+          default: null
+        },
+        parentSelectedIndex: {
+          type: Number,
+          default: null
+        }
+      },
+      data() {
+        return {
+          ajaxFun: chooseIFS,
+          innerVisible: false,
+          currentRow: null,
+          multipleSelection: [],
+          uploadInfo: {
+            // 鏄惁灞曠ず涓婁紶EXCEL浠ュ強瀵瑰簲鐨剈rl
+            isShow: false,
+            url: ''
+          },
+          prelang: 'operation',
+          options: {
+            height: 300, // 榛樿楂樺害-涓轰簡琛ㄥご鍥哄畾
+            stripe: true, // 鏄惁涓烘枒椹汗 table
+            highlightCurrentRow: false, // 鏄惁瑕侀珮浜綋鍓嶈
+            border: true, // 鏄惁鏈夌旱鍚戣竟妗�
+            lazy: false, // 鏄惁闇�瑕佹噿鍔犺浇
+            fit: true, // 鍒楃殑瀹藉害鏄惁鑷拺寮�
+            multiSelect: false, //
+            seqNo: true,
+            isGeneralSearch: false,
+            isRefresh: false, // 鏄惁鏄剧ず鍒锋柊鎸夐挳
+            isShowHide: false, // 鏄惁鏄剧ず鏄惧奖鎸夐挳
+            isSearch: false, // 楂樼骇鏌ヨ鎸夐挳
+            defaultOrderBy: { column: 'formTime', direction: 'desc' }
+          },
+          table: {
+            total: 0,
+            currentPage: 1,
+            pageSize: 20,
+            data: [],
+            // 鏍囬
+            column: [
+              {
+                minWidth: '100',
+                prop: 'message',
+                label: 'message',
+                isTrue: false,
+              },
+              {
+                minWidth: '100',
+                prop: 'code',
+                label: '闆朵欢鍙�',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '120',
+                prop: 'projectName',
+                label: '椤圭洰鍚嶇О',
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+             },
+              {
+                minWidth: '100',
+                prop: 'name',
+                label: '鍘熸潗鏂欏悕绉�',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '100',
+                prop: 'formTime',
+                label: '鏉ユ枡鏃ユ湡',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '100',
+                prop: 'specs',
+                label: '瑙勬牸鍨嬪彿',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '100',
+                prop: 'unit',
+                label: '鍗曚綅',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '100',
+                prop: 'supplier',
+                label: '渚涘簲鍟�',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+              {
+                minWidth: '100',
+                prop: 'number',
+                label: '鏁伴噺',
+                sort: true,
+                isTrue: true,
+                isSearch: true,
+                searchInfoType: 'text'
+              },
+            ],
+          },
+        }
+      },
+      components: {
+        ttable
+      },
+      created(){
+        
+      },
+      mounted() {
+        console.log(this.currshowlist,"寮�");
+      },
+      // props:['currentRow'],
+      methods: {
+        getData() {
+          if (this.$refs.rawPartTable !== undefined) {
+            this.$refs.rawPartTable.getDataList()
+          }
+        },
+        saveSelectRow() {
+          if (this.multiSelect) {
+            this.$emit('handleSelectionChange', this.multipleSelection)
+          } else {
+            this.$emit(
+              'listenToPartEvent',
+              this.currentRow,
+              this.parentSelectedObj,
+              this.parentSelectedIndex
+            )
+          }
+          this.innerVisible = false
+          this.$parent.costPlannedAmountChange(this.currentRow)
+        },
+        handleCurrentChange(row) {
+          this.currentRow = row
+        },
+        handleSelectionChange(val) {
+          // 澶氳閫変腑
+          this.multipleSelection = val
+        },
+      },
+      watch: {
+        currshowlist() {
+            console.log(this.currshowlist,"寮�锛�");
+          this.innerVisible = this.currshowlist
+          if (this.currshowlist) {
+            this.$nextTick(() => {
+              // this.table.data=[]
+              this.getData()
+            })
+          }
+        }
+      },
+    }
+    </script>
+    <style>
+    .part-dialog .el-dialog__header {
+      padding: 10px 20px 10px;
+    }
+    .part-dialog .el-dialog__header .el-dialog__headerbtn {
+      top: 10px;
+    }
+    .part-dialog .el-dialog__body {
+      padding: 5px 20px;
+    }
+    
+    .part-dialog .el-dialog__footer {
+      padding: 5px 20px 10px;
+    }
+    
+    .part-dialog .el-dialog__body .avue-crud__pagination {
+      margin-top: 0px;
+      margin-bottom: 5px;
+    }
+    /* @media screen and (max-width: 800px) {
+      .el-dialog {
+        height: 600px !important;
+      }
+    } */
+    </style>
+    
\ No newline at end of file
diff --git a/src/views/plan/manufacturingorder/productorder-form.vue b/src/views/plan/manufacturingorder/productorder-form.vue
index 6ff61e4..e825e10 100644
--- a/src/views/plan/manufacturingorder/productorder-form.vue
+++ b/src/views/plan/manufacturingorder/productorder-form.vue
@@ -257,11 +257,22 @@
                         </el-form-item>
                       </el-col>
                     </el-row>
-
                     <el-row>
                       <el-col :span="24" class="productorder-operates-col">
-                        <el-card class="productorder-operates">
-                          <el-table
+                        <el-card class="productorder-operates" >
+                          <el-row>
+                            <el-col :span="2" class="frame1">搴忓彿
+                            </el-col>
+                            <el-col :span="4" class="frame1">宸ュ簭鍙�
+                            </el-col>
+                            <el-col :span="5" class="frame1">宸ュ簭鎻忚堪
+                            </el-col>
+                            <el-col :span="9" class="frame1">闆朵欢
+                            </el-col>
+                            <el-col :span="3" class="frame1">鎿嶄綔
+                            </el-col>
+                          </el-row>
+                          <!-- <el-table
                             ref="operationTable"
                             :data="operations"
                             style="width: 100%;"
@@ -309,10 +320,56 @@
                                 </el-button>
                               </template>
                             </el-table-column>
-                          </el-table>
+                          </el-table> -->
+                          <zttdraggable
+                            :forceFallback="true"
+                            :list="operations"
+                            :animation="200"
+                            fallbackClass="fallbackStyle"
+                            ghostClass="item_ghost"
+                            @end="dragEnd"
+                          >
+                            <div
+                              :class="{ dragItem: true, active: x.active }"
+                              v-for="(x, i) in operations"
+                              :key="i"
+                            >
+                              <!-- <div class="dragBody">
+                                <div class="info">{{ x.operationNo }}</div>
+                                <div class="info">{{ x.operationName }}</div>
+                                <div class="info">{{ x.partName }}</div>
+                              </div> -->
+                              <el-row>
+                                <el-col :span="2" class="frame">{{ i+1 }}
+                                </el-col>
+                                <el-col :span="4" class="frame">{{ x.operationNo  }}
+                                </el-col>
+                                <el-col :span="5" class="frame">{{ x.operationName }}
+                                </el-col>
+                                <el-col :span="9" class="frame">{{ x.partName }}
+                                </el-col>
+                                <el-col :span="3" class="frame">
+                                    <el-button
+                                      type="text"
+                                      size="mini"
+                                      @click="openOrderOperation(x)"
+                                      >缂栬緫
+                                    </el-button>
+                                </el-col>
+                              </el-row>
+                            </div>
+                          </zttdraggable>
                         </el-card>
                       </el-col>
                     </el-row>
+                  
+                  
+                  
+                  
+                  
+                  
+                  
+                  
                   </el-col>
                   <el-col :span="16">
                     <el-tabs type="card" ref="paramTabs">
@@ -918,7 +975,27 @@
     />
   </div>
 </template>
-<style>
+<style lang="scss">
+.frame{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 100px;
+    // border-width: 1px;
+    // border-color: rgb(129, 129, 129);
+    // border-style: solid;
+    font-size: 15px;
+}
+.frame1{
+  display: flex;
+    justify-content: center;
+    align-items: center;
+    height: 50px;
+    // border-width: 1px;
+    // border-color: rgb(129, 129, 129);
+    // border-style: solid;
+    font-size: 15px;
+}
 .productorder-basic {
   background-color: #fff;
   height: 150px;
@@ -957,6 +1034,7 @@
 .productorder-operates {
   height: 605px;
   border: 1px solid #ddd;
+  overflow: auto;
 }
 
 .productorder-params-template {
@@ -1008,7 +1086,8 @@
   addRoutingTemplateParamLedForOrder,
   updateMoBom,
   delMoBom,
-  bomSelectChange
+  bomSelectChange,
+  changeOrder,
 } from '@/api/plan/manufacturingorder'
 import { qryMoSamplingRule, delMoSamplingRule } from '@/api/plan/mosamplingrule'
 import {
@@ -1038,7 +1117,7 @@
 import spotCheckRule from './orderSpotCheckRule'
 import spotCheckRuleEdit from './orderSpotCheckRuleEdit'
 import { mapGetters } from 'vuex'
-
+import zttdraggable from 'vuedraggable'
 export default {
   components: {
     CustomerOrder,
@@ -1054,7 +1133,8 @@
     operationDialog,
     insertOperationDialog,
     spotCheckRule,
-    spotCheckRuleEdit
+    spotCheckRuleEdit,
+    zttdraggable
   },
 
   data() {
@@ -1319,6 +1399,28 @@
     }
   },
   methods: {
+    dragEnd(e){
+      this.operations.forEach((e, i) => {
+        e.index = i + 1
+        e.operationOrder = i+1
+      })
+      console.log(this.operations,"鎷栨嫿缁撴潫kk");
+      this.dragEndstart()
+    },
+    dragEndstart(){
+        let data = this.operations.map(el =>{
+            return {
+              id:el.id,
+              operationOrder:el.operationOrder,
+            }
+        })
+      console.log(data,"id");
+        changeOrder(data).then((res) =>{
+            console.log(res,"鍥炶皟");
+        }).catch(error => {
+					console.error(error)
+				});
+    },
     getSysParam(paramKey) {
       getSysParam(paramKey).then((response) => {
         var paramVal = response.data.data
diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue
index 7695830..d0d066d 100644
--- a/src/views/quality/processInspect/processInspect-form.vue
+++ b/src/views/quality/processInspect/processInspect-form.vue
@@ -27,6 +27,11 @@
                                 <el-form-item label="杞﹂棿璁㈠崟鍙�" prop="moNo">
                                     <el-input @blur="selectInfoByOrderId" :disabled="processInspectVo.id != null"
                                         v-model="processInspectVo.moNo" placeholder="璇疯緭鍏ヨ溅闂磋鍗曞彿" autocomplete="off" >
+                                        <!-- <el-button
+                                            slot="append"
+                                            icon="el-icon-search"
+                                            :disabled="resultVal!=null"
+                                            @click="queryCode"></el-button> -->
                                         <el-button
                                             slot="append"
                                             icon="el-icon-full-screen"
@@ -251,6 +256,7 @@
             <el-button type="primary" @click="deviceCode = false">纭� 瀹�</el-button>
         </span>
         </el-dialog>
+    <processPart :paramObj="paramObj" :currshowlist.sync="workshop" />
     </div>
 </template>
 
@@ -263,15 +269,17 @@
     updateProcessInsProduct,
     updateProcessInspectsById,
 } from '@/api/quality/processInspect'
+import processPart from '@/views/common/processinspect-part'
 import { selectDevice } from '@/api/quality/processInspect'
 import qrCodeApp from '@/views/common/qrCodeApp'
 import { validatePositiveInteger } from '@/util/validate'
 export default {
     components:{
-        qrCodeApp
+        qrCodeApp,processPart
     },
     data() {
         return {
+            paramObj:{},
             qrcode: false,
             row: null,
             proIndex: 0,
@@ -291,6 +299,7 @@
             resultVal: null,
             technologyList: [],
             deviceList: [],
+            workshop:false,//杞﹂棿寮圭獥
             hasChildren: true,
             optionsSamplename: [],
             // 娣诲姞鍒�
@@ -335,6 +344,14 @@
         this.init()
     },
     methods: {
+      queryCode(){
+        console.log("llll");
+        this.workshop = true
+        console.log(this.workshop);
+        // this.paramObj = {
+        //   code: this.dataForm.code
+        // }
+      },
       cancelCodeDialog(){
         this.qrcode = false
       },
diff --git a/src/views/technology/routing/routing-form.vue b/src/views/technology/routing/routing-form.vue
index 2f5c33a..f467d9f 100644
--- a/src/views/technology/routing/routing-form.vue
+++ b/src/views/technology/routing/routing-form.vue
@@ -136,16 +136,8 @@
               '--dragitemwidth': '250px'
             }"
           >
-            <div
-              :style="{
-                width: 265 * dataForm.operations.length - 15 + 'px'
-              }"
-            >
-              <div
-                class="dragHead"
-                v-for="x in dataForm.operations.length"
-                :key="x"
-              >
+            <div :style="{ width: 265 * dataForm.operations.length - 15 + 'px' }">
+              <div class="dragHead" v-for="x in dataForm.operations.length"  :key="x" >
                 <div class="idx">{{ x }}</div>
               </div>
               <zttdraggable
diff --git a/vue.config.js b/vue.config.js
index b3ee465..bdb8870 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,10 +4,10 @@
  */
 
 
-// const url = 'http://192.168.2.7:9999'
-//const url = 'https://ztms-mes.chinaztt.cn/'
+const url = 'http://192.168.2.7:9999'
+// const url = 'https://ztms-mes.chinaztt.cn/'
 
- const url = 'http://localhost:9999'
+//  const url = 'http://localhost:9999'
 
 
 const localUrl = 'http://localhost:8089'

--
Gitblit v1.9.3