From fe87f8fe2250e1ffc7d1474fb97cc0ceb89ae55e Mon Sep 17 00:00:00 2001
From: cuijian <cuijian@xalxzn.com>
Date: 星期三, 06 八月 2025 14:13:18 +0800
Subject: [PATCH] 量具检定

---
 src/views/tms/ToolVerificationList.vue                             |  204 +++++++++++++++
 src/views/tms/modules/inbound/InboundListRight.vue                 |   96 +++++--
 src/views/tms/ToolVerificationRecordList.vue                       |  223 +++++++++++++++++
 src/views/tms/modules/verification/ToolVerificationRecordModal.vue |   60 ++++
 src/views/tms/modules/verification/ToolVerificationRecordForm.vue  |  154 +++++++++++
 5 files changed, 709 insertions(+), 28 deletions(-)

diff --git a/src/views/tms/ToolVerificationList.vue b/src/views/tms/ToolVerificationList.vue
new file mode 100644
index 0000000..6a034f9
--- /dev/null
+++ b/src/views/tms/ToolVerificationList.vue
@@ -0,0 +1,204 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col
+            :md="6"
+            :sm="8"
+          >
+            <a-form-item label="閲忓叿缂栧彿">
+              <j-input placeholder="璇疯緭鍏ラ噺鍏风紪鍙�" v-model="queryParam.toolCode" />
+            </a-form-item>
+          </a-col>
+          <a-col
+            :md="6"
+            :sm="8"
+          >
+            <a-form-item label="鍞竴缂栫爜">
+              <j-input placeholder="璇疯緭鍏ュ敮涓�缂栫爜" v-model="queryParam.onlyCode" />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-space>
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            </a-space>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="null"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">璇︽儏</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleEdit(record)">缂栬緫</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import { getAction } from '../../api/manage'
+
+  export default {
+    name: 'ToolVerificationList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+    },
+    data () {
+      return {
+        description: '閲忓叿妫�瀹氬垪琛�',
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'閲忓叿缂栧彿',
+            align:"center",
+            dataIndex: 'toolCode',
+          },
+          {
+            title:'鍞竴缂栫爜',
+            align:"center",
+            dataIndex: 'toolId',
+          },
+          {
+            title:'閲忓叿鍚嶇О',
+            align:"center",
+            dataIndex: 'toolName'
+          },
+          {
+            title:'瑙勬牸',
+            align:"center",
+            dataIndex: 'model'
+          },
+          {
+            title:'璁¢噺鍙�',
+            align:"center",
+            dataIndex: 'measureNumber'
+          },
+          {
+            title:'搴撲綅鍙�',
+            align:"center",
+            dataIndex: 'warehouseCode'
+          },
+          {
+            title:'涓嬫妫�瀹氭棩鏈�',
+            align:"center",
+            dataIndex: 'nextVerificationDate'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/tms/toolVerificationRecord/list",
+          delete: "/tms/toolVerificationRecord/delete",
+          deleteBatch: "/tms/toolVerificationRecord/deleteBatch",
+          exportXlsUrl: "/tms/toolVerificationRecord/exportXls",
+          importExcelUrl: "tms/toolVerificationRecord/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      searchReset() {
+        this.queryParam = {}
+        this.loadData(1);
+      },
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'tenantId',text:'绉熸埛鍙�'})
+        fieldList.push({type:'string',value:'createdBy',text:'鍒涘缓浜�'})
+        fieldList.push({type:'date',value:'createdTime',text:'鍒涘缓鏃堕棿'})
+        fieldList.push({type:'string',value:'updatedBy',text:'鏇存柊浜�'})
+        fieldList.push({type:'date',value:'updatedTime',text:'鏇存柊鏃堕棿'})
+        fieldList.push({type:'string',value:'onlyCode',text:'鍞竴缂栫爜'})
+        fieldList.push({type:'string',value:'measureNumber',text:'璁¢噺鍙�'})
+        fieldList.push({type:'date',value:'nextVerificationDate',text:'涓嬫妫�瀹氭棩鏈�'})
+        fieldList.push({type:'date',value:'verificationReportDate',text:'妫�瀹氭姤鍛婃棩鏈�'})
+        fieldList.push({type:'string',value:'personResponsible',text:'璐d换浜�'})
+        fieldList.push({type:'string',value:'result',text:'妫�瀹氱粨鏋滃強鎰忚'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/tms/ToolVerificationRecordList.vue b/src/views/tms/ToolVerificationRecordList.vue
new file mode 100644
index 0000000..06e67a4
--- /dev/null
+++ b/src/views/tms/ToolVerificationRecordList.vue
@@ -0,0 +1,223 @@
+<template>
+  <a-card :bordered="false">
+    <!-- 鏌ヨ鍖哄煙 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
+        <a-row :gutter="24">
+          <a-col
+            :md="6"
+            :sm="8"
+          >
+            <a-form-item label="閲忓叿缂栧彿">
+              <j-input placeholder="璇疯緭鍏ラ噺鍏风紪鍙�" v-model="queryParam.toolCode" />
+            </a-form-item>
+          </a-col>
+          <a-col
+            :md="6"
+            :sm="8"
+          >
+            <a-form-item label="鍞竴缂栫爜">
+              <j-input placeholder="璇疯緭鍏ュ敮涓�缂栫爜" v-model="queryParam.onlyCode" />
+            </a-form-item>
+          </a-col>
+
+          <a-col :md="6" :sm="8">
+            <a-space>
+              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload">閲嶇疆</a-button>
+            </a-space>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <!-- 鏌ヨ鍖哄煙-END -->
+
+    <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
+    <div class="table-operator">
+      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+    </div>
+
+    <!-- table鍖哄煙-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        :scroll="{x:true}"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="null"
+        class="j-table-force-nowrap"
+        @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleDetail(record)">璇︽儏</a>
+
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a @click="handleEdit(record)">缂栬緫</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                  <a>鍒犻櫎</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+      </a-table>
+    </div>
+
+    <tool-verification-record-modal ref="modalForm" @ok="modalFormOk"></tool-verification-record-modal>
+  </a-card>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import ToolVerificationRecordModal from './modules/verification/ToolVerificationRecordModal'
+  import { getAction } from '../../api/manage'
+
+  export default {
+    name: 'ToolVerificationRecordList',
+    mixins:[JeecgListMixin, mixinDevice],
+    components: {
+      ToolVerificationRecordModal
+    },
+    data () {
+      return {
+        description: '閲忓叿妫�瀹氱粨鏋滆褰曞垪琛�',
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+          },
+          {
+            title:'閲忓叿缂栧彿',
+            align:"center",
+            dataIndex: 'toolCode',
+          },
+          {
+            title:'鍞竴缂栫爜',
+            align:"center",
+            dataIndex: 'toolId',
+          },
+          {
+            title:'閲忓叿鍚嶇О',
+            align:"center",
+            dataIndex: 'toolName'
+          },
+          {
+            title:'瑙勬牸',
+            align:"center",
+            dataIndex: 'model'
+          },
+          {
+            title:'璁¢噺鍙�',
+            align:"center",
+            dataIndex: 'measureNumber'
+          },
+          {
+            title:'妫�瀹氭姤鍛婃棩鏈�',
+            align:"center",
+            dataIndex: 'verificationReportDate'
+          },
+          {
+            title:'妫�瀹氱粨鏋滃強鎰忚',
+            align:"center",
+            dataIndex: 'result'
+          },
+          {
+            title:'璐d换浜�',
+            align:"center",
+            dataIndex: 'personResponsible'
+          },
+          {
+            title:'鍒涘缓浜�',
+            align:"center",
+            dataIndex: 'createBy'
+          },
+          {
+            title:'鍒涘缓鏃堕棿',
+            align:"center",
+            dataIndex: 'createTime'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: "/tms/toolVerificationRecord/list",
+          delete: "/tms/toolVerificationRecord/delete",
+          deleteBatch: "/tms/toolVerificationRecord/deleteBatch",
+          exportXlsUrl: "/tms/toolVerificationRecord/exportXls",
+          importExcelUrl: "tms/toolVerificationRecord/importExcel",
+
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+      this.getSuperFieldList();
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      },
+    },
+    methods: {
+      searchReset() {
+        this.queryParam = {}
+        this.loadData(1);
+      },
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+      initDictConfig(){
+      },
+      getSuperFieldList(){
+        let fieldList=[];
+        fieldList.push({type:'string',value:'tenantId',text:'绉熸埛鍙�'})
+        fieldList.push({type:'string',value:'createdBy',text:'鍒涘缓浜�'})
+        fieldList.push({type:'date',value:'createdTime',text:'鍒涘缓鏃堕棿'})
+        fieldList.push({type:'string',value:'updatedBy',text:'鏇存柊浜�'})
+        fieldList.push({type:'date',value:'updatedTime',text:'鏇存柊鏃堕棿'})
+        fieldList.push({type:'string',value:'onlyCode',text:'鍞竴缂栫爜'})
+        fieldList.push({type:'string',value:'measureNumber',text:'璁¢噺鍙�'})
+        fieldList.push({type:'date',value:'nextVerificationDate',text:'涓嬫妫�瀹氭棩鏈�'})
+        fieldList.push({type:'date',value:'verificationReportDate',text:'妫�瀹氭姤鍛婃棩鏈�'})
+        fieldList.push({type:'string',value:'personResponsible',text:'璐d换浜�'})
+        fieldList.push({type:'string',value:'result',text:'妫�瀹氱粨鏋滃強鎰忚'})
+        this.superFieldList = fieldList
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/tms/modules/inbound/InboundListRight.vue b/src/views/tms/modules/inbound/InboundListRight.vue
index 87a962c..c08e06e 100644
--- a/src/views/tms/modules/inbound/InboundListRight.vue
+++ b/src/views/tms/modules/inbound/InboundListRight.vue
@@ -99,23 +99,14 @@
           </a-button>
         </template>
 
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">缂栬緫</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">璇︽儏</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
-                  <a>鍒犻櫎</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
+       <span
+          slot="action"
+          slot-scope="text, record"
+        >
+          <a
+            href="javascript:;"
+            @click="handlePrint(record)"
+          >鎵撳嵃浜岀淮鐮�</a>
         </span>
 
       </a-table>
@@ -147,6 +138,13 @@
 
     <inbound-model ref="modalForm" @ok="modalFormOk" :nodeSelected="nodeSelected"></inbound-model>
     <inbound-apply-model-list ref="inboundApplyModelList"></inbound-apply-model-list>
+    <div id="printArea" style="display: block;">
+      <div v-for="(item, index) in qrList" :key="index" class="qrcode-item">
+        <p>{{ item.onlyCode }}</p>
+        <p>{{ item.toolName }}</p>
+        <img :src="item.base64" alt="QR Code">
+      </div>
+    </div>
   </a-card>
 </template>
 
@@ -166,6 +164,7 @@
   import ParaBladeList from '.././baseTools/ParaBladeList'
   import InboundModel from './InboundModel'
   import InboundApplyModelList from './InboundApplyModelList.vue'
+  import printJS from 'print-js';
 
   export default {
     name: 'InboundListRight',
@@ -258,14 +257,14 @@
               return !text?"":(text.length>10?text.substr(0,10):text)
             }
           },
-          // {
-          //   title: '鎿嶄綔',
-          //   dataIndex: 'action',
-          //   align:"center",
-          //   fixed:"right",
-          //   width:147,
-          //   scopedSlots: { customRender: 'action' }
-          // }
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align:"center",
+            fixed:"right",
+            width:147,
+            scopedSlots: { customRender: 'action' }
+          }
         ],
         url: {
           list: "/tms/inStoreDetail/list",
@@ -281,13 +280,15 @@
           exportXlsUrl: "/tms/baseTools/exportXls",
           importExcelUrl: "tms/baseTools/importExcel",
           queryParaByToolCode:"/tms/baseTools/queryByToolCode",
-          queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode"
+          queryByToolCode:"/tms/toolsConfigProperty/queryByToolCode",
+          print:'/tms/inStoreDetail/print'
         },
         dictOptions:{},
         superFieldList:[],
         nodeSelected: {}, // 褰撳墠閫変腑鐨勮妭鐐规暟鎹�
         paraTypeFlag:'',
-        disableMixinCreated:true
+        disableMixinCreated:true,
+        qrList: []
       }
     },
     created() {
@@ -527,7 +528,46 @@
         this.$refs.paraTurningToolsList.visable = false
         this.$refs.paraBladeList.visable = false
         this.$refs.toolsConfigPropertyList.visable = false
-      }
+      },
+      handlePrint(record){
+          this.loading = true
+          getAction(this.url.print, {onlyCode:record.onlyCode})
+            .then((res) => {
+              if (res.success) {
+                this.qrList = res.result.map((content, i) => ({
+                  onlyCode:res.result[i].onlyCode,
+                  toolName:res.result[i].toolName,
+                  base64: res.result[i].image
+                  }));
+                  this.handleBacthPrint();
+                this.$emit('ok', new Date())
+              } else {
+                this.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              this.loading = false
+              this.close()
+            })
+    },
+    // 鎵ц鎵撳嵃
+    handleBacthPrint() {
+      this.$nextTick(() => {
+        printJS({
+          printable: 'printArea',
+          type: 'html',
+          style: `
+            .qrcode-item { 
+              page-break-inside: avoid;
+              margin: 10px; 
+              text-align: center;
+            }
+            img { width: 100px; height: 100px; }
+          `,
+          scanStyles: false
+        });
+      });
+    }
       
     },
   }
