Browse Source

Merge remote-tracking branch 'origin/master'

wyh 1 year ago
parent
commit
1fa9421c21

+ 5 - 5
src/views/module_base/client/ClientList.vue

@@ -9,13 +9,13 @@
               <a-input placeholder="请输入单位名称" v-model="queryParam.clientName"></a-input>
               <a-input placeholder="请输入单位名称" v-model="queryParam.clientName"></a-input>
             </a-form-item>
             </a-form-item>
           </a-col>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="单位地址">
-              <a-input placeholder="请输入单位地址" v-model="queryParam.clientAddress"></a-input>
-            </a-form-item>
-          </a-col>
           <template v-if="toggleSearchStatus">
           <template v-if="toggleSearchStatus">
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
             <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="单位地址">
+                <a-input placeholder="请输入单位地址" v-model="queryParam.clientAddress"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
               <a-form-item label="联系人姓名">
               <a-form-item label="联系人姓名">
                 <a-input placeholder="请输入联系人姓名" v-model="queryParam.clientPerson"></a-input>
                 <a-input placeholder="请输入联系人姓名" v-model="queryParam.clientPerson"></a-input>
               </a-form-item>
               </a-form-item>

+ 6 - 32
src/views/module_tpm/equipment/modules/EquipmentForm.vue

@@ -88,12 +88,12 @@
           </a-col>
           </a-col>
           <a-col :span="12">
           <a-col :span="12">
             <a-form-model-item label="出厂日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productDate">
             <a-form-model-item label="出厂日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productDate">
-              <j-date placeholder="请选择出厂日期"  v-model="model.productDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+              <j-date placeholder="请选择出厂日期"  v-model="model.productDate" :show-time="true" date-format="YYYY-MM-DD" style="width: 100%" />
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :span="12">
           <a-col :span="12">
             <a-form-model-item label="启用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activeDate">
             <a-form-model-item label="启用日期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="activeDate">
-              <j-date placeholder="请选择启用日期"  v-model="model.activeDate" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
+              <j-date placeholder="请选择启用日期"  v-model="model.activeDate" :show-time="true" date-format="YYYY-MM-DD" style="width: 100%" />
             </a-form-model-item>
             </a-form-model-item>
           </a-col>
           </a-col>
           <a-col :span="12">
           <a-col :span="12">
@@ -129,6 +129,7 @@
 <script>
 <script>
 
 
   import { httpAction, getAction } from '@/api/manage'
   import { httpAction, getAction } from '@/api/manage'
+  import { duplicateCheck } from '@/api/api'
   import { validateDuplicateValue } from '@/utils/util'
   import { validateDuplicateValue } from '@/utils/util'
   import EquipmentTreeModal from '@/views/module_tpm/equipmentTree/modules/EquipmentTreeModal'
   import EquipmentTreeModal from '@/views/module_tpm/equipmentTree/modules/EquipmentTreeModal'
 
 
@@ -167,6 +168,9 @@
           equipmentname: [
           equipmentname: [
             { required: true, message: '请输入设备名称!'},
             { required: true, message: '请输入设备名称!'},
           ],
           ],
+          equipmentcode: [
+            { validator: this.validateTemplateCode}
+          ],
           equipmenttreeid: [
           equipmenttreeid: [
             { required: true, message: '请选择设备分类!'},
             { required: true, message: '请选择设备分类!'},
           ],
           ],
@@ -201,36 +205,6 @@
       this.getTpmTreeData()
       this.getTpmTreeData()
     },
     },
     methods: {
     methods: {
-      getTpmTreeData(){
-        getAction(`/tpmEquipmentTree/tpmEquipmentTree/listtypetree`).then(res=>{
-          // console.log(111,res)
-          if (res.success) {
-            // 防止res.result对tpmListData造成地址赋值的问题
-            let treeDataZanCun = JSON.parse(JSON.stringify(res.result))
-            let treeDatashuju = treeDataZanCun.map((res) => {
-              return {
-                id: res.id,
-                parentid: res.parentid,
-                value: res.id,
-                title: res.name
-              }
-            })
-            this.treeData = this.handleTree(treeDatashuju, "id", "parentid")
-            console.log(treeDatashuju)
-          } else {
-            
-          }
-        })
-      },
-      handleAdd: function () {
-        this.$refs.modalForm.add();
-        this.$refs.modalForm.title = "新增设备分类";
-        this.$refs.modalForm.disableSubmit = false;
-      },
-      modalFormOk2(){
-        console.log(7777)
-        this.getTpmTreeData()
-      },
       add () {
       add () {
         this.edit(this.modelDefault);
         this.edit(this.modelDefault);
       },
       },

+ 8 - 3
src/views/system/modules/UserModal.vue

@@ -168,11 +168,16 @@
           confirmpassword: [{required: true, message: '请重新输入登录密码!',},
           confirmpassword: [{required: true, message: '请重新输入登录密码!',},
             { validator: this.compareToFirstPassword,}],
             { validator: this.compareToFirstPassword,}],
           realname:[{ required: true, message: '请输入用户名称!' }],
           realname:[{ required: true, message: '请输入用户名称!' }],
-          phone: [{required: true, message: '请输入手机号!'}, {validator: this.validatePhone}],
+          phone: [
+            // {required: true, message: '请输入手机号!'}, 
+            {validator: this.validatePhone}
+          ],
           email: [{validator: this.validateEmail}],
           email: [{validator: this.validateEmail}],
           roles:{},
           roles:{},
-          workNo:[ { required: true, message: '请输入工号' },
-            { validator: this.validateWorkNo }],
+          workNo:[ 
+            { required: true, message: '请输入工号' },
+            { validator: this.validateWorkNo }
+            ],
           telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
           telephone: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' },]
         },
         },
         departIdShow:false,
         departIdShow:false,