qymljy 3 lat temu
rodzic
commit
de5418ac72

+ 1 - 1
src/Form/projectChange/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" :type="btnType?btnType:'text'" @click="editBtn">编 辑</el-button>
+    <el-button size="mini"  v-if="tool.checkAuth($route.name,'update') " @click="editBtn" type="primary">编 辑</el-button>
     <el-drawer
         title="编辑项目"
         :visible.sync="dialogFormVisible"

+ 39 - 20
src/Form/projectTask/add.vue

@@ -9,9 +9,9 @@
       size="80%">
       <div class="drawer__panel">
         <el-row :gutter="20">
-          <el-form :model="form" class="demo-form-inline" size="small" label-position="rigth" label-width="90px">
+          <el-form :model="form" ref="form" :rules="rules" class="demo-form-inline" size="small" label-position="rigth" label-width="90px">
             <el-col :span="20">
-              <el-form-item  style="width:100%" label="工作任务">
+              <el-form-item  style="width:100%" label="工作任务" prop="taskname">
                 <el-input style="width:100%" v-model="form.taskname" placeholder="输入工作任务"></el-input>
               </el-form-item>
             </el-col>
@@ -153,8 +153,14 @@
 
         objects: new Map(),
         stages: new Map(),
-        relateForm: []
+        relateForm: [],
+        rules:{
+          taskname: [
+            { required: true, message: '任务名称不能为空', trigger: 'blur' },
+          ],
+        },
       }
+
       
     },
     methods:{
@@ -316,23 +322,31 @@
 
         this.optionscore = row.projtaskmag_optionscore
       },
-      async onSubmit () {
-        const res = await this.$api.requested({
-          "id": "20221128144204",
-          "content":this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.form = {
-            "sa_projtaskmagid": 0,
-            "taskname": "",
-            "sequence": 0,
-            "important": 0,
-            "onparties": 0,
-            "onstage": 0,
-            "projtaskmag_options": []
-          },
-          this.drawer = false
+      onSubmit () {
+        this.$refs.form.validate(async (valid)=>{
+          if (!valid) return false
+          const res = await this.$api.requested({
+            "id": "20221128144204",
+            "content":this.form
+          })
+          this.tool.showMessage(res,()=>{
+            this.$emit('onSuccess')
+            this.form = {
+              "sa_projtaskmagid": 0,
+              "taskname": "",
+              "sequence": 0,
+              "important": 0,
+              "onparties": 0,
+              "onstage": 0,
+              "projtaskmag_options": []
+            }
+            this.optionscore=[]
+            this.partiesType=[]
+            this.projectStage=[]
+            this.drawer = false
+            this.$refs.onparties.$refs.projectType.$refs.tables.clearSelection()
+            this.$refs.onstage.$refs.projectType.$refs.tables.clearSelection()
+          })
         })
       },
       onClose(){
@@ -346,6 +360,11 @@
           "onstage": 0,
           "projtaskmag_options": []
         }
+        this.optionscore=[]
+        this.partiesType=[]
+        this.projectStage=[]
+        this.$refs.onparties.$refs.projectType.$refs.tables.clearSelection()
+        this.$refs.onstage.$refs.projectType.$refs.tables.clearSelection()
       }
     }
   }

+ 1 - 1
src/Form/salerPrivatecustomer/add.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="创建客户"
         :visible.sync="dialogFormVisible"
-        size="30%"
+        size="600px"
         direction="rtl"
         :show-close="false"
         append-to-body

+ 1 - 1
src/Form/salerPrivatecustomer/edit.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="编辑客户"
         :visible.sync="dialogFormVisible"
-        size="30%"
+        size="600px"
         direction="rtl"
         :show-close="false"
         append-to-body

+ 2 - 2
src/HDrpManagement/projectChange/components/del.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="inline-16">
-    <el-button slot="reference" size="mini"  @click="dialogTableVisible=true">作 废</el-button>
+  <div >
+    <el-button slot="reference" size="mini"  @click="dialogTableVisible=true" type="primary">作 废</el-button>
     <el-dialog title="作废项目" append-to-body :visible.sync="dialogTableVisible" width="25%">
       <el-row :gutter="20">
         <el-form label-position="right" ref="form" :rules="rules" inline label-width="100px" :model="form" size="small">

