From f3335e01ea71614db9fa6aedf1d35e1202c3b12f Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 11 八月 2022 15:46:26 +0800
Subject: [PATCH] 修改登陆时传PC参数

---
 src/views/scgl/scdd.vue |  409 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 203 insertions(+), 206 deletions(-)

diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 0314c4e..1c1de64 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -1,11 +1,25 @@
 <template>
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
-      <div style="padding: 10px 5px 0 0">
+
+      <div class="bodyTopButtonGroup">
+        <el-button
+          icon="el-icon-refresh-right"
+          @click="syncERP"
+        >鍚屾ERP
+        </el-button>
+        <el-button
+          icon="el-icon-switch-button"
+          @click="orderClose"
+        >鍏抽棴璁㈠崟
+        </el-button>
+      </div>
+
+      <div class="bodyTopFormGroup">
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
           style="display: flex;justify-content: space-between"
         >
@@ -13,6 +27,7 @@
             <el-form-item label="璁㈠崟鐘舵��" style=" display: flex;">
               <el-select
                 v-model="form.erporderstus"
+                filterable
                 :popper-append-to-body="false"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
@@ -28,7 +43,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>
@@ -38,46 +52,47 @@
             <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-date-picker-->
-              <!--                v-model="form.paydate"-->
-              <!--                type="date"-->
-              <!--                value-format="yyyy-MM-dd HH:mm:ss"-->
-              <!--                style="width: 200px"-->
-              <!--                placeholder="閫夋嫨鏃ユ湡"-->
-              <!--              />-->
-              <el-date-picker
-                v-model="form.paydate"
-                type="daterange"
-                range-separator="~"
-                size="mini"
-                start-placeholder="寮�濮嬫棩鏈�"
-                end-placeholder="缁撴潫鏃ユ湡"
-              />
-              <!--              :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-date-picker-->
-              <!--                v-model="form.createdate"-->
-              <!--                type="date"-->
-              <!--                value-format="yyyy-MM-dd HH:mm:ss"-->
-              <!--                style="width: 200px"-->
-              <!--                placeholder="閫夋嫨鏃ユ湡"-->
-              <!--              />-->
+            <el-form-item label="棰勮寮�宸ユ椂闂�" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
               <el-date-picker
-                v-model="form.createdate"
+                v-model="form.paystartdate"
                 type="daterange"
                 range-separator="~"
+                class="timeMini"
+                size="mini"
+                style="width: 250px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
+                :clearable="false"
                 start-placeholder="寮�濮嬫棩鏈�"
+                end-placeholder="缁撴潫鏃ユ湡"
+              />
+              <!--              :picker-options="expireTimeOption"-->
+
+            </el-form-item>
+            <el-form-item label="棰勮瀹屽伐鏃堕棿" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
+              <el-date-picker
+                v-model="form.payenddate"
+                type="daterange"
+                :clearable="false"
+                class="timeMini"
+                range-separator="~"
+                start-placeholder="寮�濮嬫棩鏈�"
+                style="width: 250px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
                 end-placeholder="缁撴潫鏃ユ湡"
                 size="mini"
               />
               <!--              :picker-options="expireTimeOption"-->
-
+              <!--              <el-date-picker-->
+              <!--                v-model="form.createdate"-->
+              <!--                type="date"-->
+              <!--                size="mini"-->
+              <!--                :clearable="false"-->
+              <!--                style="width: 200px;"-->
+              <!--                format="yyyy-MM-dd"-->
+              <!--                placeholder="閫夋嫨鏃ユ湡"-->
+              <!--              />-->
             </el-form-item>
           </div>
           <div style="min-height: 100px">
@@ -85,7 +100,7 @@
               <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
               <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
             </div>
-            <!--                      <div v-if="!isFullscreen" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
+            <!--                      <div v-if="!isIpad" style="display: flex;align-items: start; margin-top: 15px;z-index: 2">-->
             <!--                        <el-button-->
             <!--                          type="primary"-->
             <!--                          icon="el-icon-refresh-right"-->
@@ -99,7 +114,7 @@
             <!--                        >鍏抽棴璁㈠崟-->
             <!--                        </el-button>-->
             <!--                      </div>-->
-            <!--                      <div v-if="isFullscreen" style="display: flex;flex-direction: column;align-items: end">-->
+            <!--                      <div v-if="isIpad" style="display: flex;flex-direction: column;align-items: end">-->
             <!--                        <el-button-->
             <!--                          type="primary"-->
             <!--                          icon="el-icon-refresh-right"-->
