Sfoglia il codice sorgente

项目商机-工作任务

qymljy 2 anni fa
parent
commit
ce58d689ac

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

@@ -9,7 +9,7 @@
     :turnPageId="20221020143502" 
     idname="sa_projectid"
     :tags="[]"
-    :tabs="['详细信息','工作任务','关联客户','产品配置单','报价单','竞争对手','关联线索']"
+    :tabs="['详细信息','项目评估','关联客户','产品配置单','报价单','竞争对手','关联线索']"
     @pageChange="pageChange"
     @onEditSuccess="queryMainData($route.query.id)">
     <!-- 使用此插槽可不传[tags] -->

+ 45 - 23
src/HDrpManagement/projectChange/modules/modules/rival/modules/add.vue

@@ -8,7 +8,7 @@
         direction="rtl"
         :show-close="false"
         append-to-body
-        @close="dialogFormVisible = false">
+        @close="onClose">
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="82px">
@@ -111,7 +111,7 @@
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -182,30 +182,52 @@ export default {
       this.form = Object.assign({},this.form,val)
       this.enterpriseShow = false
     },
-    async onSubmit(){
+    onSubmit(){
+      this.form.sa_projectid = this.data.sa_projectid
       console.log(this.form)
-      const res = await this.$api.requested({
-        "id": 20221019165802,
-        "content": this.form
-      })
-      this.tool.showMessage(res,()=>{
-        this.dialogFormVisible = false
-        this.form = {
-          "enterprisename":'',
-          "brandname":'',
-          "industry":'',
-          "sa_project_competeid": 0,
-          "sa_projectid": '', //工程项目表ID
-          "contactsid": '', //可不传
-          "sa_competitorid": '', //竞争对手ID
-          "important": 0, //主要威胁 0/1
-          "advantage": "",
-          "inferiority": "",
-          "remarks": ""
-        }
-        this.$emit("addSuccess")
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221019165802,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogFormVisible = false
+          this.$refs.form.resetFields()
+          this.form = {
+            "enterprisename":'',
+            "brandname":'',
+            "industry":'',
+            "sa_project_competeid": 0,
+            "sa_projectid": '', //工程项目表ID
+            "contactsid": '', //可不传
+            "sa_competitorid": '', //竞争对手ID
+            "important": 0, //主要威胁 0/1
+            "advantage": "",
+            "inferiority": "",
+            "remarks": ""
+          }
+          this.$emit("addSuccess")
+        })
       })
     },