+ 3 - 3
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -5,7 +5,7 @@
           title="确定进行提交报备操作吗?"
           @confirm="onSubmit"
       >
-        <el-button  size="mini"  slot="reference">提交报备</el-button>
+        <el-button  size="mini" type="primary" slot="reference">提交报备</el-button>
       </el-popconfirm>
     </div>
     <div v-else-if="flag === 1 && tool.checkAuth($route.name,'putCheck')" class="inline-16">
@@ -13,7 +13,7 @@
           title="确定进行报备审核操作吗?"
           @confirm="onCheck"
       >
-        <el-button size="mini"  slot="reference">报备审核</el-button>
+        <el-button size="mini" type="primary" slot="reference">报备审核</el-button>
       </el-popconfirm>
     </div>
     <div v-if="flag !== 0 && tool.checkAuth($route.name,'putBack') " class="inline-16">
@@ -21,7 +21,7 @@
           title="确定进行取消审核操作吗?"
           @confirm="onUnCheck"
       >
-        <el-button size="mini" slot="reference">报备驳回(退回)</el-button>
+        <el-button size="mini" type="primary" slot="reference">报备驳回(退回)</el-button>
       </el-popconfirm>
     </div>
 

+ 4 - 4
src/HDrpManagement/projectChange/modules/detail.vue

