From d71436544198b7b051115662fc9cf4b12ce0cda3 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 19 七月 2022 18:32:40 +0800
Subject: [PATCH] 1.修改bug

---
 src/views/jcsz/zzjg.vue                  |   30 -
 src/views/zzmx/chda.vue                  |   96 +++++
 src/views/scgl/scdd.vue                  |   81 +++--
 src/views/jcsz/wldw.vue                  |   30 +
 src/views/scgl/gd.vue                    |    6 
 src/store/modules/user.js                |    4 
 src/views/login/index.vue                |   12 
 src/views/sbgl/sbqd.vue                  |    4 
 src/views/scgl/sckbg.vue                 |   19 
 src/layout/components/Navbar.vue         |    2 
 src/layout/components/TagsView/index.vue |   48 ++
 src/router/index.js                      |    4 
 src/views/zlgl/gxjyxm.vue                |   98 ++----
 src/views/jcsz/yhqd.vue                  |    6 
 src/views/zzmx/jpgj.vue                  |   23 -
 src/views/zlgl/qxdy.vue                  |  102 ++----
 src/api/ErpSyncMes.js                    |   20 +
 src/views/jcsz/jsqd.vue                  |    2 
 src/views/wlgl/ckdy.vue                  |   30 +
 src/views/zzmx/gxdy.vue                  |   34 +
 src/views/zlgl/gxjybz.vue                |  259 ++++++++++-----
 21 files changed, 568 insertions(+), 342 deletions(-)

diff --git a/src/api/ErpSyncMes.js b/src/api/ErpSyncMes.js
index 07565a7..1baa946 100644
--- a/src/api/ErpSyncMes.js
+++ b/src/api/ErpSyncMes.js
@@ -7,6 +7,7 @@
     method: 'post'
   })
 }
+
 // 鍒堕�犳ā鍨嬶細瀛樿揣妗f鍚屾
 export function SeaveSearchInventory() {
   return request({
@@ -14,6 +15,7 @@
     method: 'post'
   })
 }
+
 // 鐗╂枡绠$悊锛氫粨搴撳簱浣嶅悓姝�
 export function SeaveSearchWhareHouseLocation() {
   return request({
@@ -21,10 +23,26 @@
     method: 'post'
   })
 }
-//
+
+// 鍩虹璁剧疆:寰�鏉ュ崟浣嶅悓姝�
 export function SeaveSearchPartner() {
   return request({
     url: 'ErpSyncMes/SeaveSearchPartner',
     method: 'post'
   })
 }
+
+// 鐢熶骇绠$悊锛氱敓浜ц鍗曞悓姝�
+export function SeaveSearchErpOrder() {
+  return request({
+    url: 'ErpSyncMes/SeaveSearchErpOrder',
+    method: 'post'
+  })
+}
+// 鍒堕�犳ā鍨嬶細鍗曚綅鍚屾
+export function SeaveSearchUnit() {
+  return request({
+    url: 'ErpSyncMes/SeaveSearchUnit',
+    method: 'post'
+  })
+}
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index afd5cae..9189fda 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -89,7 +89,7 @@
   },
   created() {
     this.usercode = getCookie('navTabId')
-    this.username = getCookie('admin')
+    this.username = getCookie('username')
   },
   data() {
     const validatePassword = (rule, value, callback) => {
diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue
index 7e6971b..89b1996 100644
--- a/src/layout/components/TagsView/index.vue
+++ b/src/layout/components/TagsView/index.vue
@@ -22,6 +22,23 @@
       <li @click="closeOthersTags">鍏抽棴鍏朵粬</li>
       <li @click="closeAllTags(selectedTag)">鍏抽棴鎵�鏈�</li>
     </ul>
+
+    <el-dialog
+      title="鎻愮ず"
+      :visible.sync="dialogVisible"
+      width="500px"
+      :close-on-click-modal="false"
+    >
+      <div>
+        鐜伴〉绛炬墦寮�瓒呰繃10涓紝璇峰叧闂叾瀹冩爣绛�
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button @click="dialogVisibleCancel">杩斿洖</el-button>
+        </div>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -39,11 +56,16 @@
       top: 0,
       left: 0,
       selectedTag: {},
-      affixTags: []
+      affixTags: [],
+      dialogVisible: false
     }
   },
   computed: {
     visitedViews() {
+      if (this.$store.state.tagsView.visitedViews.length > 10) {
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
+        this.dialogVisible = true
+      }
       return this.$store.state.tagsView.visitedViews
     },
     routes() {
@@ -95,16 +117,22 @@
         this.$store.state.tagsView.visitedViews = oldViews
       }
     },