+    onClose(){
+      this.dialogFormVisible = false
+      this.$refs.form.resetFields()
+      this.form = {
+        "enterprisename":'',
+        "brandname":'',
+        "industry":'',
+        "sa_project_competeid": 0,
+        "sa_projectid": '', //工程项目表ID
+        "contactsid": '', //可不传
+        "sa_competitorid": '', //竞争对手ID
+        "important": 0, //主要威胁 0/1
+        "advantage": "",
+        "inferiority": "",
+        "remarks": ""
+      }
+    },
     /*企业分页*/
     handleSizeChangeProject(val) {
       // console.log(`每页 ${val} 条`);

+ 10 - 3
src/HDrpManagement/projectChange/modules/modules/stageTask/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="top_style">
-      <span style="color: #000000 !important;margin-left: 10px">工作任务(总分值:)</span>
+      <span style="color: #000000 !important;margin-left: 10px">工作任务(总分值:{{sumscore}})</span>
     </div>
     <el-table
         :data="workData"
@@ -30,7 +30,8 @@
           label="操作"
           width="180">
         <template slot-scope="scope">
-          <edit :data="rowData" :rowData="scope.row"></edit>
+          <edit class="inline-16" :data="rowData" :rowData="scope.row" @editSuccess="onSuccess"></edit>
+          <evaluationRecord class="inline-16" :data="rowData" :rowData="scope.row"></evaluationRecord>
         </template>
       </el-table-column>
     </el-table>
@@ -39,13 +40,15 @@
 
 <script>
 import edit from './modules/edit'
+import evaluationRecord from './modules/evaluationRecord'
 export default {
   props:['rowData'],
   name: '',
-  components:{edit},
+  components:{edit,evaluationRecord},
   data() {
     return {
       workData:[],
+      sumscore:''
     };
   },
   computed:{
@@ -69,6 +72,10 @@ export default {
       })
       console.log(res,"工作任务详情")
       this.workData = res.data.rows
+      this.sumscore = res.data.sumscore
+    },
+    onSuccess(){
+      this.listData()
     }
   },
   mounted() {

+ 77 - 32
src/HDrpManagement/projectChange/modules/modules/stageTask/modules/edit.vue

@@ -22,56 +22,76 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">下一步</el-button>
       </div>
     </el-drawer>
 <!-- 编辑操作 -->
     <el-drawer
         title="编辑"
         :visible.sync="drawerEdit"
-        size="45%"
+        size="25%"
         direction="rtl"
         append-to-body
         :show-close="false"
         @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 2px !important;">
+      <div class="drawer__panel" style="margin-bottom: -20px !important;">
         <el-row>
-          <el-form  size="mini" label-position="right" label-width="75px">
+          <el-form  size="mini" label-position="left" >
             <el-col :span="24">
-              <el-form-item label="任务名称:"  >
+              <el-form-item label="工作内容"  label-width="75px">
 <!--                <el-input v-model="data.taskname" autocomplete="off" placeholder="输入阶段名称"></el-input>-->
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item style="margin-top: -20px">
                 <span>{{rowData.taskname}}</span>
               </el-form-item>
             </el-col>
           </el-form>
         </el-row>
       </div>
-      <div class="drawer__panel">
+      <div class="drawer__panel" style="margin-bottom: -20px !important;border-top: 1px solid #767272;">
         <el-row>
-          <el-form :model="formData" :rules="rules" ref="formData"  size="mini" label-position="right" label-width="75px">
+          <el-form :model="formData" :rules="rules" ref="formData"  size="mini" label-position="left" label-width="95px">
             <el-col :span="24">
-              <el-form-item label="评估内容"  >
+              <el-form-item label="评估内容"  prop="select">
               </el-form-item>
             </el-col>
-            <el-col :span="24" v-for="(item,index) in form" :key="index">
-              <el-tag type="warning" size="mini" style="margin-right: 10px">{{item.type}}</el-tag>
-              <span>{{item.enterprisename}}</span>
-              <div style="width: 100%">
-<!--                <el-radio v-model="item.partiestype" :label=item.optionname>{{item.optionname + item.remarks}}</el-radio>-->
-                <el-radio-group v-model="item.checkedscore" v-for="(radio,index) in item.option" :key="index" @change="radioChange(item,radio)">
-                  <el-radio :label="radio">{{radio.optionname + radio.remarks}}</el-radio>
-                </el-radio-group>
+            <el-col :span="24" v-if="rowData.partiestype.length !== 0">
+              <div v-for="(item,index) in form" :key="index" style="width: 100%;margin-top: -10px;margin-bottom: 20px">
+                <el-tag type="warning" size="mini" style="margin-right: 10px;margin-bottom: 10px">{{item.type}}</el-tag>
+                <span style="font-size: 14px;!important;">{{item.enterprisename}}</span>
+                <div style="width: 100%;margin-bottom: 10px;">
+                  <el-radio-group v-model="item.checkedscore" v-for="(radio,index) in item.option" :key="index" @change="radioChange(item,radio)" style="width: 100%">
+                    <el-radio :label="radio" style="width: 100% !important;margin-bottom: 10px">
+                      {{radio.optionname}}
+                      <span style="margin-left: 10px;font-size: 10px">{{radio.remarks}}</span>
+                    </el-radio>
+                  </el-radio-group>
+              </div>
               </div>
             </el-col>
+            <el-col :span="24" v-if="rowData.partiestype.length === 0">
+              <el-radio-group v-model="form.checkedscore" v-for="(radio,index) in form" :key="index" @change="radioChange(form,radio)" style="width: 100%">
+                <el-radio :label="radio" style="width: 100% !important;margin-bottom: 20px">
+                  {{radio.optionname}}
+                  <span style="margin-left: 10px;font-size: 10px">{{radio.remarks}}</span>
+                </el-radio>
+              </el-radio-group>
+            </el-col>
           </el-form>
         </el-row>
       </div>
-      <div class="drawer__panel" style="margin-bottom: 2px !important;">
+      <div class="drawer__panel" style="margin-bottom: -20px !important;border-top: 1px solid #767272;">
         <el-row>
-          <el-form  size="mini" label-position="right" label-width="75px">
+          <el-form  size="mini" label-position="right" >
             <el-col :span="24">
-              <el-form-item label="评估说明:"  >
-                <el-input v-model="actionnotes" autocomplete="off" placeholder="输入评估内容"></el-input>
+              <el-form-item label="评估说明"  label-width="75px">
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" >
+              <el-form-item style="margin-top: -10px">
+                <el-input v-model="actionnotes" type="textarea" rows="5" autocomplete="off" placeholder="输入评估内容"></el-input>
               </el-form-item>
             </el-col>
           </el-form>
@@ -114,8 +134,14 @@ export default {
         }
       },
       form:[],