@@ -117,30 +132,12 @@
           </div>
         </el-form>
       </div>
-      <el-divider />
-      <div style="margin-left: 10px;display: flex">
-        <el-button
-          type="primary"
-          icon="el-icon-refresh-right"
-          @click="reset('update')"
-        >鍚屾ERP
-        </el-button>
-        <el-button
-          type="primary"
-          icon="el-icon-switch-button"
-          @click="orderClose"
-        >鍏抽棴璁㈠崟
-        </el-button>
-        <!--        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
-        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
-      </div>
-      <el-divider />
       <div class="elTableDiv">
         <el-table
           :data="tableData"
-          :height="tableHeight"
+          :height="tableHeight+'px'"
           border
-          stripe
+          :row-class-name="tableRowClassName"
           :style="{width: 100+'%',height:tableHeight+'px',}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
@@ -153,6 +150,7 @@
           <!--          />-->
           <el-table-column
             width="50"
+            fixed
           >
             <template slot-scope="{row}">
               <el-radio
@@ -166,6 +164,7 @@
           <el-table-column
             prop="RowNum"
             width="50"
+            fixed
             label="搴忓彿"
           />
           <el-table-column
@@ -176,8 +175,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>
@@ -185,29 +184,35 @@
             prop="wo"
             label="璁㈠崟缂栧彿"
             sortable="custom"
-            width="150"
+            min-width="150"
           />
           <el-table-column
             prop="partcode"
             label="浜у搧缂栫爜"
             sortable="custom"
-            width="150"
+            min-width="150"
           />
           <el-table-column
             prop="partname"
             label="浜у搧鍚嶇О"
             sortable="custom"
-            width="150"
+            min-width="150"
           />
           <el-table-column
             prop="partspec"
             label="浜у搧瑙勬牸"
             sortable="custom"
-            width="110"
+            min-width="110"
           />
           <el-table-column
             prop="qty"
             label="璁㈠崟鏁伴噺"
+            width="150"
+            sortable="custom"
+          />
+          <el-table-column
+            prop="relse_qty"
+            label="宸蹭笅鍗曟暟閲�"
             width="150"
             sortable="custom"
           />
@@ -218,8 +223,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"
           />
@@ -238,10 +249,14 @@
           <el-table-column
             label="鎿嶄綔"
             fixed="right"
+            width="80"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <el-button type="text" @click="edit('edit',row)">涓嬭揪</el-button>
+                <el-tooltip class="item" effect="dark" content="涓嬭揪" placement="top">
+                  <!--                <el-button type="text" @click="edit('edit',row)">涓嬭揪</el-button>-->
+                  <i class="el-icon-bottom" style="color:#42b983;cursor: pointer;margin-left: 5px" @click="edit('edit',row)" />
+                </el-tooltip>
               </div>
             </template>
           </el-table-column>
@@ -254,7 +269,7 @@
         :page.sync="form.page"
         :limit.sync="form.rows"
         align="right"
-        layout="prev, pager, next,sizes"
+        layout="total,prev, pager, next,sizes"
         popper-class="select_bottom"
         @pagination="getErpOrderSearch"
       />
@@ -355,11 +370,12 @@
 <script>
 import Pagination from '@/components/Pagination'
 import { ClosedErpOrder, ErpOrderSearch, MarkSaveErpOrder } from '@/api/scgl'
-import { handleDatatime, handleDatetime } from '@/utils/global'
+import { handleDatetime } from '@/utils/global'
+import { SeaveSearchErpOrder } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
-  name: 'Zzjg',
+  name: 'SCDD',
   components: {
     Pagination
   },
@@ -376,7 +392,7 @@
       }
     }
     return {
-      isFullscreen: false,
+      isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -385,8 +401,10 @@
         partcode: '', // 浜у搧缂栫爜
         partname: '', // 浜у搧鍚嶇О
         partspec: '', // 浜у搧瑙勬牸
-        paydate: '', // 浜や粯鏃堕棿
         creatuser: '', // 鍒涘缓浜哄憳
+        // paystartdate: '', // 浜や粯鏃堕棿
+        paystartdate: '', // 棰勮寮�宸ユ椂闂�
+        payenddate: '', // 棰勮瀹屽伐鏃堕棿
         createdate: '', // 鍒涘缓鏃堕棿
         prop: 'createdate', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
@@ -395,8 +413,8 @@
       },
       erporderstusArr: [
         { code: 'NEW', name: '鏂拌鍗�' },
-        { code: 'CREATING', name: '鍒涘缓涓�' },
-        { code: 'CREATED', name: '宸插垱寤�' },
+        { code: 'CREATING', name: '閮ㄥ垎涓嬭揪' },
+        { code: 'CREATED', name: '鍏ㄩ儴涓嬭揪' },
         { code: 'CLOSED', name: '宸插叧闂�' }
       ],
       total: 10,
