From d939d095aa38879953884ea263eb45984b3876e7 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 08 6月 2024 14:30:38 +0800
Subject: [PATCH] 优化界面

---
 iwara-scada-web/src/views/main/WorkPieceProcess/index.vue |   55 +++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 43 insertions(+), 12 deletions(-)

diff --git a/iwara-scada-web/src/views/main/WorkPieceProcess/index.vue b/iwara-scada-web/src/views/main/WorkPieceProcess/index.vue
index f1a10ec..13700b4 100644
--- a/iwara-scada-web/src/views/main/WorkPieceProcess/index.vue
+++ b/iwara-scada-web/src/views/main/WorkPieceProcess/index.vue
@@ -19,8 +19,13 @@
               </a-form-item>
             </a-col>
             <a-col :md="colMd" :sm="colSm">
-              <a-form-item label="宸ヤ欢ID">
+              <a-form-item label="宸ヤ欢鍙�">
                 <a-input v-model="queryParam.workPieceID" allow-clear placeholder="璇疯緭鍏ュ伐浠跺彿" />
+              </a-form-item>
+            </a-col>
+             <a-col :md="colMd" :sm="colSm">
+              <a-form-item label="鎴愬搧鐮�">
+                <a-input v-model="queryParam.oP80NewCode" allow-clear placeholder="璇疯緭鍏ユ垚鍝佺爜" />
               </a-form-item>
             </a-col>
             <a-col :md="colMd" :sm="colSm">
@@ -37,6 +42,11 @@
                 </a-select>
               </a-form-item>
             </a-col>
+            <a-col :md="colMd2" :sm="colSm2">
+                <a-form-item :label="queryParam.selectModel == 1?'鍒濆涓婄嚎鏃堕棿':'涓婄嚎鏃堕棿'">
+                  <a-range-picker  style="width:100%" :show-time="{format:'HH:mm'}" v-model="queryParam.dates" format="YYYY-MM-DD HH:mm" />
+                </a-form-item>
+              </a-col>
             <template v-if="advanced">
               <a-col :md="colMd" :sm="colSm">
                 <a-form-item label="宸ヤ欢鐘舵��" v-if="queryParam.selectModel == 1">
@@ -90,16 +100,12 @@
                 </a-form-item>
               </a-col>
 
-              <a-col :md="colMd" :sm="colSm">
-                <a-form-item :label="queryParam.selectModel == 1?'鍒濆涓婄嚎鏃堕棿':'涓婄嚎鏃堕棿'">
-                  <a-range-picker style="width:100%" :show-time="{format:'HH:mm'}" v-model="queryParam.dates" format="YYYY-MM-DD HH:mm" />
-                </a-form-item>
-              </a-col>
+             
             </template>
             <a-col :md="colMd" :sm="colSm">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="getData(1)">鏌ヨ</a-button>
-                <a-button style="margin-left: 8px" @click="() => (queryParam = { selectModel: 1 })">閲嶇疆</a-button>
+                <a-button style="margin-left: 8px" @click="resetQueryData">閲嶇疆</a-button>
                 <a @click="advanced = !advanced" style="margin-left: 8px">
                   {{ advanced ? '鏀惰捣' : '灞曞紑' }}
                   <a-icon :type="advanced ? 'up' : 'down'" />
@@ -145,7 +151,7 @@
 <script>
 // 宸ヤ欢鍔犲伐杩芥函
 import { STable, XCard } from '@/components'
-import { downloadFile } from '@/utils/util'
+import { downloadFile,getThisWeekRange } from '@/utils/util'
 import moment from 'moment'
 import {
   workPieceInfoMachiningPage,
@@ -167,6 +173,8 @@
       gutter: 36,
       colMd: 6,
       colSm: 18,
+      colMd2: 10,
+      colSm2: 24,
       labelCol: {
         xs: { span: 24 },
         sm: { span: 7 }
@@ -177,7 +185,11 @@
       },
       advanced: false, // 楂樼骇鎼滅储 灞曞紑/鍏抽棴
       confirmLoading: false,
-      queryParam: { selectModel: 1 },
+      currentSelModel:1,//褰撳墠閫夋嫨鐨勭淮鎶�
+      queryParam: { 
+        selectModel: 1,
+        dates:[]
+      },
       pages: {
         current: 1,
         pageSize: 10,
@@ -197,7 +209,7 @@
           customRender: (text, record, index) => `${index + 1}`
         },
         {
-          title: '宸ヤ欢ID',
+          title: '宸ヤ欢鍙�',
           align: 'center',
           sorter: true,
           dataIndex: 'workPieceID'
@@ -213,6 +225,12 @@
           align: 'center',
           sorter: true,
           dataIndex: 'qualityStateName'
+        },
+        {
+          title: '鎴愬搧鐮�',
+          align: 'center',
+          sorter: true,
+          dataIndex: 'oP80NewCode'
         },
         {
           title: '璐ㄩ噺璇︽儏',
@@ -254,7 +272,7 @@
           }
         },
         {
-          title: '宸插姞宸ユ椂闀�',
+          title: '鍔犲伐鏃堕暱',
           align: 'center',
           sorter: true,
           dataIndex: 'workPieceCurr'
@@ -313,7 +331,10 @@
   watch: {
     'queryParam.selectModel': {
       handler(val, oldVal) {
-        this.queryParam = { selectModel: val }
+        var old_dates=this.queryParam.dates;
+        this.queryParam = { selectModel: val,dates:[] }
+        this.queryParam.dates = old_dates;
+        this.currentSelModel=val;
         if (val == 1) {
           if (oldVal) {
             this.columns.splice(3, this.columns2.length)
@@ -337,9 +358,19 @@
       { name: '宸ヤ欢+宸ュ簭', code: 2 }
     ]
     this.QualityState = this.$options.filters['dictData']('quality_state')
+    this.initData();
     this.getData()
   },
   methods: {
+    initData(){
+      this.queryParam.dates = [];
+      this.queryParam.dates = getThisWeekRange();
+    },
+    //閲嶇疆
+    resetQueryData(){
+      this.queryParam = { selectModel: this.currentSelModel,dates:[] }
+      this.initData();
+    },
     setDisabled() {
       this.data.forEach((item) => {
         if (item.operationTypeHand == 'SPC') {

--
Gitblit v1.9.3