qymljy 3 месяцев назад
Родитель
Сommit
97dc4b997a

+ 7 - 1
src/HDrpManagement/orderManage/modules/edit.vue

@@ -267,7 +267,8 @@
           <div :style="{marginTop:projectError?'20px':''}">
             <small class="inline-16"><span style="color:red;">*</span><b>{{$t(`关联项目`)}}:</b>&nbsp;</small>
             <popoverTemp class="inline-16" :tablecols="tablecols" :isButton="false" :params="paramsProject" :isRest="true"
-                         placeholder="选择关联项目" @rowClick="rowClick" :inputData="projectname"></popoverTemp>
+                         placeholder="选择关联项目" @rowClick="rowClick" :disVal="true" :inputData="projectname"></popoverTemp>
+            <el-button type="primary" size="small" @click="clearProject">清空</el-button>
           </div>
           <div v-if="projectError" style="color:red;font-size: 12px;margin-left: 90px;">{{projectError}}</div>
         </div>
@@ -751,6 +752,11 @@ export default {
       this.projectname = val.projectname
       this.sa_projectid = val.sa_projectid
       this.projectError = ''
+    },
+    clearProject(){
+      this.projectname = ''
+      this.sa_projectid = ''
+      this.projectError = ''
     }
   },
 }

+ 7 - 1
src/SDrpManagement/agentOrder/modules/edit.vue

@@ -487,7 +487,8 @@
             <div :style="{marginTop:projectError?'20px':''}">
               <small class="inline-16"><span style="color:red;">*</span><b>{{$t(`关联项目`)}}:</b>&nbsp;</small>
               <popoverTemp class="inline-16" :tablecols="tablecols" :isButton="false" :params="paramsProject" :isRest="true"
-                           placeholder="选择关联项目" @rowClick="rowClick" :inputData="projectname"></popoverTemp>
+                           placeholder="选择关联项目" @rowClick="rowClick" :disVal="true" :inputData="projectname"></popoverTemp>
+              <el-button type="primary" size="small" @click="clearProject">清空</el-button>
             </div>
             <div v-if="projectError" style="color:red;font-size: 12px;margin-left: 90px;">{{projectError}}</div>
           </div>
@@ -1006,6 +1007,11 @@ export default {
       this.projectname = val.projectname
       this.sa_projectid = val.sa_projectid
       this.projectError = ''
+    },
+    clearProject(){
+      this.projectname = ''
+      this.sa_projectid = ''
+      this.projectError = ''
     }
   },
   mounted () {

+ 7 - 1
src/SDrpManagement/salerOrder/modules/edit.vue

@@ -474,7 +474,8 @@
             <div :style="{marginTop:projectError?'20px':''}">
               <small class="inline-16"><span style="color:red;">*</span><b>{{$t(`关联项目`)}}:</b>&nbsp;</small>
               <popoverTemp class="inline-16" :tablecols="tablecols" :isButton="false" :params="paramsProject" :isRest="true"
-                           placeholder="选择关联项目" @rowClick="rowClick" :inputData="projectname"></popoverTemp>
+                           placeholder="选择关联项目" @rowClick="rowClick" :disVal="true" :inputData="projectname"></popoverTemp>
+              <el-button type="primary" size="small" @click="clearProject">清空</el-button>
             </div>
             <div v-if="projectError" style="color:red;font-size: 12px;margin-left: 90px;">{{projectError}}</div>
           </div>
@@ -1001,6 +1002,11 @@ export default {
       this.projectname = val.projectname
       this.sa_projectid = val.sa_projectid
       this.projectError = ''
+    },
+    clearProject(){
+      this.projectname = ''
+      this.sa_projectid = ''
+      this.projectError = ''
     }
   },
   mounted () {

+ 3 - 1
src/components/selectPopover/index.vue

@@ -133,7 +133,7 @@
 <script>
 export default {
   props:["tablecols","params","placeholder",'restName','inputData','isRest','isContracted','type',
-    'idName','isButton','inputSize','disabled','isTask','rowIndex'],
+    'idName','isButton','inputSize','disabled','isTask','rowIndex','disVal'],
   name: "index",
   data(){
     return {
@@ -165,6 +165,8 @@ export default {
       this.visible = false
       if (this.isButton){
         this.$emit('rowClick',val)
+      }else if(this.disVal){
+        this.$emit('rowClick',val,this.type,this.restName,this.idName,this.rowIndex)
       }else {
         this.inputData = val[this.restName]
         this.$emit('rowClick',val,this.type,this.restName,this.idName,this.rowIndex)