+
+    // 瀵硅瘽妗嗚繑鍥�
+    dialogVisibleCancel() {
+      this.dialogVisible = false
+    },
+
     isActive(route) {
-      if (this.$route.path === '/scgl/sckbg') {
-        const time = setInterval(() => {
-          this.$nextTick(() => {
-            $("input[name='produceCode']")[0].focus()
-            $("input[name='WXproduceCode']")[0].focus()
-            clearInterval(time)
-          })
-        })
-      }
+      // if (this.$route.path === '/scgl/sckbg') {
+      //   const time = setInterval(() => {
+      //     this.$nextTick(() => {
+      //       $("input[name='produceCode']")[0].focus()
+      //       $("input[name='WXproduceCode']")[0].focus()
+      //       clearInterval(time)
+      //     })
+      //   })
+      // }
       return route.path === this.$route.path
     },
     isAffix(tag) {
diff --git a/src/router/index.js b/src/router/index.js
index af61a27..c761e9e 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -444,14 +444,14 @@
       },
       {
         path: 'gxjybz',
-        name: '',
+        name: 'QXJYBZCancel',
         code: '1085',
         component: () => import('@/views/zlgl/gxjybz'),
         meta: { code: '1085', title: '宸ュ簭妫�楠屾爣鍑�', icon: '', keepAlive: true }
       },
       {
         path: 'gxjyxm',
-        name: '',
+        name: 'GXJYXMCancel',
         code: '1086',
         component: () => import('@/views/zlgl/gxjyxm'),
         meta: { code: '1086', title: '宸ュ簭妫�楠岄」鐩�', icon: '', keepAlive: true }
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 7f65049..c3bb55a 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -39,7 +39,8 @@
       // login({ UserName: '001', PassWord: 123, HOrgName: 1 }).then(response => {
         const { data: res } = response
 
-        setCookie('admin', res.username)
+        setCookie('username', res.username)
+        setCookie('admin', res.usercode)
         setCookie('navTabId', res.usercode)
         setCookie('usertype', res.usertype)
         setCookie('userid', res.userid)
@@ -108,6 +109,7 @@
           removeToken() // must remove  token  first
           resetRouter()
 
+          removeCookie('username')
           removeCookie('admin')
           removeCookie('navTabId')
           removeCookie('usertype')
diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index bfb4baa..5d0f56b 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -989,6 +989,8 @@
           } else {
             if (item.children.length > 0 && item.children) {
               item.children.forEach((it, ind) => {
+                console.log(it, 9)
+                console.log(it.is_delete, 9)
                 if (it.is_delete === '1') {
                   item.children.splice(ind, 1)
                 }
diff --git a/src/views/jcsz/wldw.vue b/src/views/jcsz/wldw.vue
index 4708983..b663498 100644
--- a/src/views/jcsz/wldw.vue
+++ b/src/views/jcsz/wldw.vue
@@ -39,6 +39,12 @@
       <el-divider />
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-refresh-right"
+          @click="syncSeaveSearchPartner"
+        >鍚屾寰�鏉ュ崟浣�
+        </el-button>
         <!--        <el-button type="primary" icon="el-icon-upload2">瀵煎叆</el-button>-->
       </div>
       <el-divider />
@@ -207,6 +213,7 @@
 import {
   AddUpdateCurrentUnit, CurrentUnitSearch, DeleteCurrentUnit
 } from '@/api/jcsz'
+import { SeaveSearchPartner, SeaveSearchWhareHouseLocation } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -323,6 +330,29 @@
       this.tableData = res.data
       this.total = res.count
     },
+    // 鍚屾寰�鏉ュ崟浣�
+    async syncSeaveSearchPartner() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾寰�鏉ュ崟浣嶏紝璇风◢绛�...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      const res = await SeaveSearchPartner()
+      if (res.code === '200') {
+        setTimeout(() => {
+          this.getCurrentUnitSearch()
+          loading.close()
+          this.$message.success('鍚屾鎴愬姛锛�')
+        }, 2000)
+      } else {
+        setTimeout(() => {
+          loading.close()
+          this.$message.error('鍚屾澶辫触锛�')
+        }, 10000)
+      }
+    },
     // 鎺掑簭鏀瑰彉鏃�
     sortChange({ column, prop, order }) {
       if (order === 'descending') {
diff --git a/src/views/jcsz/yhqd.vue b/src/views/jcsz/yhqd.vue
index 8fa2200..bd26d4d 100644
--- a/src/views/jcsz/yhqd.vue
+++ b/src/views/jcsz/yhqd.vue
@@ -567,7 +567,7 @@
         UserCode: '',
         UserName: '',
         Password: '',
-        Enable: '',
+        Enable: 'Y',
         StuOrg: '',
         Mobile: '',
         Email: '',
@@ -689,7 +689,7 @@
       this.form.UserCode = ''
       this.form.UserName = ''
       this.form.StuOrg = ''
-      this.form.Enable = ''
+      this.form.Enable = 'Y'
       this.form.wagetype = ''
       this.$refs.cascader.checkedValue = ''// 绾ц仈閫夋嫨鍣ㄧ殑娓呯┖
       this.getUserSearch()
@@ -758,7 +758,7 @@
       this.dialogForm.UserCode = ''
       this.dialogForm.UserName = ''
       this.dialogForm.Password = ''
-      this.dialogForm.Enable = ''
+      this.dialogForm.Enable = 'Y'
       this.$refs.dialogCascader.checkedValue = ''
       this.dialogForm.StuOrg = ''
       this.dialogForm.Mobile = ''
diff --git a/src/views/jcsz/zzjg.vue b/src/views/jcsz/zzjg.vue
index d6cecf4..c2c86f4 100644
--- a/src/views/jcsz/zzjg.vue
+++ b/src/views/jcsz/zzjg.vue
@@ -144,6 +144,7 @@
         <el-form-item label="缁勭粐绫诲瀷" prop="OrgType">
           <el-radio-group
             v-model="dialogForm.OrgType"
+            :disabled="operation==='edit'"
             @change="changeRadio"
           >
             <el-radio
@@ -160,8 +161,7 @@
         <el-form-item label="缁勭粐鍚嶇О" prop="OrgName">
           <el-input v-model="dialogForm.OrgName" style="width: 200px" />
         </el-form-item>
-        <!--        <el-form-item v-if="dialogFormOrgTypeSelected!=='F'" prop="SupUnit" label="涓婄骇鍗曚綅">-->
-        <el-form-item v-if="dialogFormOrgTypeSelected!=='D'" prop="SupUnit" label="涓婄骇鍗曚綅">
+        <el-form-item v-if="dialogForm.OrgType!=='閮ㄩ棬'" prop="SupUnit" label="涓婄骇鍗曚綅">
           <el-select
             v-model="dialogForm.SupUnit"
             style="width: 200px"
@@ -247,13 +247,12 @@
       tableData: [],
       dialogVisible: false,
       dialogForm: {
-        OrgType: '',
+        OrgType: '閮ㄩ棬',
         OrgCode: '',
         OrgName: '',
         SupUnit: ''// 涓婄骇鍗曚綅
       },
       SupUnitArr: [],
-      dialogFormOrgTypeSelected: '',
       operation: '',
       dialogFormRules: {
         OrgType: [
@@ -338,19 +337,8 @@
     },
     // 鍗曢�夋鏀瑰彉鏃�
     async changeRadio(val) {
-      if (val.length > 1) {
-        this.OrgTypeArr.forEach(item => {
-          if (item.label === val) {
-            this.dialogFormOrgTypeSelected = item.value
-          }
-        })
-        this.dialogForm.SupUnit = ''
-      } else {
-        this.dialogFormOrgTypeSelected = val
-      }
-      // if (this.dialogFormOrgTypeSelected !== 'F') {
-      if (this.dialogFormOrgTypeSelected !== 'D') {
-        const { data: res } = await PrentOrganization({ orgcode: this.dialogFormOrgTypeSelected })
+      if (this.dialogForm.OrgType !== '閮ㄩ棬') {
+        const { data: res } = await PrentOrganization({ orgcode: this.OrgTypeArr.find(item => item.label === this.dialogForm.OrgType).value })
         this.SupUnitArr = res
       }
     },
@@ -407,7 +395,7 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
+      this.dialogForm.OrgType = '閮ㄩ棬'
       this.dialogForm.OrgCode = ''
       this.dialogForm.OrgName = ''
       this.dialogForm.SupUnit = ''
@@ -422,18 +410,18 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganType: this.dialogFormOrgTypeSelected,
+            OrganType: this.dialogForm.OrgType === '閮ㄩ棬' ? 'D' : 'W',
             OrganCode: this.dialogForm.OrgCode,
             OrganName: this.dialogForm.OrgName,
             RightCode: '',
             numvalue: '',
             // RightCode: this.operation === 'add' ? getCookie('ruleCode') : '',
             // numvalue: this.operation === 'add' ? this.numvalue : '',
-            // SupUnit: this.dialogFormOrgTypeSelected === 'F' ? '0' : this.dialogForm.SupUnit,
-            SupUnit: this.dialogFormOrgTypeSelected === 'D' ? '0' : this.dialogForm.SupUnit,
+            SupUnit: this.dialogForm.OrgType === '閮ㄩ棬' ? '0' : this.dialogForm.SupUnit,
             OperType: this.operation === 'add' ? 'Add' : 'Update',
             Operator: getCookie('admin')
           }
+
           AddUpdateOrganization(data).then(res => {
             if (res.code === '200') {
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index 25d5aa0..eaccf64 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -61,7 +61,7 @@
           <el-input
             ref="username"
             v-model="loginForm.username"
-            placeholder="璇疯緭鍏ョ敤鎴峰悕"
+            placeholder="璇疯緭鍏ョ敤鎴风紪鐮�"
             name="username"
             type="text"
             tabindex="1"
@@ -84,7 +84,7 @@
             ref="password"
             v-model="loginForm.password"
             :type="passwordType"
-            placeholder="璇疯緭鍏ュ瘑鐮�"
+            placeholder="璇疯緭鍏ョ敤鎴峰瘑鐮�"
             name="password"
             tabindex="2"
             style="width: 100%;"
@@ -134,7 +134,7 @@
       // const mPattern = /^\w+$/ // 姝e垯 绛変环浜嶽A-Za-z0-9_]
 
       if (value.length < 1) {
-        callback(new Error('璐﹀彿涓嶈兘涓虹┖锛�'))
+        callback(new Error('鐢ㄦ埛缂栫爜涓嶈兘涓虹┖锛�'))
       } else {
         callback()
       }
@@ -148,15 +148,15 @@
     }
     const validatePassword = (rule, value, callback) => {
       if (value.length < 1) {
-        callback(new Error('瀵嗙爜闀垮害涓嶈兘涓虹┖锛�'))
+        callback(new Error('鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖锛�'))
       } else {
         callback()
       }
     }
     return {
       loginForm: {
-        username: 'Admin', // Admin
-        password: '123456'// 123456
+        username: '', // Admin
+        password: ''// 123456
       },
       loginRules: {
         username: [{ required: true, trigger: ['blur', 'change'], validator: validateUsername }],
diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index 2bad529..f4f4875 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -609,7 +609,7 @@
         devicename: '',
         devicetypecode: '',
         devicegroupcode: '',
-        importdate: '',
+        importdate: handleDatetime(new Date()),
         workshopcode: '',
         linecode: '',
         status: 'Y',
@@ -781,7 +781,7 @@
       this.dialogForm.devicename = ''
       this.dialogForm.devicetypecode = ''
       this.dialogForm.devicegroupcode = ''
-      this.dialogForm.importdate = ''
+      this.dialogForm.importdate = handleDatetime(new Date())
       this.dialogForm.workshopcode = ''
       // this.dialogForm.linecode = ''
       this.dialogForm.status = 'Y'
diff --git a/src/views/scgl/gd.vue b/src/views/scgl/gd.vue
index 4d3cdaf..6785126 100644
--- a/src/views/scgl/gd.vue
+++ b/src/views/scgl/gd.vue
@@ -30,7 +30,6 @@
             <el-form-item label="璁㈠崟缂栧彿" style=" display: flex;">
               <el-input v-model="form.mesordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-
             <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
               <!--              <el-select v-model="form.partcode" :popper-append-to-body="false" style="width: 200px" placeholder="璇烽�夋嫨">-->
               <!--                <el-option-->
@@ -422,7 +421,7 @@
 
       <!--        宸ヨ壓璺嚎鏀惧ぇ闀滃璇濇-->
       <el-dialog
-        title="宸ュ簭"
+        title="宸ヨ壓璺嚎"
         :visible.sync="dialogVisibleSearch"
         width="840px"
         top="20vh"
@@ -786,6 +785,7 @@
 
     // 浜у搧淇℃伅鍊兼敼鍙�
     async partcodeChange(val) {
+      console.log(val, 22)
       const { data: res } = await PartSelectRoute({ partcode: val })
       this.routeArr = res
 
@@ -793,6 +793,7 @@
       this.routeArr.forEach(item => {
         if (item.code === item.default_route) {
           this.dialogForm.routecode = item.code
+          this.routecodeChange(this.dialogForm.routecode)
           flag = true
         }
       })
@@ -843,6 +844,7 @@
         this.dialogForm.partname = row.partname
         this.dialogForm.mesqty = row.plan_qty
         this.dialogForm.partspec = row.partspec
+        // this.routecodeChange(this.dialogForm.routecode)
 
         this.dialogForm.planstartdate = row.plan_startdate !== null ? row.plan_startdate : handleDatetime(new Date())
         this.dialogForm.planenddate = row.plan_enddate !== null ? row.plan_enddate : handleDatetime(new Date())
diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index a7bbee7..f68e8db 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -29,7 +29,6 @@
             <el-form-item label="璁㈠崟缂栧彿" style=" display: flex;">
               <el-input v-model="form.erpordercode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-
             <el-form-item label="浜у搧缂栫爜" style=" display: flex;">
               <el-input v-model="form.partcode" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
@@ -39,9 +38,13 @@
             <el-form-item label="浜у搧瑙勬牸" style=" display: flex;">
               <el-input v-model="form.partspec" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
-            <el-form-item label="浜や粯鏃堕棿" style=" display: flex;">
+
+            <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+              <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
+            </el-form-item>
+            <el-form-item label="棰勮寮�宸ユ椂闂�" label-width="100px" style=" display: flex;">
               <el-date-picker
-                v-model="form.paydate"
+                v-model="form.paystartdate"
                 type="daterange"
                 range-separator="~"
                 size="mini"
@@ -53,12 +56,9 @@
               <!--              :picker-options="expireTimeOption"-->
 
             </el-form-item>
-            <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
-              <el-input v-model="form.creatuser" style="width: 200px" placeholder="璇疯緭鍏�" />
-            </el-form-item>
-            <el-form-item label="鍒涘缓鏃堕棿" style=" display: flex;">
+            <el-form-item label="棰勮瀹屽伐鏃堕棿" label-width="100px" style=" display: flex;">
               <el-date-picker
-                v-model="form.createdate"
+                v-model="form.payenddate"
                 type="daterange"
                 :clearable="false"
                 range-separator="~"
@@ -174,8 +174,8 @@
           >
             <template slot-scope="{row}">
               <div v-if="row.status==='NEW'">鏂拌鍗�</div>
-              <div v-if="row.status==='CREATING'">鍒涘缓涓�</div>
-              <div v-if="row.status==='CREATED'">宸插垱寤�</div>
+              <div v-if="row.status==='CREATING'">閮ㄥ垎涓嬭揪</div>
+              <div v-if="row.status==='CREATED'">鍏ㄩ儴涓嬭揪</div>
               <div v-if="row.status==='CLOSED'">宸插叧闂�</div>
             </template>
           </el-table-column>
@@ -222,8 +222,14 @@
             width="150"
           />
           <el-table-column
-            prop="paydate"
-            label="瑕佹眰浜や粯鏃堕棿"
+            prop="planstartdate"
+            label="棰勮寮�宸ユ椂闂�"
+            sortable="custom"
+            width="160"
+          />
+          <el-table-column
+            prop="planenddate"
+            label="棰勮瀹屽伐鏃堕棿"
             sortable="custom"
             width="160"
           />
@@ -360,6 +366,7 @@
 import Pagination from '@/components/Pagination'
 import { ClosedErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/scgl'
 import { handleDatatime, handleDatetime } from '@/utils/global'
+import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -389,8 +396,10 @@
         partcode: '', // 浜у搧缂栫爜
         partname: '', // 浜у搧鍚嶇О
         partspec: '', // 浜у搧瑙勬牸
-        paydate: '', // 浜や粯鏃堕棿
         creatuser: '', // 鍒涘缓浜哄憳
+        // paystartdate: '', // 浜や粯鏃堕棿
+        paystartdate: '', // 棰勮寮�宸ユ椂闂�
+        payenddate: '', // 棰勮瀹屽伐鏃堕棿
         createdate: '', // 鍒涘缓鏃堕棿
         prop: 'createdate', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
@@ -399,8 +408,8 @@
       },
       erporderstusArr: [
         { code: 'NEW', name: '鏂拌鍗�' },
-        { code: 'CREATING', name: '鍒涘缓涓�' },
-        { code: 'CREATED', name: '宸插垱寤�' },
+        { code: 'CREATING', name: '閮ㄥ垎涓嬭揪' },
+        { code: 'CREATED', name: '鍏ㄩ儴涓嬭揪' },
         { code: 'CLOSED', name: '宸插叧闂�' }
       ],
       total: 10,
@@ -410,7 +419,7 @@
       dialogForm: {
         partname: '', // 浜у搧鍚嶇О
         partspec: '', // 浜у搧瑙勬牸
-        paydate: '', // 浜や粯鏃堕棿
+        // paystartdate: '', // 棰勮寮�宸ユ椂闂�
         wkshopname: '', // 杞﹂棿鍚嶇О
         warehousename: '', // 浠撳簱鍚嶇О
 
@@ -460,12 +469,12 @@
   methods: {
     async getErpOrderSearch() {
       console.log(this.form, 1)
-      let tempDate2 = this.form.paydate
+      let tempDate2 = this.form.paystartdate
       if (tempDate2.length > 0) {
         tempDate2 = handleDatetime(tempDate2[0]) + '~' + handleDatetime(tempDate2[1])
       }
 
-      let tempDate = this.form.createdate
+      let tempDate = this.form.payenddate
       if (tempDate.length > 0) {
         tempDate = handleDatetime(tempDate[0]) + '~' + handleDatetime(tempDate[1])
       }
@@ -476,10 +485,11 @@
         partcode: this.form.partcode, // 浜у搧缂栫爜
         partname: this.form.partname, // 浜у搧鍚嶇О
         partspec: this.form.partspec, // 浜у搧瑙勬牸
-        paydate: tempDate2, // 浜や粯鏃堕棿
+        paystartdate: tempDate2, // 浜や粯鏃堕棿
+        payenddate: tempDate, // 浜や粯鏃堕棿
         creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
         // createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
-        createdate: tempDate,
+
         prop: this.form.prop, // 鎺掑簭瀛楁
         order: this.form.order, // 鎺掑簭瀛楁
         page: this.form.page, // 绗嚑椤�
@@ -505,7 +515,7 @@
       this.getErpOrderSearch()
     },
     // 鍚屾ERP
-    async  syncERP() {
+    syncERP() {
       const loading = this.$loading({
         lock: true,
         text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
@@ -513,17 +523,23 @@
         customClass: 'osloading',
         background: 'rgba(0, 0, 0, 0.7)'
       })
-      setTimeout(() => {
-        loading.close()
-      }, 2000)
 
-      // const res = await xxx()
-      // if (res.code==='200'){
-      setTimeout(() => {
-        loading.close()
-        this.getErpOrderSearch()
-      }, 2000)
-      // }
+      SeaveSearchErpOrder().then(res => {
+        console.log(res, 11)
+        if (res.code === '200') {
+          setTimeout(() => {
+            this.getErpOrderSearch()
+            loading.close()
+            this.$message.success('鍚屾鎴愬姛锛�')
+          }, 2000)
+        }
+        // else if (res.code === '300') {
+        //   setTimeout(() => {
+        //     loading.close()
+        //     this.$message.error('鍚屾澶辫触锛�')
+        //   }, 10000)
+        // }
+      })
     },
     // 鏌ヨ
     search() {
@@ -536,7 +552,8 @@
       this.form.partcode = ''
       this.form.partname = ''
       this.form.partspec = ''
-      this.form.paydate = ''
+      this.form.paystartdate = ''
+      this.form.payenddate = ''
       this.form.creatuser = ''
       this.form.createdate = ''
       this.getErpOrderSearch()
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index c7ca965..8d169cd 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -7,9 +7,10 @@
           <div style="margin-left: 10px;margin-top:10px;display: flex;justify-content: space-between">
             <div style="display: flex;align-items: center">
               <div style="width: 90px">鎵弿鏉$爜锛�</div>
+              <!--              oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"-->
+
               <el-input
                 v-model="form.orderstepqrcode"
-                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
                 name="produceCode"
                 style="width: 300px"
                 @keyup.enter.native="val=>enterNative(val,'produceCode')"
@@ -166,7 +167,6 @@
               <div style="width: 90px;margin-left: 20px">鎵弿鏉$爜锛�</div>
               <el-input
                 v-model="WXform.orderstepqrcode"
-                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
                 name="WXproduceCode"
                 style="width: 300px"
                 @keyup.enter.native="val=>enterNative(val,'WXproduceCode')"
@@ -312,7 +312,6 @@
               <div style="width: 90px">鎵弿鏉$爜锛�</div>
               <el-input
                 v-model="GXform.orderstepqrcode"
-                oninput="value=value.replace(/[^0-9a-zA-Z;_]/g,'')"
                 name="GXproduceCode"
                 style="width: 300px"
                 @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
@@ -552,6 +551,7 @@
         <!--鑷埗寮�濮�-->
         <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" label="寮�宸ユ暟閲忥細">
           <div style="width: 200px">{{ dialogForm.startqty }}</div>
+          <!--          <div style="width: 200px">{{  dialogForm.noreportqty }}</div>-->
         </el-form-item>
         <el-form-item v-if="dialogTitle==='鑷埗寮�濮�'" prop="eqpcode" label="鐢熶骇璁惧锛�">
           <el-select
@@ -602,6 +602,7 @@
         </el-form-item>
         <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐鏁伴噺锛�" prop="startqty">
           <el-input v-model="dialogForm.startqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
+          <!--          <el-input v-model="dialogForm.noreportqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />-->
         </el-form-item>
         <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="涓嶈壇鏁伴噺锛�">
           <el-input v-model="dialogForm.noputqty" oninput="value=value.replace(/[^0-9.]/g,'')" style="width: 200px;" />
@@ -1155,7 +1156,8 @@
         this.dialogForm.planqty = obj.planqty
         this.dialogForm.reportqty = obj.reportqty
         this.dialogForm.noreportqty = obj.noreportqty
-        this.dialogForm.startqty = obj.startqty
+        // this.dialogForm.startqty = obj.startqty
+        this.dialogForm.startqty = obj.noreportqty
       })
 
       await this.getMesOrderStepStartSelectEqp()
@@ -1181,7 +1183,8 @@
         this.dialogForm.reportqty = obj.reportqty
         this.dialogForm.noputqty = obj.noputqty
         this.dialogForm.noreportqty = obj.noreportqty
-        this.dialogForm.startqty = obj.startqty
+        // this.dialogForm.startqty = obj.startqty
+        this.dialogForm.startqty = obj.noreportqty
 
         if (obj.nextstepname === null || obj.nextstepcode === '') {
           this.dialogForm.nextstepname = obj.stepname
@@ -1189,7 +1192,7 @@
           this.dialogForm.nextstepname = obj.nextstepname
         }
 
-        this.dialogForm.startqtySum = obj.startqty
+        this.dialogForm.startqtySum = obj.noreportqty
       })
 
       await this.getMesOrderStepStartSelectEqp()
@@ -1607,8 +1610,8 @@
       //   item.isVisible = 0
       // })
 
-      let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
-      number = number === 0 ? (10 + Math.random()) : number
+      // let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
+      // number = number === 0 ? (10 + Math.random()) : number
 
       // const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
       // this.JYTableData.unshift(data)
diff --git a/src/views/wlgl/ckdy.vue b/src/views/wlgl/ckdy.vue
index c07ea62..1663744 100644
--- a/src/views/wlgl/ckdy.vue
+++ b/src/views/wlgl/ckdy.vue
@@ -32,6 +32,12 @@
       <el-divider />
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-refresh-right"
+          @click="syncSeaveSearchWhareHouseLocation"
+        >鍚屾浠撳簱/搴撲綅
+        </el-button>
         <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
       <el-divider />
@@ -139,6 +145,7 @@
 <script>
 import Pagination from '@/components/Pagination'
 import { AddUpdateWareHouseDef, DeleteWareHouseDef, WareHouseDefSearch } from '@/api/wlgl'
+import { SeaveSearchInventoryClass, SeaveSearchWhareHouseLocation } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -207,6 +214,29 @@
       this.tableData = res.data
       this.total = res.count
     },
+    // 鍚屾浠撳簱/搴撲綅
+    async syncSeaveSearchWhareHouseLocation() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾浠撳簱/搴撲綅锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      const res = await SeaveSearchWhareHouseLocation()
+      if (res.code === '200') {
+        setTimeout(() => {
+          this.getWareHouseDefSearch()
+          loading.close()
+          this.$message.success('鍚屾鎴愬姛锛�')
+        }, 2000)
+      } else {
+        setTimeout(() => {
+          loading.close()
+          this.$message.error('鍚屾澶辫触锛�')
+        }, 10000)
+      }
+    },
     // 鎺掑簭鏀瑰彉鏃�
     sortChange({ column, prop, order }) {
       if (order === 'descending') {
diff --git a/src/views/zlgl/gxjybz.vue b/src/views/zlgl/gxjybz.vue
index a8acd3b..8494f30 100644
--- a/src/views/zlgl/gxjybz.vue
+++ b/src/views/zlgl/gxjybz.vue
@@ -54,17 +54,17 @@
             label="搴忓彿"
           />
           <el-table-column
-            prop="org_code"
+            prop="code"
             label="鏍囧噯浠g爜"
             sortable="custom"
           />
           <el-table-column
-            prop="org_name"
+            prop="name"
             label="鏍囧噯鍚嶇О"
             sortable="custom"
           />
           <el-table-column
-            prop="description"
+            prop="descr"
             label="鏍囧噯鎻忚堪"
             sortable="custom"
           />
@@ -116,14 +116,14 @@
         <i class="el-icon-s-comment" style="color:#42b983;" /> 鏍囧噯淇℃伅锛�
       </div>
       <el-form ref="dialogForm" style="margin-left: 80px" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
-        <el-form-item label="鏍囧噯缂栫爜" prop="OrgCode">
-          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
+        <el-form-item label="鏍囧噯缂栫爜" prop="code">
+          <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="鏍囧噯鍚嶇О" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
+        <el-form-item label="鏍囧噯鍚嶇О" prop="name">
+          <el-input v-model="dialogForm.name" style="width: 200px" />
         </el-form-item>
         <el-form-item label="鎻忚堪">
-          <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" />
+          <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" />
         </el-form-item>
       </el-form>
       <div style="margin-bottom: 10px">
@@ -145,26 +145,64 @@
           @sort-change="sortChange"
         >
           <el-table-column
-            prop="RowNum"
-            label="搴忓彿"
+            type="index"
             width="100"
           />
           <el-table-column
-            prop="mc"
-            label="妫�楠屾爣鍑嗗悕绉�"
+            prop="code"
+            label="妫�楠屾爣鍑嗙紪鐮�"
           >
             <template slot-scope="{row}">
-              <div v-if="row.isVisible===0">{{ row.mc }}</div>
-              <el-input v-if="row.isVisible===1" v-model="row.mc" />
+              <div v-if="row.isVisible===0">{{ row.code }}</div>
+              <el-select
+                v-if="row.isVisible===1"
+                v-model="row.code"
+                filterable
+                :popper-append-to-body="false"
+                style="width: 200px;"
+                placeholder="璇烽�夋嫨"
+                @change="val=>changeCode(val,row)"
+              >
+                <el-option
+                  v-for="item in JYSelectArr"
+                  :key="item.code"
+                  :label="item.code"
+                  :value="item.code"
+                />
+              </el-select>
             </template>
           </el-table-column>
           <el-table-column
-            prop="ms"
+            prop="name"
+            label="妫�楠屾爣鍑嗗悕绉�"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.isVisible===0">{{ row.name }}</div>
+              <el-select
+                v-if="row.isVisible===1"
+                v-model="row.name"
+                filterable
+                :popper-append-to-body="false"
+                style="width: 200px;"
+                placeholder="璇烽�夋嫨"
+                @change="val=>changeName(val,row)"
+              >
+                <el-option
+                  v-for="item in JYSelectArr"
+                  :key="item.code"
+                  :label="item.name"
+                  :value="item.code"
+                />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="descr"
             label="妫�楠屾弿杩版弿杩�"
           >
             <template slot-scope="{row}">
-              <div v-if="row.isVisible===0">{{ row.ms }}</div>
-              <el-input v-if="row.isVisible===1" v-model="row.ms" />
+              <div v-if="row.isVisible===0">{{ row.descr }}</div>
+              <el-input v-if="row.isVisible===1" v-model="row.descr" />
             </template>
           </el-table-column>
           <el-table-column
@@ -174,29 +212,18 @@
               <div class="operationClass">
                 <el-button v-if="row.isVisible===0" type="text" @click="JYedit(row)">缂栬緫</el-button>
                 <el-button v-if="row.isVisible===0" type="text" @click="JYdel(row)">鍒犻櫎</el-button>
-                <el-button v-if="row.isVisible===1" type="text" @click="JYsave(row)">淇濆瓨</el-button>
-                <el-button v-if="row.isVisible===1" type="text" @click="Jycancel(row)">鍙栨秷</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="JYsave(row)">纭畾</el-button>
+                <el-button v-if="row.isVisible===1" type="text" @click="JYcancel(row)">鍙栨秷</el-button>
               </div>
             </template>
           </el-table-column>
         </el-table>
       </div>
-      <!--鍒嗛〉-->
-      <!--      <pagination-->
-      <!--        v-show="JYtotal>0"-->
-      <!--        :total="JYtotal"-->
-      <!--        :page.sync="JYfrom.page"-->
-      <!--        :limit.sync="JYfrom.rows"-->
-      <!--        align="right"-->
-      <!--        layout="prev, pager, next,sizes"-->
-      <!--        popper-class="select_bottom"-->
-      <!--        @pagination="getStepCheckItemSelect"-->
-      <!--      />-->
 
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
           <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
-          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+          <el-button type="primary" @click="dialogVisibleConfirm">鎻� 浜�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -207,7 +234,7 @@
 import Pagination from '@/components/Pagination'
 import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
 import { getCookie } from '@/utils/auth'
-import { StepCheckStanedSearch } from '@/api/zlgl'
+import { AddUpdateStepCheckStaned, StepCheckItemSelect, StepCheckStanedSearch } from '@/api/zlgl'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -246,46 +273,28 @@
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
-      OrgTypeArr: [
-        { label: '宸ュ巶', value: 'F' },
-        { label: '閮ㄩ棬', value: 'D' },
-        { label: '杞﹂棿', value: 'W' },
-        { label: '绉戝', value: 'K' },
-        { label: '鐢熶骇绾�', value: 'L' }
-      ],
-
       total: 10,
       tableData: [],
       dialogVisible: false,
       dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
+        code: '', // 宸ュ簭妫�楠屾爣鍑嗙紪鐮�
+        name: '', // 宸ュ簭妫�楠屾爣鍑嗗悕绉�
+        enable: '', // 浼犵┖鍊�
+        description: '' // 宸ュ簭妫�楠屾爣鍑嗘弿杩�
       },
       operation: '',
       dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
+        code: [
           { required: true, validator: validateName, trigger: ['blur', 'change'] }
         ],
-        OrgName: [
+        name: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
-        ],
-        SupUnit: [
-          { required: true, validator: validateTypeCode, trigger: ['blur', 'change'] }
         ]
       },
-      JYTableData: [
-        { RowNum: 1, mc: 'xxx1', ms: 'aaaa' }
-      ], // 瀵硅瘽妗嗘楠屼俊鎭〃鏍�
-      JYfrom: {
-        page: 1,
-        rows: 10
-      },
-      JYtotal: 10
+      JYTableData: [], // 瀵硅瘽妗嗘楠屼俊鎭〃鏍�
+      JYSelectArr: [], // 妫�楠岄」鐩笅鎷夋暟缁�
+      JYSelectedArr: [] // 宸查�夋楠岄」鐩暟缁�
+      // JYAddFlag: true // 鏄惁鍙繘琛屾坊鍔�
     }
   },
   created() {
@@ -324,10 +333,9 @@
     },
     // 閲嶇疆
     reset() {
-      this.form.OrgCode = ''
-      this.form.OrgName = ''
-      this.form.OrgType = ''
-      this.form.UserName = ''
+      this.form.stanedcode = ''
+      this.form.stanedname = ''
+      this.form.staneddescr = ''
       this.getStepCheckStanedSearch()
     },
 
@@ -342,9 +350,9 @@
       this.dialogVisible = true
 
       this.$nextTick(() => {
-        this.dialogForm.OrgCode = row.org_code
-        this.dialogForm.OrgName = row.org_name
-        this.dialogForm.SupUnit = row.parent_id
+        this.dialogForm.OrgCode = row.code
+        this.dialogForm.OrgName = row.name
+        this.dialogForm.SupUnit = row.descr
       })
     },
     // 鏌ョ湅
@@ -371,10 +379,12 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
+      this.dialogForm.code = ''
+      this.dialogForm.name = ''
+      this.dialogForm.enable = ''
+      this.dialogForm.description = ''
+      this.JYTableData = []
+      this.JYSelectedArr = []
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -383,15 +393,25 @@
     },
     // 瀵硅瘽妗嗙‘璁�
     dialogVisibleConfirm() {
+      console.log(this.JYSelectedArr.map(i => i))
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
+          const tableData = []
+          this.JYTableData.forEach((item, index) => {
+            tableData.push({
+              STEPCHECKITEM_SEQ: (index + 1),
+              STEPCHECKITEM_CODE: item.code,
+              STEPCHECKITEM_DESC: item.descr
+            })
+          })
           const data = {
-            OrganCode: this.dialogForm.OrgCode,
-            OrganName: this.dialogForm.OrgName,
-            OperType: this.operation === 'add' ? 'Add' : 'Update',
-            Operator: getCookie('admin')
+            code: this.dialogForm.code,
+            name: this.dialogForm.name,
+            description: this.dialogForm.description,
+            enable: '',
+            Data: tableData
           }
-          AddUpdateOrganization(data).then(res => {
+          AddUpdateStepCheckStaned(this.operation === 'add' ? 'Add' : 'Update', data).then(res => {
             if (res.code === '200') {
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
@@ -410,25 +430,42 @@
         this.tableHeight = this.mainHeight - 100
       })
     },
-
-    //  鑾峰彇妫�楠岄」淇℃伅琛�
-    getStepCheckItemSelect() {
-      // let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
-      // number = number === 0 ? (10 + Math.random()) : number
-      this.JYTableData.forEach(item => {
-        item.isVisible = 0
-      })
+    // 鑾峰彇妫�楠岄」鐩笅鎷夊垪琛�
+    async  getStepCheckItemSelect() {
+      const { data: res } = await StepCheckItemSelect()
+      this.JYSelectArr = res
+    },
+    // 妫�楠屾爣鍑嗙紪鐮佸�兼敼鍙�
+    changeCode(val, row) {
+      console.log(this.JYSelectedArr.map(i => i))
+      row.name = this.JYSelectArr.find(it => it.code === val).name
+      row.descr = this.JYSelectArr.find(it => it.code === val).descr
+    },
+    // 妫�楠屾爣鍑嗗悕绉板�兼敼鍙�
+    changeName(val, row) {
+      row.code = this.JYSelectArr.find(it => it.code === val).code
+      row.descr = this.JYSelectArr.find(it => it.code === val).descr
     },
     // 妫�楠屾柊澧�
     JYadd() {
+      if (this.JYTableData.length > 0 && this.JYTableData[this.JYTableData.length - 1].isVisible === 1) {
+        return this.$message.info('璇峰厛纭畾鎴栧彇娑堟湰鏉¤褰曪紒')
+      }
+
       let number = Math.random() * Math.random()// 浣滀负鍒犻櫎鏃剁殑鏍囪瘑绗�
       number = number === 0 ? (10 + Math.random()) : number
-      const data = { mc: '', ms: '', isVisible: 1, number }
-      this.JYTableData.unshift(data)
+      const data = { code: '', name: '', descr: '', isVisible: 1, number }
+      this.JYTableData.push(data)
     },
     JYedit(row) {
+      this.JYSelectedArr.forEach((item, index) => {
+        if (item === row.code) {
+          this.JYSelectedArr.splice(index, 1)
+        }
+      })
+
       this.JYTableData.forEach((item, index) => {
-        if (item.mc === row.mc) {
+        if (item.code === row.code) {
           item.isVisible = 1
         }
       })
@@ -439,18 +476,48 @@
           this.JYTableData.splice(index, 1)
         }
       })
-    },
-    JYsave(row) {
-      this.JYTableData.forEach(item => {
-        if (item.number === row.number) {
-          item.isVisible = 0
+
+      this.JYSelectedArr.forEach((item, index) => {
+        if (item === row.code) {
+          this.JYSelectedArr.splice(index, 1)
         }
       })
     },
-    Jycancel(row) {
+    JYsave(row) {
+      if (row.code === '') {
+        return this.$message.info('妫�楠屾爣鍑嗕唬鐮佷笉鑳戒负绌猴紒')
+      }
+      if (row.name === '') {
+        return this.$message.info('妫�楠屾爣鍑嗗悕绉颁笉鑳戒负绌猴紒')
+      }
+
+      if (this.JYSelectedArr.find(item => item === row.code) !== undefined) {
+        return this.$message.info('妫�楠屾爣鍑嗕唬鐮佷笉鑳介噸澶嶏紒')
+      } else {
+        this.JYSelectedArr.push(row.code)
+      }
+      // if (row.code === this.JYTableData.find(item => item.code).code) {
+      //   return this.$message.info('妫�楠屾爣鍑嗕唬鐮佷笉鑳介噸澶嶏紒')
+      // }
+
+      this.JYTableData.forEach((item, index) => {
+        if (item.number === row.number) {
+          item.isVisible = 0
+          this.JYTableData.splice(index, 1, { number: row.number, code: row.code, name: row.name, isVisible: 0, descr: row.descr })
+        }
+      })
+      console.log(this.JYTableData, 898989)
+    },
+    JYcancel(row) {
       this.JYTableData.forEach((item, index) => {
         if (item.number === row.number) {
           this.JYTableData.splice(index, 1)
+        }
+      })
+
+      this.JYSelectedArr.forEach((item, index) => {
+        if (item === row.code) {
+          this.JYSelectedArr.splice(index, 1)
         }
       })
     }
@@ -621,4 +688,10 @@
   border-color: $main_color;
 }
 
+::v-deep .el-select__caret{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
 </style>
diff --git a/src/views/zlgl/gxjyxm.vue b/src/views/zlgl/gxjyxm.vue
index c7bf002..7d7f1c4 100644
--- a/src/views/zlgl/gxjyxm.vue
+++ b/src/views/zlgl/gxjyxm.vue
@@ -11,12 +11,11 @@
         >
           <div class="elForm">
             <el-form-item label="椤圭洰缂栫爜" style=" display: flex;">
-              <el-input v-model="form.defectcode" placeholder="璇疯緭鍏�" style="width: 200px" />
+              <el-input v-model="form.itemcode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
             <el-form-item label="椤圭洰鍚嶇О" style=" display: flex;">
               <el-input v-model="form.itemname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-
             <el-form-item label="椤圭洰鎻忚堪" style=" display: flex;">
               <el-input v-model="form.itemdescr" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
@@ -55,31 +54,18 @@
             label="搴忓彿"
           />
           <el-table-column
-            prop="org_code"
-            label="缁勭粐缂栫爜"
+            prop="code"
+            label="椤圭洰浠g爜"
             sortable="custom"
           />
           <el-table-column
-            prop="org_name"
-            label="缁勭粐鍚嶇О"
+            prop="name"
+            label="椤圭洰鍚嶇О"
             sortable="custom"
           />
           <el-table-column
-            prop="description"
-            label="缁勭粐绫诲瀷"
-            sortable="custom"
-          >
-            <template slot-scope="{row}">
-              <div v-if="row.description==='F'">宸ュ巶</div>
-              <div v-if="row.description==='D'">閮ㄩ棬</div>
-              <div v-if="row.description==='W'">杞﹂棿</div>
-              <div v-if="row.description==='K'">绉戝</div>
-              <div v-if="row.description==='L'">鐢熶骇绾�</div>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="parentorg_name"
-            label="涓婄骇鍗曚綅"
+            prop="descr"
+            label="椤圭洰鎻忚堪"
             sortable="custom"
           />
           <el-table-column
@@ -126,14 +112,14 @@
       @close="handleClose"
     >
       <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
-        <el-form-item label="椤圭洰绫诲瀷" prop="OrgCode">
-          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
+        <el-form-item label="椤圭洰缂栫爜" prop="checkitemcode">
+          <el-input v-model="dialogForm.checkitemcode" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="椤圭洰鍚嶇О" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
+        <el-form-item label="椤圭洰鍚嶇О" prop="checkitemname">
+          <el-input v-model="dialogForm.checkitemname" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="椤圭洰鎻忚堪" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" />
+        <el-form-item label="椤圭洰鎻忚堪" prop="checkitemdescr">
+          <el-input v-model="dialogForm.checkitemdescr" type="textarea" style="width: 200px" />
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -150,7 +136,7 @@
 import Pagination from '@/components/Pagination'
 import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
 import { getCookie } from '@/utils/auth'
-import { DedectSearch } from '@/api/zlgl'
+import { AddUpdateStepCheckItem, DedectSearch, DeleteStepCheckItem, StepCheckItemSearch } from '@/api/zlgl'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -182,37 +168,23 @@
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
-      OrgTypeArr: [
-        { label: '宸ュ巶', value: 'F' },
-        { label: '閮ㄩ棬', value: 'D' },
-        { label: '杞﹂棿', value: 'W' },
-        { label: '绉戝', value: 'K' },
-        { label: '鐢熶骇绾�', value: 'L' }
-      ],
-
       total: 10,
       tableData: [],
       dialogVisible: false,
       dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
+        checkitemcode: '', // 宸ュ簭妫�楠岄」鐩紪鐮�
+        checkitemname: '', // 宸ュ簭妫�楠岄」鐩悕绉�
+        checkitemdescr: '' // 宸ュ簭妫�楠岄」鐩弿杩�
       },
       operation: '',
       dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
+        checkitemcode: [
           { required: true, validator: validateName, trigger: ['blur', 'change'] }
         ],
-        OrgName: [
+        checkitemname: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
         ]
-
       }
-
     }
   },
   created() {
@@ -250,10 +222,9 @@
     },
     // 閲嶇疆
     reset() {
-      this.form.OrgCode = ''
-      this.form.OrgName = ''
-      this.form.OrgType = ''
-      this.form.UserName = ''
+      this.form.itemcode = ''
+      this.form.itemname = ''
+      this.form.itemdescr = ''
       this.getStepCheckItemSearch()
     },
 
@@ -268,9 +239,9 @@
       this.dialogVisible = true
 
       this.$nextTick(() => {
-        this.dialogForm.OrgCode = row.org_code
-        this.dialogForm.OrgName = row.org_name
-        this.dialogForm.SupUnit = row.parent_id
+        this.dialogForm.checkitemcode = row.code
+        this.dialogForm.checkitemname = row.name
+        this.dialogForm.checkitemdescr = row.descr
       })
     },
     // 鍒犻櫎鎸夐挳
@@ -280,7 +251,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        DeleteOrganization({ orgid: row.code }).then(res => {
+        DeleteStepCheckItem({ checkitemcode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
             this.getStepCheckItemSearch()
@@ -292,10 +263,9 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
+      this.dialogForm.checkitemcode = ''
+      this.dialogForm.checkitemname = ''
+      this.dialogForm.checkitemdescr = ''
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -307,12 +277,12 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganCode: this.dialogForm.OrgCode,
-            OrganName: this.dialogForm.OrgName,
-            OperType: this.operation === 'add' ? 'Add' : 'Update',
-            Operator: getCookie('admin')
+            checkitemcode: this.dialogForm.checkitemcode,
+            checkitemname: this.dialogForm.checkitemname,
+            checkitemdescr: this.dialogForm.checkitemdescr,
+            OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          AddUpdateOrganization(data).then(res => {
+          AddUpdateStepCheckItem(data).then(res => {
             if (res.code === '200') {
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
diff --git a/src/views/zlgl/qxdy.vue b/src/views/zlgl/qxdy.vue
index 9eee958..1dfddec 100644
--- a/src/views/zlgl/qxdy.vue
+++ b/src/views/zlgl/qxdy.vue
@@ -55,31 +55,18 @@
             label="搴忓彿"
           />
           <el-table-column
-            prop="org_code"
-            label="缁勭粐缂栫爜"
+            prop="code"
+            label="缂洪櫡浠g爜"
             sortable="custom"
           />
           <el-table-column
-            prop="org_name"
-            label="缁勭粐鍚嶇О"
+            prop="name"
+            label="缂洪櫡鍚嶇О"
             sortable="custom"
           />
           <el-table-column
-            prop="description"
-            label="缁勭粐绫诲瀷"
-            sortable="custom"
-          >
-            <template slot-scope="{row}">
-              <div v-if="row.description==='F'">宸ュ巶</div>
-              <div v-if="row.description==='D'">閮ㄩ棬</div>
-              <div v-if="row.description==='W'">杞﹂棿</div>
-              <div v-if="row.description==='K'">绉戝</div>
-              <div v-if="row.description==='L'">鐢熶骇绾�</div>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="parentorg_name"
-            label="涓婄骇鍗曚綅"
+            prop="descr"
+            label="缂洪櫡鎻忚堪"
             sortable="custom"
           />
           <el-table-column
@@ -126,14 +113,14 @@
       @close="handleClose"
     >
       <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
-        <el-form-item label="缂洪櫡绫诲瀷" prop="OrgCode">
-          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
+        <el-form-item label="缂洪櫡浠g爜" prop="defectcode">
+          <el-input v-model="dialogForm.defectcode" :disabled="operation!=='add'" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="缂洪櫡鍚嶇О" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
+        <el-form-item label="缂洪櫡鍚嶇О" prop="defectname">
+          <el-input v-model="dialogForm.defectname" style="width: 200px" />
         </el-form-item>
-        <el-form-item label="缂洪櫡鎻忚堪" prop="OrgName">
-          <el-input v-model="dialogForm.OrgName" type="textarea" style="width: 200px" />
+        <el-form-item label="缂洪櫡鎻忚堪" prop="defectdescr">
+          <el-input v-model="dialogForm.defectdescr" type="textarea" style="width: 200px" />
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -150,7 +137,7 @@
 import Pagination from '@/components/Pagination'
 import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
 import { getCookie } from '@/utils/auth'
-import { DedectSearch } from '@/api/zlgl'
+import { AddUpdateDedect, DedectSearch, DeleteDedect } from '@/api/zlgl'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -161,10 +148,10 @@
   data() {
     const validateName = (rule, value, callback) => {
       if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
+        return callback(new Error('璇疯緭鍏ョ己闄蜂唬鐮�'))
       } else {
         if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
+          return callback(new Error('浠g爜涓嶈兘涓轰腑鏂�'))
         } else {
           callback()
         }
@@ -182,37 +169,23 @@
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
-      OrgTypeArr: [
-        { label: '宸ュ巶', value: 'F' },
-        { label: '閮ㄩ棬', value: 'D' },
-        { label: '杞﹂棿', value: 'W' },
-        { label: '绉戝', value: 'K' },
-        { label: '鐢熶骇绾�', value: 'L' }
-      ],
-
       total: 10,
       tableData: [],
       dialogVisible: false,
       dialogForm: {
-        OrgType: '',
-        OrgCode: '',
-        OrgName: '',
-        SupUnit: ''// 涓婄骇鍗曚綅
+        defectcode: '', // 缂洪櫡浠g爜
+        defectname: '', // 缂洪櫡鍚嶇О
+        defectdescr: ''// 缂洪櫡鎻忚堪
       },
       operation: '',
       dialogFormRules: {
-        OrgType: [
-          { required: true, message: '璇疯緭鍏ラ�夋嫨绫诲瀷', trigger: ['blur', 'change'] }
-        ],
-        OrgCode: [
+        defectcode: [
           { required: true, validator: validateName, trigger: ['blur', 'change'] }
         ],
-        OrgName: [
-          { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
+        defectname: [
+          { required: true, message: '璇疯緭鍏ョ己闄峰悕绉�', trigger: ['blur', 'change'] }
         ]
-
       }
-
     }
   },
   created() {
@@ -250,13 +223,11 @@
     },
     // 閲嶇疆
     reset() {
-      this.form.OrgCode = ''
-      this.form.OrgName = ''
-      this.form.OrgType = ''
-      this.form.UserName = ''
+      this.form.defectcode = ''
+      this.form.defectname = ''
+      this.form.defectdescr = ''
       this.getDedectSearch()
     },
-
     // 鏂板鎸夐挳
     add(operation) {
       this.operation = operation
@@ -268,9 +239,9 @@
       this.dialogVisible = true
 
       this.$nextTick(() => {
-        this.dialogForm.OrgCode = row.org_code
-        this.dialogForm.OrgName = row.org_name
-        this.dialogForm.SupUnit = row.parent_id
+        this.dialogForm.defectcode = row.code
+        this.dialogForm.defectname = row.name
+        this.dialogForm.defectdescr = row.descr
       })
     },
     // 鍒犻櫎鎸夐挳
@@ -280,7 +251,7 @@
         cancelButtonText: '鍙栨秷',
         type: 'warning'
       }).then(() => {
-        DeleteOrganization({ orgid: row.code }).then(res => {
+        DeleteDedect({ defectcode: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
             this.getDedectSearch()
@@ -292,10 +263,9 @@
     },
     // 瀵硅瘽妗嗗叧闂簨浠�
     handleClose() {
-      this.dialogForm.OrgType = ''
-      this.dialogForm.OrgCode = ''
-      this.dialogForm.OrgName = ''
-      this.dialogForm.SupUnit = ''
+      this.dialogForm.defectcode = ''
+      this.dialogForm.defectname = ''
+      this.dialogForm.defectdescr = ''
       this.$refs.dialogForm.clearValidate()
     },
     // 瀵硅瘽妗嗗彇娑�
@@ -307,12 +277,12 @@
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
-            OrganCode: this.dialogForm.OrgCode,
-            OrganName: this.dialogForm.OrgName,
-            OperType: this.operation === 'add' ? 'Add' : 'Update',
-            Operator: getCookie('admin')
+            defectcode: this.dialogForm.defectcode,
+            defectname: this.dialogForm.defectname,
+            defectdescr: this.dialogForm.defectdescr,
+            OperType: this.operation === 'add' ? 'Add' : 'Update'
           }
-          AddUpdateOrganization(data).then(res => {
+          AddUpdateDedect(data).then(res => {
             if (res.code === '200') {
               this.$message.success(this.operation === 'add' ? '娣诲姞鎴愬姛锛�' : '淇敼鎴愬姛锛�')
               this.dialogVisible = false
diff --git a/src/views/zzmx/chda.vue b/src/views/zzmx/chda.vue
index 8a2f8b8..92c73c2 100644
--- a/src/views/zzmx/chda.vue
+++ b/src/views/zzmx/chda.vue
@@ -80,7 +80,25 @@
       <el-divider />
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
-        <el-button type="primary" icon="el-icon-office-building" @click="office">鍗曚綅</el-button>
+        <!--        <el-button type="primary" icon="el-icon-office-building" @click="office">鍗曚綅</el-button>-->
+        <el-button
+          type="primary"
+          icon="el-icon-refresh-right"
+          @click="syncSeaveSearchUnit"
+        >鍚屾璁¢噺鍗曚綅
+        </el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-refresh-right"
+          @click="syncInventoryFileSelect"
+        >鍚屾瀛樿揣妗f
+        </el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-refresh-right"
+          @click="syncStockTypeSelect"
+        >鍚屾瀛樿揣绫诲瀷
+        </el-button>
         <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
       <el-divider />
@@ -558,6 +576,7 @@
   UomSearch, UomSelect
 } from '@/api/zzmx'
 import $ from 'jquery'
+import { SeaveSearchErpOrder, SeaveSearchInventory, SeaveSearchInventoryClass, SeaveSearchUnit } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -682,6 +701,77 @@
     this.getHeight()
   },
   methods: {
+    // 鍚屾璁¢噺鍗曚綅
+    async syncSeaveSearchUnit() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾璁¢噺鍗曚綅锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      const res = await SeaveSearchUnit()
+      if (res.code === '200') {
+        setTimeout(() => {
+          // this.getInventoryFileSelect()
+          this.officeTableData = res.data
+          console.log(this.officeTableData, 9)
+          loading.close()
+          this.$message.success('鍚屾鎴愬姛锛�')
+        }, 2000)
+      } else {
+        setTimeout(() => {
+          loading.close()
+          this.$message.error('鍚屾澶辫触锛�')
+        }, 10000)
+      }
+    },
+    // 鍚屾瀛樿揣妗f
+    async  syncInventoryFileSelect() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾瀛樿揣妗f锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      const res = await SeaveSearchInventory()
+      if (res.code === '200') {
+        setTimeout(() => {
+          this.getInventoryFileSelect()
+          loading.close()
+          this.$message.success('鍚屾鎴愬姛锛�')
+        }, 2000)
+      } else {
+        setTimeout(() => {
+          loading.close()
+          this.$message.error('鍚屾澶辫触锛�')
+        }, 10000)
+      }
+    },
+    // 鍚屾瀛樿揣绫诲瀷
+    async syncStockTypeSelect() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾瀛樿揣绫诲瀷锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+      const res = await SeaveSearchInventoryClass()
+      if (res.code === '200') {
+        setTimeout(() => {
+          this.getStockTypeSelect()
+          loading.close()
+          this.$message.success('鍚屾鎴愬姛锛�')
+        }, 2000)
+      } else {
+        setTimeout(() => {
+          loading.close()
+          this.$message.error('鍚屾澶辫触锛�')
+        }, 10000)
+      }
+    },
     async getInventoryFileSelect() {
       const res = await InventoryFileSelect(this.form)
       this.tableData = res.data
@@ -803,6 +893,10 @@
     },
     // 瀵硅瘽妗嗙‘璁�
     dialogVisibleConfirm() {
+      if (this.defaultroute_codeArr.length > 0 && this.defaultroute_code === '') {
+        return this.$message.info('榛樿宸ヨ壓璺嚎涓嶈兘涓虹┖锛�')
+      }
+
       this.$refs.dialogForm.validate(valid => {
         if (valid) {
           const data = {
diff --git a/src/views/zzmx/gxdy.vue b/src/views/zzmx/gxdy.vue
index f6aef7c..ed86682 100644
--- a/src/views/zzmx/gxdy.vue
+++ b/src/views/zzmx/gxdy.vue
@@ -190,21 +190,33 @@
         <el-form-item label="宸ュ簭鍚嶇О" prop="stepname">
           <el-input v-model="dialogForm.stepname" style="width: 200px" />
         </el-form-item>
+
         <el-form-item prop="steptypecode" label="宸ュ簭绫诲瀷">
-          <el-select
+          <el-radio-group
             v-model="dialogForm.steptypecode"
-            filterable
             style="width: 200px"
-            placeholder="璇烽�夋嫨"
-            :popper-append-to-body="false"
           >
-            <el-option
+            <el-radio
               v-for="item in steptypeArr"
               :key="item.code"
-              :label="item.name"
               :value="item.code"
+              :label="item.name"
             />
-          </el-select>
+          </el-radio-group>
+          <!--          <el-select-->
+          <!--            v-model="dialogForm.steptypecode"-->
+          <!--            filterable-->
+          <!--            style="width: 200px"-->
+          <!--            placeholder="璇烽�夋嫨"-->
+          <!--            :popper-append-to-body="false"-->
+          <!--          >-->
+          <!--            <el-option-->
+          <!--              v-for="item in steptypeArr"-->
+          <!--              :key="item.code"-->
+          <!--              :label="item.name"-->
+          <!--              :value="item.code"-->
+          <!--            />-->
+          <!--          </el-select>-->
         </el-form-item>
         <el-form-item prop="enable" label="鍚敤鐘舵��">
           <el-select
@@ -412,7 +424,7 @@
         'id': '',
         'stepcode': '',
         'stepname': '',
-        'steptypecode': '',
+        'steptypecode': '鑷埗',
         'enable': 'Y',
         'description': '',
         'OperType': ''
@@ -511,7 +523,7 @@
         this.dialogForm.id = row.id
         this.dialogForm.stepcode = row.stepcode
         this.dialogForm.stepname = row.stepname
-        this.dialogForm.steptypecode = row.flwtype
+        this.dialogForm.steptypecode = this.steptypeArr.find(item => item.code === row.flwtype).name
         this.dialogForm.description = row.descr
         this.dialogForm.enable = row.enable
       })
@@ -537,7 +549,7 @@
     handleClose() {
       this.dialogForm.stepcode = ''
       this.dialogForm.stepname = ''
-      this.dialogForm.steptypecode = ''
+      this.dialogForm.steptypecode = '鑷埗'
       this.dialogForm.enable = 'Y'
       this.dialogForm.description = ''
       this.$refs.dialogForm.clearValidate()
@@ -554,7 +566,7 @@
             id: this.dialogForm.id,
             stepcode: this.dialogForm.stepcode,
             stepname: this.dialogForm.stepname,
-            steptypecode: this.dialogForm.steptypecode,
+            steptypecode: this.steptypeArr.find(item => item.name === this.dialogForm.steptypecode).code,
             enable: this.dialogForm.enable,
             description: this.dialogForm.description,
             OperType: this.operation === 'add' ? 'Add' : 'Update'
diff --git a/src/views/zzmx/jpgj.vue b/src/views/zzmx/jpgj.vue
index 5bcb346..e685e1c 100644
--- a/src/views/zzmx/jpgj.vue
+++ b/src/views/zzmx/jpgj.vue
@@ -594,27 +594,18 @@
     },
     async partDialogChange(val) {
       const { data: res } = await PartSelectRpute({ partcode: val })
-      console.log(this.routeDialogArr = res, 888)
+      this.routeDialogArr = res
       this.stepDialogArr = []
       this.eqpDialogArr = []
     },
     async routeDialogChange(val) {
       const { data: res } = await RouteSelectStep({ routecode: val })
       this.stepDialogArr = res
-      // this.stepDialogArr = [
-      //   { code: '1001', name: '娴嬭瘯宸ュ簭1' },
-      //   { code: '1002', name: '娴嬭瘯宸ュ簭2' },
-      //   { code: '1003', name: '娴嬭瘯宸ュ簭3' },
-      //   { code: '1004', name: '娴嬭瘯宸ュ簭4' },
-      //   { code: '1005', name: '娴嬭瘯宸ュ簭5' },
-      //   { code: '1006', name: '娴嬭瘯宸ュ簭6' },
-      //   { code: '1007', name: '娴嬭瘯宸ュ簭7' },
-      //   { code: '1008', name: '娴嬭瘯宸ュ簭8' },
-      //   { code: '1009', name: '娴嬭瘯宸ュ簭9' }
-      // ]
       this.eqpDialogArr = []
     },
     radioChange(val) {
+      this.isEqpTableEdit = true
+
       // this.dialogForm.stepcode = this.stepDialogArr.find(item => item.name === val).code
       this.getEqpTable(val)
     },
@@ -662,7 +653,7 @@
         cavity_qty: row.cavity_qty, // 鍨嬭厰鏁�
         unprice: row.unprice//  璁′欢鍗曚环
       }
-      console.log(data, 7)
+
       // row.isVisible = 0
       const res = await SaveBeatRate(data)
       if (res.code === '200') {
@@ -687,7 +678,6 @@
     },
     // 澶嶅埗琛�
     async  copyRow(row) {
-      console.log(row)
       let currentData = {}// 褰撳墠琛屽璞�
       let nextData = {}// 涓嬩竴琛屽璞�
       if (row.RowNum === this.eqpDialogArr.length) {
@@ -700,8 +690,6 @@
           }
         })
       }
-      console.log(currentData, 2)
-      console.log(nextData, 3)
       const newData = {
         partcode: this.eqpTable.partcode, //  浜у搧缂栫爜
         routecode: this.eqpTable.routecode, //  宸ヨ壓璺嚎缂栫爜
@@ -713,7 +701,7 @@
         cavity_qty: currentData.cavity_qty, // 鍨嬭厰鏁�
         unprice: currentData.unprice//  璁′欢鍗曚环
       }
-      console.log(newData, 4)
+
       const res = await SaveBeatRate(newData)
       if (res.code === '200') {
         this.$message.success('澶嶅埗鎴愬姛锛�')
@@ -746,7 +734,6 @@
     async  edit(operation, row) {
       this.operation = operation
       this.dialogVisible = true
-      console.log(row)
 
       this.editPartName = row.partname
       this.editRouteName = row.route_name

--
Gitblit v1.9.3