@@ -123,8 +123,8 @@ export default {
   },
   methods:{
     deleteSuccess(){
-      this.queryMainData(this.$route.query.id)
-      this.$emit('onSuccess')
+      /*this.queryMainData(this.$route.query.id)*/
+      this.$store.dispatch('changeDetailDrawer',false)
     },
     async queryMainData (id) {
       this.totalPrice = 0
@@ -292,7 +292,7 @@ export default {
           {label:'项目地址',value:`${this.mainData.province} - ${this.mainData.city} - ${this.mainData.county}`},
           {label:'详细地址',value:this.mainData.address},
           // {label:'项目等级',value:this.projectLead.find(item => item.rowindex == this.mainData.grade).value},
-          {label: '项目等级',value: this.mainData.projectLead ? this.mainData.projectLead : '--'},
+          {label: '项目等级',value: this.mainData.grade ? this.mainData.grade : '--'},
           {label:'项目类型',value:this.mainData.projecttype ? this.mainData.projecttype : '--'},
           {label:'当前项目阶段',value:this.mainData.stagename ? this.mainData.stagename : '--'},
           {label:'项目报备时间',value:''},
@@ -434,7 +434,7 @@ export default {
     this.getEnterprise()
     this.getSysetms()
     // 验证权限
-    this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
+   /* this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)*/
 
   },
 }

+ 3 - 0
src/HDrpManagement/projectChange/modules/modules/andEnterprise/index.vue

@@ -20,6 +20,9 @@
           <div v-if="scope.column.columnname === 'province'">
             <p>{{ scope.column.data.province + '-' + scope.column.data.city + '-' + scope.column.data.county}}</p>
           </div>
+          <div v-else-if="scope.column.columnname === 'important'">
+            <span>{{scope.column.data[scope.column.columnname] === 1 ? '是' : '否'}}</span>
+          </div>
           <div v-else-if="scope.column.columnname === 'operation'">
             <span>{{scope.column.data[scope.column.columnname]}}</span>
           </div>

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/productSet/index.vue

@@ -3,7 +3,7 @@
   <div>
     <div style="margin-bottom: 15px">
       <add class="inline-16"  @addSuccess="onSuccess"></add>
-      <el-button class="inline-16" size="small" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
+      <el-button class="inline-16" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
       <el-input
           size="small"
           style="width: 200px;"

+ 4 - 4
src/HDrpManagement/projectTask/detail/index.vue

@@ -11,7 +11,7 @@
         idname="sa_projtaskmagid"
         ownertable="sa_projtaskmag"
         :tags="[]"
-        :tabs="['评估项','关联对象']"
+        :tabs="['评估项']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -21,11 +21,11 @@
       <div slot="customOperation" >
       </div>
       <div slot="slot0" >
-        <evaluationItems :data="mainData.projtaskmag_options" v-if="flag === 1"></evaluationItems>
+        <evaluationItems :data="mainData" v-if="flag === 1"></evaluationItems>
       </div>
-      <div slot="slot1" >
+<!--      <div slot="slot1" >
         <associatedObjects :data="mainData" v-if="flag === 1"></associatedObjects>
-      </div>
+      </div>-->
     </basicDetails>
   </div>
 </template>

+ 88 - 14
src/HDrpManagement/projectTask/detail/modules/evaluationItems.vue

@@ -1,15 +1,57 @@
 <template>
   <div>
-    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"   >
-      <template v-slot:customcol="scope">
-<!--        <div v-if="scope.column.columnname === 'province'">
-          <p>{{ scope.column.data.province + '-' + scope.column.data.city + '-' + scope.column.data.county}}</p>
-        </div>-->
-        <p>{{scope.column.data[scope.column.columnname]}}</p>
-      </template>
-      <template v-slot:opreation="scope">
-      </template>
-    </tableLayout>
+  <!--  评估项  -->
+    <div>
+      <tableLayout :layout="tablecolsItem" :data="listItem" :opwidth="200" :custom="true" @rowClick="rowClick">
+        <template v-slot:customcol="scope">
+          <p>{{scope.column.data[scope.column.columnname]}}</p>
+        </template>
+        <template v-slot:opreation="scope">
+        </template>
+      </tableLayout>
+    </div>
+  <!-- 关联对象  -->
+    <div style="margin-top: 20px" v-if="flag">
+      <el-table
+          :header-cell-style="{background:'#EEEEEE',color:'#333'}"
+          :data="listObject"
+          ref="listObject"
+          stripe
+          size="mini"
+          style="width: 100%"
+          border>
+        <el-table-column
+            v-if="flagObject"
+            prop="partiestype"
+            label="客户对象">
+          <template slot-scope="scope">
+            <div v-for="(item,index) in scope" :key="index" >
+              {{item.partiestype}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+            v-if="flagStage"
+            prop="enterprisename"
+            label="项目阶段">
+          <template slot-scope="scope">
+            <div v-for="(item,index) in scope" :key="index" >
+              {{item.stagename}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="enterprisename"
+            label="分值">
+          <template slot-scope="scope">
+            <div v-for="(item,index) in scope" :key="index">
+              {{item.score}}
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
   </div>
 </template>
 
@@ -20,15 +62,47 @@ export default {
   data(){
     return {
       tableHieght:"600px",
-      tablecols:[],
-      list:[],
+      tablecolsItem:[],
+      listItem:[],
+      listObject:[],
+      flag:false,
+      flagObject:true,
+      flagStage:true,
       total:0,
       currentPage:0,
     }
   },
+  methods:{
+    rowClick(row){
+      console.log(row,'行数据')
+      if (this.data.onparties === 0){
+        this.flagObject = false
+      }else {
+        console.log("有对象")
+        this.flagObject = true
+      }
+      if (this.data.onstage === 0){
+        this.flagStage = false
+      }else {
+        console.log("有阶段")
+        this.flagStage = true
+      }
+      if (this.data.onstage === 0 || this.data.onparties === 0){
+        this.flag = false
+      }else {
+        this.flag = true
+        this.listObject = row.projtaskmag_optionscore
+      }
+      console.log(this.flag,this.flagObject,this.flagStage)
+    },
+
+  },
   created() {
-    this.tablecols = this.tool.tabelCol(this.$route.name).evaluationItems.tablecols
-    this.list = this.data
+    this.tablecolsItem = this.tool.tabelCol(this.$route.name).evaluationItems.tablecols
+    this.listItem = this.data.projtaskmag_options
+    this.listObject = []
+
+
   },
 }
 </script>

+ 3 - 3
src/HDrpManagement/projectTask/modules/AssociateCustomerObject.vue

@@ -72,7 +72,7 @@ export default {
     },
     onSubmit(){
       this.drawer = false
-      // this.$emit("selectObject",this.selectObject)
+      /*this.$emit("selectObject",this.selectObject)*/
     },
     checkboxCallBack(val){
       this.selectObject = val.map(e=>{
@@ -83,11 +83,10 @@ export default {
           score:0
         }
       })
-
     },
     onClose(){
       this.drawer = false
-      this.$emit("selectObject",this.selectObject)
+      /*this.$emit("selectObject",this.selectObject)*/
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -103,6 +102,7 @@ export default {
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).AssociateCustomerObjectTable.tablecols
     this.listData()
+
   }
 }
 </script>