@@ -406,7 +424,7 @@
       dialogForm: {
         partname: '', // 浜у搧鍚嶇О
         partspec: '', // 浜у搧瑙勬牸
-        paydate: '', // 浜や粯鏃堕棿
+        // paystartdate: '', // 棰勮寮�宸ユ椂闂�
         wkshopname: '', // 杞﹂棿鍚嶇О
         warehousename: '', // 浠撳簱鍚嶇О
 
@@ -456,12 +474,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])
       }
@@ -472,9 +490,11 @@
         partcode: this.form.partcode, // 浜у搧缂栫爜
         partname: this.form.partname, // 浜у搧鍚嶇О
         partspec: this.form.partspec, // 浜у搧瑙勬牸
-        paydate: tempDate2, // 浜や粯鏃堕棿
+        paystartdate: tempDate2, // 浜や粯鏃堕棿
+        payenddate: tempDate, // 浜や粯鏃堕棿
         creatuser: this.form.creatuser, // 鍒涘缓浜哄憳
-        createdate: tempDate, // 鍒涘缓鏃堕棿
+        // createdate: this.form.createdate.toString().length > 0 ? handleDatetime(this.form.createdate) : '', // 鍒涘缓鏃堕棿
+
         prop: this.form.prop, // 鎺掑簭瀛楁
         order: this.form.order, // 鎺掑簭瀛楁
         page: this.form.page, // 绗嚑椤�
@@ -499,24 +519,49 @@
       this.form.prop = prop
       this.getErpOrderSearch()
     },