diff --git a/src/views/tms/modules/verification/ToolVerificationRecordForm.vue b/src/views/tms/modules/verification/ToolVerificationRecordForm.vue
new file mode 100644
index 0000000..2827a29
--- /dev/null
+++ b/src/views/tms/modules/verification/ToolVerificationRecordForm.vue
@@ -0,0 +1,154 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
+        <a-row>
+          <a-col :span="24">
+            <a-form-model-item label="绉熸埛鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tenantId">
+              <a-input v-model="model.tenantId" placeholder="璇疯緭鍏ョ鎴峰彿"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍒涘缓浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createdBy">
+              <a-input v-model="model.createdBy" placeholder="璇疯緭鍏ュ垱寤轰汉"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍒涘缓鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="createdTime">
+              <j-date placeholder="璇烽�夋嫨鍒涘缓鏃堕棿" v-model="model.createdTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鏇存柊浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updatedBy">
+              <a-input v-model="model.updatedBy" placeholder="璇疯緭鍏ユ洿鏂颁汉"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鏇存柊鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="updatedTime">
+              <j-date placeholder="璇烽�夋嫨鏇存柊鏃堕棿" v-model="model.updatedTime"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍞竴缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="onlyCode">
+              <a-input v-model="model.onlyCode" placeholder="璇疯緭鍏ュ敮涓�缂栫爜"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="璁¢噺鍙�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="measureNumber">
+              <a-input v-model="model.measureNumber" placeholder="璇疯緭鍏ヨ閲忓彿"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="涓嬫妫�瀹氭棩鏈�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nextVerificationDate">
+              <j-date placeholder="璇烽�夋嫨涓嬫妫�瀹氭棩鏈�" v-model="model.nextVerificationDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="妫�瀹氭姤鍛婃棩鏈�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="verificationReportDate">
+              <j-date placeholder="璇烽�夋嫨妫�瀹氭姤鍛婃棩鏈�" v-model="model.verificationReportDate"  style="width: 100%" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="璐d换浜�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="personResponsible">
+              <a-input v-model="model.personResponsible" placeholder="璇疯緭鍏ヨ矗浠讳汉"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="妫�瀹氱粨鏋滃強鎰忚" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="result">
+              <a-input v-model="model.result" placeholder="璇疯緭鍏ユ瀹氱粨鏋滃強鎰忚"  ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+
+  import { httpAction, getAction } from '@/api/manage'
+  import { validateDuplicateValue } from '@/utils/util'
+
+  export default {
+    name: 'ToolVerificationRecordForm',
+    components: {
+    },
+    props: {
+      //琛ㄥ崟绂佺敤
+      disabled: {
+        type: Boolean,
+        default: false,
+        required: false
+      }
+    },
+    data () {
+      return {
+        model:{
+         },
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+        confirmLoading: false,
+        validatorRules: {
+        },
+        url: {
+          add: "/tms/toolVerificationRecord/add",
+          edit: "/tms/toolVerificationRecord/edit",
+          queryById: "/tms/toolVerificationRecord/queryById"
+        }
+      }
+    },
+    computed: {
+      formDisabled(){
+        return this.disabled
+      },
+    },
+    created () {
+       //澶囦唤model鍘熷鍊�
+      this.modelDefault = JSON.parse(JSON.stringify(this.model));
+    },
+    methods: {
+      add () {
+        this.edit(this.modelDefault);
+      },
+      edit (record) {
+        this.model = Object.assign({}, record);
+        this.visible = true;
+      },
+      submitForm () {
+        const that = this;
+        // 瑙﹀彂琛ㄥ崟楠岃瘉
+        this.$refs.form.validate(valid => {
+          if (valid) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            httpAction(httpurl,this.model,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+            })
+          }
+         
+        })
+      },
+    }
+  }
+</script>
\ No newline at end of file
diff --git a/src/views/tms/modules/verification/ToolVerificationRecordModal.vue b/src/views/tms/modules/verification/ToolVerificationRecordModal.vue
new file mode 100644
index 0000000..7fe1c74
--- /dev/null
+++ b/src/views/tms/modules/verification/ToolVerificationRecordModal.vue
@@ -0,0 +1,60 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+    <tool-verification-record-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tool-verification-record-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import ToolVerificationRecordForm from './ToolVerificationRecordForm'
+  export default {
+    name: 'ToolVerificationRecordModal',
+    components: {
+      ToolVerificationRecordForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3