-      formData:{},
-      rules:{},
+      formData:{
+        select:0
+      },
+      rules:{
+        select: [
+          { required: true, message: '请输入品牌名称', trigger: 'blur' },
+        ],
+      },
       radioSelect:[]
     }
   },
@@ -139,12 +165,23 @@ export default {
           "option": this.radioSelect
         }
       })
+      this.tool.showMessage(res,()=>{
+        this.drawerEdit = false
+        this.$emit("editSuccess")
+      })
     },
     onShow(){
-      this.drawer = true
-      console.log(this.rowData,"列表工作id")
-      console.log(this.form)
-      this.listData()
+      console.log(this.rowData.partiestype.length)
+      if (this.rowData.partiestype.length !== 0){
+        this.drawer = true
+        console.log(this.rowData,"列表工作id")
+        console.log(this.form)
+        this.listData()
+      }else {
+        this.drawerEdit = true
+        this.taskData()
+      }
+
     },
     /*选择关联客户*/
     async listData(){
@@ -175,12 +212,20 @@ export default {
       this.radioSelect = this.radioSelect.filter(e=>{
         return e.sa_project_partiesid !== item.sa_project_partiesid
       })
-
-      this.radioSelect.push({
-        "sa_projtaskmag_optionsid": radio.sa_projtaskmag_optionsid,
-        "sa_project_partiesid": item.sa_project_partiesid,
-        "score":radio.score
-      })
+      if (this.rowData.partiestype.length === 0){
+        this.radioSelect = []
+        this.radioSelect.push({
+          "sa_projtaskmag_optionsid": radio.sa_projtaskmag_optionsid,
+          "sa_project_partiesid": 0,
+          "score":radio.score
+        })
+      }else {
+        this.radioSelect.push({
+          "sa_projtaskmag_optionsid": radio.sa_projtaskmag_optionsid,
+          "sa_project_partiesid": item.sa_project_partiesid,
+          "score":radio.score
+        })
+      }
       console.log(this.radioSelect,"获取单选结果1")
     },
   },

+ 111 - 0
src/HDrpManagement/projectChange/modules/modules/stageTask/modules/evaluationRecord.vue

@@ -0,0 +1,111 @@
+<template>
+  <div>
+    <el-button type="text" size="mini" @click="onShow">评估记录</el-button>
+    <el-drawer
+        title="评估记录"
+        :visible.sync="drawer"
+        size="25%"
+        direction="rtl"
+        :show-close="false"
+        append-to-body
+        @close="drawer = false"
+        >
+      <div class="drawer__panel">
+        <div  class="container">
+          <div v-if="recordList.length === 0">
+            <el-empty description="暂无记录" :image-size="40"></el-empty>
+          </div>
+          <div>
+            <el-timeline>
+              <el-timeline-item
+                  v-for="i in recordList" :key="i.index"
+              >
+                <div slot="dot" class="dot"></div>
+                <div class="step__panel normal-margin">
+                  <div class="flex-align-center flex-between" style="margin-bottom:10px">
+                    <div  class="flex-align-center">
+                      <img class="inline-16" height="45" width="45" :src="i.head" alt="">
+                      <div>
+                        <p >{{i.data[0].createby}}</p>
+                        <p style="font-size: 12px;color:#999">{{i.data[0].depname}}<span style="margin-left: 10px">{{i.data[0].position}}</span></p>
+                      </div>
+
+                    </div>
+                    <small style="color:#999;">{{i.data[0].createdate}}</small>
+                  </div>
+                  <div style="margin-bottom: 10px">
+                    <p>评估说明:<span style="font-size: 12px">{{i.actionnotes}}</span></p>
+                  </div>
+                  <div style="margin-bottom: 10px" v-for="(item,index) in i.data" :key="index">
+                    <el-tag type="warning" size="mini" v-if="item.type !== ''">{{item.type}}</el-tag>
+                    <span style="margin-left: 10px" v-if="item.type !== ''">{{item.enterprisename}}</span>
+                    <span style="float: right" v-if="item.type !== ''">{{item.optionname}}</span>
+                    <span  v-if="item.type === ''">{{item.optionname}}</span>
+                  </div>
+                </div>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </div>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="drawer = false" class="normal-btn-width">取 消</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import upload from '@/components/upload/hw_obs_upload.vue'
+import previewImage from '@/components/previewImage/index.vue'
+export default {
+  name: "evaluationRecord",
+  props:["data","rowData"],
+  components:{upload,previewImage},
+  data(){
+    return {
+      drawer:false,
+      recordList:[],
+      nowUserid:''
+    }
+  },
+  methods:{
+    onShow(){
+      this.drawer = true
+      this.queryRecords()
+      this.nowUserid = JSON.parse(sessionStorage.getItem('active_account')).userid
+    },
+    async queryRecords(){
+      const res = await this.$api.requested({
+        "id": 20221128144904,
+        "content": {
+          "sa_projectid": this.data.sa_projectid,
+          "sa_projtaskmagid": this.rowData.sa_projtaskmagid,
+          "sa_projstagemagid":this.rowData.sa_projstagemagid,
+          "pageNumber": 1,
+          "pageSize": 90
+        }
+      })
+      this.recordList = res.data
+      console.log(res,'评估记录')
+    }
+  },
+
+  mounted() {
+
+  }
+}
+</script>
+
+<style scoped>
+.step__panel{
+  background-color: #eff4ff;
+  padding: 10px;
+  border-radius: 5px;
+  color:#666
+}
+.dot{
+  background:#fff;height:10px;width:10px;border-radius:100%;border:2px solid #3874F6;
+  margin-left: -2px;
+}
+</style>

