Ver código fonte

Merge branch 'mergeBranch' into orangeUrgent

qymljy 1 ano atrás
pai
commit
8dff27e1ad

+ 10 - 4
src/HDrpManagement/orderManage/modules/add.vue

@@ -51,7 +51,7 @@
                   placement="bottom"
                   trigger="click"
                   v-model="visible">
-                  <orderCanUseContract ref="contract" @listCreate="listCreate" ismanage="1" @rowClick="contractClick"></orderCanUseContract>
+                  <orderCanUseContract ref="contract" @listCreate="listCreate" ismanage="1" @rowClick="contractClick" @inputChange="inputChange"></orderCanUseContract>
                   <el-input readonly v-model="form.contractname" slot="reference" placeholder="选择合同"></el-input>
                 </el-popover>
               </el-form-item>
@@ -231,7 +231,7 @@ export default {
       this.specordermx()
     },
     submitForm() {
-      console.log(this.form)
+      console.log(this.form,'form')
       this.$refs['form'].validate(async valid => {
         if (!valid) return
         if (this.form.type === '工具订单') {
@@ -294,6 +294,7 @@ export default {
       this.form.sa_projectid = row.sa_projectid
       this.form.contractname = row.title === ''?'未知':row.title
       this.visible = false
+      this.$refs.form.validateField('contractname')
     },
     setChildField (item) {
       this.childField = item.subvalues
@@ -329,18 +330,23 @@ export default {
         "type": "", //订单类型
         "typemx": "", //明细分类,可选
         "remarks": "", //可选
-        "saler_hrid":0,//销售人员hrid,业务员hrid
         "tradefield":"",//必选
         "pay_enterpriseid": 0, //结算单位
         "rebate_used":0,//默认0,是否使用返利金
         "billdate":"",//单据日期,默认创建日期
-        "signbacknum":""
+        "signbacknum":"",
+        "promname":"",
+        "projectnote":"",
+        "contractname":''
       }
       if( this.$refs['enterprise'] ) {
         this.$refs['enterprise'].form.enterprisename = ''
       }
       this.visible1 = false
       this.visible = false
+    },
+    inputChange(){
+      this.$refs.form.clearValidate('contractname')
     }
   }
 }

+ 6 - 1
src/template/orderCanUseContract/index.vue

@@ -7,7 +7,7 @@
           size="small"
           :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
           v-model="param.content.where.condition"
-          placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+          placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable @change="inputChange"></el-input>
       </div>
       <el-table
       :data="tableData"
@@ -90,6 +90,7 @@ export default {
       this.tableData = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.$emit('inputChange')
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -103,6 +104,10 @@ export default {
     },
     rowClick (row) {
       this.$emit('rowClick',row)
+    },
+    inputChange(){
+      console.log('1111change')
+      this.$emit('inputChange')
     }
   },
   created () {