+    // 鍚屾ERP
+    syncERP() {
+      const loading = this.$loading({
+        lock: true,
+        text: '姝e湪鍚屾ERP锛岃绋嶇瓑...',
+        spinner: 'el-icon-loading',
+        customClass: 'osloading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      })
+
+      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() {
       this.getErpOrderSearch()
     },
     // 閲嶇疆
-    reset(val) {
+    reset() {
       this.form.erporderstus = ''
       this.form.erpordercode = ''
       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()
-      if (val.length > 0) {
-        this.$message.success('ERP宸插悓姝ワ紒')
-      }
     },
     // 鍗曢�夋閫変腑鑾峰彇褰撳墠琛屼俊鎭�
     getCurrentRow(wo) {
@@ -638,43 +683,83 @@
     // 鑾峰彇椤甸潰楂樺害
     getHeight() {
       this.$nextTick(() => {
-        this.mainHeight = window.innerHeight - 250
-        this.tableHeight = this.mainHeight - 100
-        this.isFullscreen = window.innerHeight < 800
-        if (this.isFullscreen) {
-          this.tableHeight = this.tableHeight - 50
+        this.mainHeight = window.innerHeight - 85
+        this.tableHeight = this.mainHeight - 260
+        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+
+        if (this.isIpad) {
+          this.tableHeight = this.tableHeight - 20
         }
       })
+    },
+    tableRowClassName({ row, rowIndex }) {
+      return 'custom-row'
     }
   }
 }
 </script>
 
+<!--鍏叡椤甸潰鏍峰紡-->
 <style lang="scss" scoped>
 $main_color: #42b983;
+::v-deep  .el-range-input{
+  font-size: 14px !important;
+}
+::v-deep .el-range__icon{
+  line-height: 28px !important;
+}
+::v-deep .el-range-separator{
+  line-height: 28px !important;
+}
+::v-deep .el-range-input{
+  font-size: 14px ;
+}
+::v-deep .el-range-separator{
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+
+.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
+  color: $main_color;
+  cursor: pointer;
+}
+.el-icon-edit-outline{
+  margin-right: 15px;
+}
+
+::v-deep .el-button--primary, .el-button--default, .el-button--info {
+  height: 34px;
+  display: flex;
+  align-items: center;
+  padding: 0 15px;
+}
+
 ::v-deep .el-button--primary {
-  background-color: $main_color !important;
-  height: 30px;
-  display: flex;
-  align-items: center;
-  //border: 1px solid $main_color;
-  border: none;
-  padding: 0 20px;
+  //background-color: $main_color !important;
 }
 
-::v-deep .el-button--primary:hover {
+::v-deep .el-button--default {
+  background-color: #f8f8fa;
   border: none;
 }
 
-::v-deep .el-button--info {
-  height: 30px;
-  display: flex;
-  align-items: center;
-  padding: 0 20px;
+::v-deep .el-input__inner {
+  height: 34px;
+  line-height: 34px;
+  //color: #a7a7a7;
 }
 
-::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
-  background-color: $main_color !important;
+::v-deep .el-dialog__body {
+  padding: 20px 100px !important;
+}
+
+::v-deep .dialogVisibleRoles .el-dialog__body {
+  padding: 20px 20px !important;
+}
+
+::v-deep .importPickerClass .el-dialog__body {
+  padding: 20px 20px !important;
 }
 
 ::v-deep .el-dialog__footer {
@@ -682,106 +767,30 @@
   justify-content: flex-end;
 }
 
-.footerButton {
-  display: flex;
-  justify-content: end;
-}
-
-::v-deep .el-button--default {
-  background-color: #ffffff !important;
-  height: 30px;
-  display: flex;
-  align-items: center;
-  padding: 0 20px;
-}
-
-::v-deep .el-button--default:hover {
-  color: #606266;
-}
-
-::v-deep .el-dialog__body {
-  padding: 20px 100px !important;
-}
-
-::v-deep .el-radio__input.is-checked .el-radio__inner {
-  background-color: $main_color;
-  border-color: $main_color;
-}
-
-::v-deep .el-radio__input.is-checked + .el-radio__label {
-  color: $main_color !important;
-}
-
-::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
-  border-color: $main_color;
-  background-color: $main_color;
-}
-
-::v-deep .el-input__inner {
-  height: 30px;
-  line-height: 30px;
-}
-
-::v-deep .el-input__inner:focus {
-  border-color: $main_color;
-}
-
 ::v-deep .el-table .caret-wrapper {
   transform: scale(0.8);
 }
 
 ::v-deep .cell {
-  display: flex !important;
-  align-items: center !important;
-  justify-content: space-between !important;
-}
-
-::v-deep .el-button--text {
-  color: $main_color;
-  font-size: 14px;
-  cursor: pointer;
-}
-
-.operationClass {
-  height: 23px;
   display: flex;
-  justify-content: space-between;
   align-items: center;
+  justify-content: space-between;
 }
 
-.el-icon-share {
-  color: $main_color;
-  cursor: pointer;
+::v-deep .el-table::before {
+  height: 0;
 }
 
-.el-checkbox.is-bordered.is-checked {
-  border-color: $main_color;
+::v-deep .el-table__body-wrapper {
+  background-color: #f8f8fa;
 }
 
-::v-deep .el-radio__input.is-checked .el-radio__inner {
-  border-color: $main_color;
-  background: $main_color;
+::v-deep .el-table__body .el-table__row.hover-row td{
+  background-color: #eaecef ;
 }
 
-::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
-  border-color: $main_color;
-  background: $main_color;
-}
-
-::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
-  color: $main_color !important;
-}
-
-::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
-  margin: 10px 30px 0px 0;
-}
-
-::v-deep .el-radio__input.is-checked + .el-radio__label {
-  color: $main_color;
-}
-
-::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
-  margin: 10px 30px 0px 0;
+::v-deep .el-form--inline .el-form-item__label {
+  color: #a7a7a7;
 }
 
 .body ::v-deep .el-divider {
@@ -793,31 +802,19 @@
 .body ::v-deep .el-form-item {
   margin-bottom: 0;
 }
-
-::v-deep .el-input__inner:focus {
-  border-color: $main_color;
+.userDialogVisible ::v-deep .el-form-item {
+  margin-bottom: 0;
 }
 
-::v-deep .el-select .el-input__inner:focus {
-  border-color: $main_color;
+</style>
+<style>
+.el-table .custom-row {
+  background: #f8f8fa;
 }
-
-::v-deep .el-select-dropdown__item.selected {
-  color: $main_color;
-}
-
-::v-deep .el-checkbox__inner:hover {
-  border-color: $main_color;
-}
-
-::v-deep .el-textarea__inner:focus {
-  border-color: $main_color;
-}
-
-.elTableDiv {
-  ::v-deep .el-radio__label {
-    display: none;
-  }
+</style>
+<style>
+.osloading{
+  font-size: 40px;
 }
 
 </style>

--
Gitblit v1.9.3