+ 3 - 0
src/HDrpManagement/projectTask/detail/index.vue

@@ -21,6 +21,7 @@
       <div slot="customOperation" >
       </div>
       <div slot="slot0" >
+        <evaluationItems></evaluationItems>
       </div>
       <div slot="slot1" >
       </div>
@@ -29,8 +30,10 @@
 </template>
 
 <script>
+import evaluationItems from './modules/evaluationItems'
 export default {
   name: "index",
+  components:{evaluationItems},
   data(){
     return {
       mainData:{},

+ 36 - 0
src/HDrpManagement/projectTask/detail/modules/evaluationItems.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
+      <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>
+</template>
+
+<script>
+export default {
+  name: "evaluationItems",
+  data(){
+    return {
+      tableHieght:"600px",
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).evaluationItems.tablecols
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/HManagement/clueManage/clue_private/modules/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button size="small" type="primary" @click="onShow">新 建</el-button>
-    <el-drawer title="新建线索" :visible.sync="drawer" size="30%" direction="rtl" append-to-body @close="onClose">
+    <el-drawer title="新建线索" :visible.sync="drawer" size="30%" direction="rtl" :show-close="false" append-to-body @close="onClose">
       <div class="drawer__panel">
         <el-form :model="param.content" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm"
           label-position="right">

+ 1 - 1
src/HManagement/clueManage/clue_public/modules/add.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button size="small" type="primary" @click="onShow">新 建</el-button>
-    <el-drawer title="新建线索" :visible.sync="drawer" size="30%" direction="rtl" append-to-body @close="onClose">
+    <el-drawer title="新建线索" :visible.sync="drawer" size="30%" direction="rtl" :show-close="false" append-to-body @close="onClose">
       <div class="drawer__panel">
         <el-form :model="param.content" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm"
           label-position="right">

+ 4 - 1
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-drawer
-        title="创建项目报价单"
+        :title="title"
         :visible.sync="drawer"
         size="93%"
         direction="rtl"
@@ -254,6 +254,7 @@ export default {
   components:{quoted_price_product},
   data(){
     return {
+      title:'',
       projectShow:false,
       customerShow:false,
       contactsShow:false,
@@ -570,8 +571,10 @@ export default {
     this.form.type = this.typeData
     if (this.typeData === '项目报价'){
       this.isQuotedPrice = true
+      this.title = '新建项目报价'
     }else {
       this.isQuotedPrice = false
+      this.title = '新建客户报价'
     }
     const date = new Date()
     console.log(date)

+ 1 - 1
src/components/financialInfo/modules/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button class="normal-margin" type="primary" size="small" @click="drawer = true">新建财务信息</el-button>
+    <el-button class="normal-margin" type="primary" size="small" @click="drawer = true">新 建</el-button>
     <el-drawer
       title="新建"
       :visible.sync="drawer"