zhangqiOMG 2 年之前
父节点
当前提交
6047b8db1a

+ 0 - 386
src/Form/projectTask/add copy.vue

@@ -1,386 +0,0 @@
-<template>
-  <div>
-    <el-button size="small" type="primary"  @click="onShow">新 建</el-button>
-    <el-drawer
-        title="新建工作任务"
-        :visible.sync="drawer"
-        size="45%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px;padding-bottom: 0px">
-        <el-row>
-          <el-form :model="form" :rules="rules" ref="formData"  size="mini" label-position="right">
-            <el-col :span="20">
-              <el-form-item label="工作任务:" label-width="85px" prop="taskname">
-                <el-input v-model="form.taskname" autocomplete="off" placeholder="输入工作任务"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="4">
-              <el-form-item label="顺序:" label-width="80px">
-                <el-input  v-model="form.sequence" autocomplete="off" placeholder="输入顺序"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="关键任务:" label-width="85px">
-                <el-radio v-model="form.important" label="1">是</el-radio>
-                <el-radio v-model="form.important" label="0">否</el-radio>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item >
-                <el-checkbox v-model="form.onparties">关联客户对象</el-checkbox>
-                <AssociateCustomerObject ref="onparties" :data="form" class="inline-16" style="margin-left: 10px" @selectObject="selectObject"></AssociateCustomerObject>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item >
-                <el-checkbox v-model="form.onstage" style="font-size: 14px">关联项目阶段</el-checkbox>
-                <AssociatedProjectPhases ref="onstage" :data="form" class="inline-16" style="margin-left: 10px" @selectStage="selectStage"></AssociatedProjectPhases>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
-      </div>
-      <div class="drawer__panel">
-        <el-row>
-          <el-form ref="form"  size="mini" label-position="right">
-            <el-col :span="22">
-              <el-form-item label="评估项:" label-width="60px" >
-              </el-form-item>
-            </el-col>
-            <el-col :span="2">
-              <el-form-item  style="float: right;width: 100%;">
-                <el-button size="small" type="primary" plain style="width: 100%" @click="addOptions">添加</el-button>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24" >
-              <el-form-item  style="float: right;width: 100%;text-align: center">
-                <el-table
-                    :data="form.projtaskmag_options"
-                    style="width: 100%">
-                  <el-table-column
-                      prop="optionname"
-                      label="任务内容"
-                      width="360">
-                    <template slot-scope="scope">
-                      <el-input @change="inputChange(scope.$index)" v-model="scope.row.optionname" placeholder=""></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="remarks"
-                      label="描述"
-                      width="0">
-                    <template slot-scope="scope">
-                      <el-input v-model="scope.row.remarks" placeholder=""></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="score"
-                      width="160"
-                      label="独立项分值">
-                    <template slot-scope="scope">
-                      <el-input v-model="scope.row.score" placeholder=""></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="operation"
-                      width="100"
-                      label="操作">
-                    <template slot-scope="scope">
-                      <el-button type="text" size="mini" :disabled="form.projtaskmag_options.length === 1">删除</el-button>
-                    </template>
-                  </el-table-column>
-                </el-table>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
-      </div>
-      <div class="drawer__panel">
-        <el-row>
-          <el-form ref="form"  size="mini" label-position="right">
-            <el-col :span="22">
-              <el-form-item label="关联信息:" label-width="75px" >
-              </el-form-item>
-            </el-col>
-            <el-col :span="24" >
-              <el-form-item  style="float: right;width: 100%;text-align: center">
-                <el-table
-                    :data="associatedData"
-                    border
-                    style="width: 100%">
-                  <el-table-column
-                      v-if="form.onparties"
-                      prop="optionname"
-                      label="客户对象"
-                      >
-                    <template slot-scope="scope">
-                      <span>{{scope.row}}</span>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      v-if="form.onstage"
-                      prop="remarks"
-                      label="项目阶段"
-                     >
-                    <template slot-scope="scope">
-                      <div v-if="form.onparties">
-                        <div v-for="(item,index) in form.stage" :key="index">
-                          <span>{{item}}</span>
-                        </div>
-                      </div>
-                      <div v-else>
-                        <span>{{scope.row}}</span>
-                      </div>
-
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      v-if="form.onparties || form.onstage"
-                      prop="score"
-                      label="分值">
-                    <template slot-scope="scope">
-                      <div v-if="form.onparties">
-                        <div v-for="(item,index) in form.parties" :key="index">
-                          <template slot-scope="scope">
-                            <el-input v-model="scope.row" placeholder=""></el-input>
-                          </template>
-                        </div>
-                      </div>
-                      <div v-else-if="form.onstage">
-                        <div v-for="(item,index) in form.stage" :key="index">
-                          <template slot-scope="scope">
-                            <el-input v-model="scope.row" placeholder=""></el-input>
-                          </template>
-                        </div>
-                      </div>
-
-                    </template>
-                  </el-table-column>
-                </el-table>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
-      </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>
-      </div>
-    </el-drawer>
-  </div>
-</template>
-
-<script>
-import AssociateCustomerObject from '@/HDrpManagement/projectTask/modules/AssociateCustomerObject'
-import AssociatedProjectPhases from '@/HDrpManagement/projectTask/modules/AssociatedProjectStage'
-export default {
-  name: "add",
-  components:{AssociateCustomerObject,AssociatedProjectPhases},
-  data(){
-    return {
-      drawer:false,
-      input:'',
-      associatedData:[],
-      form:{
-        "sa_projtaskmagid": 0,
-        "taskname": "",
-        "sequence": 0,
-        "important": '0',
-        "onparties": false,
-        "onstage": false,
-        "parties": [],
-        "stage": [],
-        "projtaskmag_options": [
-          {
-            "sa_projtaskmag_optionsid": 0,
-            "optionname": "",
-            "remarks": "",
-            "score": 0,
-            "projtaskmag_optionscore": [
-              {
-                "sa_projtaskmag_optionscoreid":0,
-                "partiestype": "",
-                "sa_projstagemagid": "",
-                "score": 0
-              }
-            ]
-          },
-        ]
-      },
-      rules:{
-        taskname: [
-          { required: true, message: '请输入工作任务', trigger: 'blur' }
-        ],
-      }
-    }
-  },
-  methods:{
-    onShow(){
-      this.drawer = true
-    },
-    selectObject(val){
-      this.form.parties = val
-      if (this.form.onparties && this.form.onstage){
-        this.associatedData = this.form.parties
-      }else if(this.form.onparties){
-        this.associatedData = this.form.parties
-      }else if(this.form.onstage){
-        this.associatedData = this.form.stage
-      }
-    },
-    selectStage(val){
-      this.form.stage = val
-      if (this.form.onparties && this.form.onstage){
-        this.associatedData = this.form.parties
-      }else if(this.form.onparties){
-        this.associatedData = this.form.parties
-      }else if(this.form.onstage){
-        this.associatedData = this.form.stage
-      }
-    },
-    inputChange (index) {
-      this.associatedData[index].partiestype
-      
-    },
-    onSubmit(){
-      if (this.form.onstage){
-        this.form.onstage = 1
-      }else {
-        this.form.onstage = 0
-      }
-      if (this.form.onparties){
-        this.form.onparties = 1
-      }else {
-        this.form.onparties = 0
-      }
-      console.log(this.form.projtaskmag_options)
-      this.form.stage
-      /*this.$refs.formData.validate(async(valid)=>{
-        if (!valid) return false
-        const res = await this.$api.requested({
-          "id": "20221128144204",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.drawer = false
-          this.$refs.formData.resetFields()
-          this.form = {
-            "sa_projtaskmagid": 0,
-            "taskname": "",
-            "sequence": 0,
-            "important": '0',
-            "onparties": false,
-            "onstage": false,
-            "parties": [],
-            "stage": [],
-            "projtaskmag_options": [
-              {
-                "sa_projtaskmag_optionsid": 0,
-                "optionname": "",
-                "remarks": "",
-                "score": "",
-                "projtaskmag_optionscore": [
-                  {
-                    "sa_projtaskmag_optionscoreid":0,
-                    "partiestype": "",
-                    "sa_projstagemagid": '',
-                    "score": ''
-                  }
-                ]
-              },
-            ]
-          }
-          this.$emit("onSuccess")
-        })
-      })*/
-    },
-    addOptions(){
-      console.log(this.form.projtaskmag_options)
-      this.form.projtaskmag_options.push({
-        "sa_projtaskmag_optionsid": 0,
-        "optionname": "",
-        "remarks": "",
-        "score": 0,
-        "projtaskmag_optionscore": [
-          {
-            "sa_projtaskmag_optionscoreid":0,
-            "partiestype": "",
-            "sa_projstagemagid": '',
-            "score": ''
-          }
-        ]
-      })
-    },
-    onClose(){
-      this.$refs.formData.resetFields()
-      this.form = {
-        "sa_projtaskmagid": 0,
-        "taskname": "",
-        "sequence": 0,
-        "important": '0',
-        "onparties": false,
-        "onstage": false,
-        "parties": [],
-        "stage": [],
-        "projtaskmag_options": [
-          {
-            "sa_projtaskmag_optionsid": 0,
-            "optionname": "",
-            "remarks": "",
-            "score": "",
-            "projtaskmag_optionscore": [
-              {
-                "sa_projtaskmag_optionscoreid":0,
-                "partiestype": "",
-                "sa_projstagemagid": '',
-                "score": ''
-              }
-            ]
-          },
-        ]
-      }
-    }
-  },
-  mounted() {
-    if (this.form.onparties && this.form.onstage){
-      this.associatedData = this.form.parties
-    }else if(this.form.onparties){
-      this.associatedData = this.form.parties
-    }else if(this.form.onstage){
-      this.associatedData = this.form.stage
-    }
-  },
-  watch:{
-    "form.onparties":function (val){
-      if (!val){
-        this.form.parties = []
-        this.associatedData = this.form.stage
-      }else if (val && this.form.onstage){
-        console.log(this.form)
-        this.associatedData = this.form.parties
-        this.$refs.onparties.drawer = true
-      }else if (val){
-        this.$refs.onparties.drawer = true
-      }
-    },
-    "form.onstage":function (val){
-      if (!val){
-        this.form.stage = []
-        this.associatedData = this.form.parties
-      }else if (val && this.form.onparties){
-        this.associatedData = this.form.parties
-        this.$refs.onstage.drawer = true
-      }else if (val){
-        this.$refs.onstage.drawer = true
-      }
-    }
-  }
-}
-</script>
-
-<style scoped>
-
-</style>

+ 266 - 399
src/Form/projectTask/add.vue

@@ -1,175 +1,124 @@
 <template>
   <div>
-    <el-button size="small" type="primary"  @click="onShow">新 建</el-button>
+    <el-button size="small" type="primary" @click="(drawer = true)">新 建</el-button>
     <el-drawer
-        title="新建工作任务"
-        :visible.sync="drawer"
-        size="45%"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px;padding-bottom: 0px">
-        <el-row>
-          <el-form :model="form" :rules="rules" ref="formData"  size="mini" label-position="right">
+      title="我是标题"
+      :visible.sync="drawer"
+      direction="rtl"
+      append-to-body
+      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-col :span="20">
-              <el-form-item label="工作任务:" label-width="85px" prop="taskname">
-                <el-input v-model="form.taskname" autocomplete="off" placeholder="输入工作任务"></el-input>
+              <el-form-item  style="width:100%" label="工作任务">
+                <el-input style="width:100%" v-model="form.taskname" placeholder="输入工作任务"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="4">
-              <el-form-item label="顺序:" label-width="80px">
-                <el-input  v-model="form.sequence" autocomplete="off" placeholder="输入顺序"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item label="关键任务:" label-width="85px">
-                <el-radio v-model="form.important" label="1">是</el-radio>
-                <el-radio v-model="form.important" label="0">否</el-radio>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item >
-                <el-checkbox v-model="form.onparties" @change="onPartiesChange">关联客户对象</el-checkbox>
-                <AssociateCustomerObject ref="onparties" :data="form" class="inline-16" style="margin-left: 10px" @selectObject="selectObject"></AssociateCustomerObject>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item >
-                <el-checkbox v-model="form.onstage" style="font-size: 14px" @change="onOnstageChange">关联项目阶段</el-checkbox>
-                <AssociatedProjectPhases ref="onstage" :data="form" class="inline-16" style="margin-left: 10px" @selectStage="selectStage"></AssociatedProjectPhases>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
-      </div>
-      <div class="drawer__panel">
-        <el-row>
-          <el-form ref="form"  size="mini" label-position="right">
-            <el-col :span="22">
-              <el-form-item label="评估项:" label-width="60px" >
-              </el-form-item>
-            </el-col>
-            <el-col :span="2">
-              <el-form-item  style="float: right;width: 100%;">
-                <el-button size="small" type="primary" plain style="width: 100%" @click="addOptions">添加</el-button>
+              <el-form-item label="排序">
+                <el-input v-model="form.sequence"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24" >
-              <el-form-item  style="float: right;width: 100%;text-align: center">
-                <el-table
-                    :data="form.projtaskmag_options"
-                    @expand-change="expandChange"
-                    ref="refTable"
-                    style="width: 100%"
-                    @cell-click="cellClick">
-                    <el-table-column v-if="(form.onparties || form.onstage) && showChildTable" type="expand">
-                      <template slot-scope="prop">
-                        <el-table
-                            :data="associatedData"
-                            border
-                            style="width: 100%"
-                            :span-method="oldData.length > 0? arraySpanMethod:noop">
-                          <el-table-column
-                              v-if="form.onparties"
-                              prop="partiestype"
-                              label="客户对象"
-                              >
-                          </el-table-column>
-                          <el-table-column
-                              v-if="form.onstage"
-                              prop="stagename"
-                              label="项目阶段"
-                            >
-                          </el-table-column>
-                          <el-table-column
-                              prop="score"
-                              label="分值">
-                              <template slot-scope="scope">
-                                <el-input v-model="scope.row.score" placeholder=""></el-input>
-                              </template>
-                          </el-table-column>
-                        </el-table>
-                      </template>
-                    </el-table-column>
-                  <el-table-column
-                      prop="optionname"
-                      label="任务内容"
-                      width="360">
-                    <template slot-scope="scope">
-                      <el-input @change="inputChange(scope.$index)" v-model="scope.row.optionname" placeholder=""></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="remarks"
-                      label="描述"
-                      width="0">
-                    <template slot-scope="scope">
-                      <el-input v-model="scope.row.remarks" placeholder=""></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="score"
-                      width="160"
-                      label="独立项分值">
-                    <template slot-scope="scope">
-                      <el-input v-model="scope.row.score" placeholder="" ></el-input>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                      prop="operation"
-                      width="100"
-                      label="操作">
-                    <template slot-scope="scope">
-                      <el-button type="text" size="mini" :disabled="form.projtaskmag_options.length === 1">删除</el-button>
-                    </template>
-                  </el-table-column>
-                </el-table>
+            <el-col :span="24">
+              <el-form-item label="关键任务">
+                <el-radio-group class="inline-16" v-model="form.important">
+                  <el-radio :label="1">是</el-radio>
+                  <el-radio :label="0">否</el-radio>
+                </el-radio-group>
+
+                <div class="inline-16">
+                  <el-checkbox v-model="form.onparties" :true-label="1" :false-label="0" @change="onPartiesChange">关联客户对象</el-checkbox>
+                  <AssociateCustomerObject ref="onparties" :data="form" class="inline-16" style="margin-left: 10px" @selectObject="selectObject"></AssociateCustomerObject>
+                </div>
+                <div class="inline-16">
+                  <el-checkbox v-model="form.onstage" :true-label="1" :false-label="0" style="font-size: 14px" @change="onOnstageChange">关联项目阶段</el-checkbox>
+                  <AssociatedProjectPhases ref="onstage" :data="form" class="inline-16" style="margin-left: 10px" @selectStage="selectStage"></AssociatedProjectPhases>
+                </div>
               </el-form-item>
             </el-col>
+            
           </el-form>
         </el-row>
+        <div class="normal-margin">
+          <div class="normal-margin flex-align-center flex-between">
+            <p class="normal-title">评估项</p>
+            <el-button type="primary" size="small" @click="addOptions">添加任务</el-button>
+          </div>
+          <el-table
+              :data="form.projtaskmag_options"
+              style="width: 100%"
+              @row-click="rowClick"
+              :row-class-name="tableRowClassName"
+              highlight-current-row
+              border>
+            <el-table-column
+              type="index"
+              width="50">
+            </el-table-column>
+            <el-table-column
+                prop="optionname"
+                label="任务内容"
+                width="360">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.optionname" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="remarks"
+                label="描述"
+                width="0">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.remarks" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="score"
+                width="160"
+                label="独立项分值">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.score" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="operation"
+                width="100"
+                label="操作">
+              <template slot-scope="scope">
+                <el-button type="text" size="mini" :disabled="form.projtaskmag_options.length === 1" @click="deleteOption(scope.$index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div>
+          <p class="normal-title normal-margin">关联设置({{activeOptions}})</p>
+          <el-table
+            :data="optionscore"
+            border
+            style="width: 100%">
+            <el-table-column
+                v-if="form.onparties"
+                prop="partiestype"
+                label="客户对象"
+                >
+            </el-table-column>
+            <el-table-column
+                v-if="form.onstage"
+                prop="stagename"
+                label="项目阶段"
+                >
+            </el-table-column>
+            <el-table-column
+                prop="score"
+                label="分值">
+                <template slot-scope="scope">
+                  <el-input v-model="scope.row.score" placeholder="" @change="onScoreChange"></el-input>
+                  <!-- <input type="text" v-model="scope.row.score" @input="onScoreChange"> -->
+                </template>
+            </el-table-column>
+          </el-table>
+        </div>
       </div>
-      <!-- <div class="drawer__panel">
-        <el-row>
-          <el-form ref="form"  size="mini" label-position="right">
-            <el-col :span="22">
-              <el-form-item label="关联信息:" label-width="75px" >
-              </el-form-item>
-            </el-col>
-            <el-col :span="24" >
-              <el-form-item  style="float: right;width: 100%;text-align: center">
-                <el-table
-                    :data="associatedData"
-                    border
-                    style="width: 100%"
-                    :span-method="oldData.length > 0? arraySpanMethod:noop"
-                    @row-click="rowClick">
-                  <el-table-column
-                      v-if="form.onparties"
-                      prop="value"
-                      label="客户对象"
-                      >
-                  </el-table-column>
-                  <el-table-column
-                      v-if="form.onstage"
-                      prop="stagename"
-                      label="项目阶段"
-                     >
-                  </el-table-column>
-                  <el-table-column
-                      prop="score"
-                      label="分值">
-                      <template slot-scope="scope">
-                        <el-input v-model="scope.row.score" placeholder=""></el-input>
-                      </template>
-                  </el-table-column>
-                </el-table>
-              </el-form-item>
-            </el-col>
-          </el-form>
-        </el-row>
-      </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>
@@ -177,222 +126,108 @@
     </el-drawer>
   </div>
 </template>
-
 <script>
-import AssociateCustomerObject from '@/HDrpManagement/projectTask/modules/AssociateCustomerObject.vue'
-import AssociatedProjectPhases from '@/HDrpManagement/projectTask/modules/AssociatedProjectStage.vue'
-export default {
-  name: "add",
-  components:{AssociateCustomerObject,AssociatedProjectPhases},
-  data(){
-    return {
-      drawer:false,
-      input:'',
-      associatedData:[],
-      form:{
-        "sa_projtaskmagid": 0,
-        "taskname": "",
-        "sequence": 0,
-        "important": '0',
-        "onparties": false,
-        "onstage": false,
-        "projtaskmag_options": [
-          {
-            "sa_projtaskmag_optionsid": 0,
-            "optionname": "",
-            "remarks": "",
-            "score": 0,
-            "index":0,
-            "projtaskmag_optionscore": [
-              {
-                "sa_projtaskmag_optionscoreid":0,
-                "partiestype": "",
-                "sa_projstagemagid": "",
-                "score": 0
-              }
-            ]
-          },
-        ]
-      },
-      rules:{
-        taskname: [
-          { required: true, message: '请输入工作任务', trigger: 'blur' }
-        ],
-      },
-      oldData:[],
-      oldstage:[],
-      expands:[],
-      showChildTable:true,
-      nowIndex:0
-    }
-  },
-  methods:{
-    onShow(){
-      this.drawer = true
+  import AssociateCustomerObject from '@/HDrpManagement/projectTask/modules/AssociateCustomerObject.vue'
+  import AssociatedProjectPhases from '@/HDrpManagement/projectTask/modules/AssociatedProjectStage.vue'
+  export default {
+    components:{
+      AssociateCustomerObject,
+      AssociatedProjectPhases
     },
-    selectObject(val){
-      val.length === 0?this.form.onparties = 0:""
-      this.oldData = val
-      if (this.oldstage.length > 0) {
-        this.selectStage(this.oldstage)
-      } else {
-        this.associatedData = this.oldData.sort()
+    data () {
+      return {
+        drawer:false,
+        show:true,
+        form:{
+          "sa_projtaskmagid": 0,
+          "taskname": "",
+          "sequence": 0,
+          "important": 0,
+          "onparties": 0,
+          "onstage": 0,
+          "projtaskmag_options": []
+        },
+        oldData:[],
+        oldStage:[],
+        optionscore:[],
+        optionscoreStr:'',
+        n_index:null,
+        activeOptions:null
       }
-      this.refreChildTable()
     },
-    selectStage(val){
-       val.length === 0?this.form.onstage = 0:""
-      let arr = []
-      this.oldstage = val
-
-      if (this.oldData.length === 0) {
-        this.associatedData = val.map(e=>{
-          return {
-            partiestype:'',
-            stagename:e.stagename,
-            sa_projstagemagid:e.sa_projstagemagid
-          }
-        })
-      } else {
-        if (this.oldstage.length > 0) {
-          this.oldData.forEach(e=>{
-            val.forEach(vl=>{
-              arr.push({
-                partiestype:e.partiestype,
-                stagename:vl.stagename,
-                sa_projstagemagid:vl.sa_projstagemagid
+    methods:{
+      selectObject (val) {
+        this.oldData = val
+        if (val.length === 0) {
+          this.form.onparties = 0
+        } else {
+          if (this.oldStage.length > 0) {
+            let arr = []
+            this.oldData.forEach(e=>{
+              this.oldStage.forEach(vl=>{
+                arr.push({
+                  sa_projtaskmag_optionscoreid:0,
+                  partiestype:e.partiestype,
+                  stagename:vl.stagename,
+                  sa_projstagemagid:vl.sa_projstagemagid,
+                  score:0
+                })
               })
             })
-          })
-          this.associatedData = arr.sort()
-        } else {
-          this.associatedData = this.oldData.sort()
-        }
-      }
-      this.refreChildTable()
-    },
-    inputChange (index) {
-      this.form.projtaskmag_options[index].projtaskmag_optionscore = this.associatedData
-      this.$set(this.form.projtaskmag_options,index,this.form.projtaskmag_options[index])
-      console.log(this.form.projtaskmag_options[index].projtaskmag_optionscore)
-    },
-    onPartiesChange (val) {
-      this.$refs.onparties.drawer = val
-      val?'':this.oldData = []
-      val?'':this.associatedData = []
-      val?'':this.associatedData = this.oldstage.map(e=>{
-        return {
-          partiestype:'',
-          stagename:e.stagename,
-          sa_projstagemagid:e.sa_projstagemagid
+            this.optionscore = arr.sort()
+          } else {
+            this.optionscore = val
+          }
         }
-      })
-      this.refreChildTable()
-    },
-    onOnstageChange (val) {
-      this.$refs.onstage.drawer = val
-      val?'':this.associatedData = this.oldData.map(e=>{
-        return {
-          partiestype:e.partiestype,
-          stagename:'',
-          sa_projstagemagid:e.sa_projstagemagid
+      },
+      selectStage (val) {
+        this.oldStage = val
+        if (val.length === 0) {
+          this.form.onstage = 0
+        } else {
+           if (this.oldData.length > 0) {
+              let arr = []
+              this.oldData.forEach(e=>{
+                this.oldStage.forEach(vl=>{
+                  arr.push({
+                    sa_projtaskmag_optionscoreid:0,
+                    partiestype:e.partiestype,
+                    stagename:vl.stagename,
+                    sa_projstagemagid:vl.sa_projstagemagid,
+                    score:0
+                  })
+                })
+              })
+              this.optionscore = arr.sort()
+            } else {
+              this.optionscore = val
+            }
         }
-      })
-      this.refreChildTable()
-    },
-    onSubmit(){
-      if (this.form.onstage){
-        this.form.onstage = 1
-      }else {
-        this.form.onstage = 0
-      }
-      if (this.form.onparties){
-        this.form.onparties = 1
-      }else {
-        this.form.onparties = 0
-      }
-      console.log(this.form.projtaskmag_options)
-      this.form.stage
-      /*this.$refs.formData.validate(async(valid)=>{
-        if (!valid) return false
-        const res = await this.$api.requested({
-          "id": "20221128144204",
-          "content": this.form
-        })
-        this.tool.showMessage(res,()=>{
-          this.drawer = false
-          this.$refs.formData.resetFields()
-          this.form = {
-            "sa_projtaskmagid": 0,
-            "taskname": "",
-            "sequence": 0,
-            "important": '0',
-            "onparties": false,
-            "onstage": false,
-            "parties": [],
-            "stage": [],
-            "projtaskmag_options": [
-              {
-                "sa_projtaskmag_optionsid": 0,
-                "optionname": "",
-                "remarks": "",
-                "score": "",
-                "projtaskmag_optionscore": [
-                  {
-                    "sa_projtaskmag_optionscoreid":0,
-                    "partiestype": "",
-                    "sa_projstagemagid": '',
-                    "score": ''
-                  }
-                ]
-              },
-            ]
+      },
+      rowClick (row, column, event) {
+        try {
+          this.n_index = row.index
+          this.activeOptions = this.form.projtaskmag_options[this.n_index].optionname
+          this.optionscore.forEach(e=>{
+            e.score = 0
+          })
+          if (typeof this.form.projtaskmag_options[row.index].projtaskmag_optionscore === 'string') {
+            this.optionscore = JSON.parse(this.form.projtaskmag_options[row.index].projtaskmag_optionscore)
           }
-          this.$emit("onSuccess")
+        } catch (error) {
+          
+        }
+        
+      },
+      onScoreChange (row) {
+        if (!this.activeOptions) return this.$message({
+          message:'请先点击要设置的任务行',
+          type:'error'
         })
-      })*/
-    },
-    addOptions(){
-      console.log(this.form.projtaskmag_options)
-      this.form.projtaskmag_options.push({
-        "sa_projtaskmag_optionsid": 0,
-        "optionname": "",
-        "remarks": "",
-        "score": 0,
-        "index":this.form.projtaskmag_options.length,
-        "projtaskmag_optionscore": this.associatedData
-      })
-    },
-    onClose(){
-      this.$refs.formData.resetFields()
-      this.form = {
-        "sa_projtaskmagid": 0,
-        "taskname": "",
-        "sequence": 0,
-        "important": '0',
-        "onparties": false,
-        "onstage": false,
-        "parties": [],
-        "stage": [],
-        "projtaskmag_options": [
-          {
-            "sa_projtaskmag_optionsid": 0,
-            "optionname": "",
-            "remarks": "",
-            "score": "",
-            "projtaskmag_optionscore": [
-              {
-                "sa_projtaskmag_optionscoreid":0,
-                "partiestype": "",
-                "sa_projstagemagid": '',
-                "score": ''
-              }
-            ]
-          },
-        ]
-      }
-    },
-    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+        this.form.projtaskmag_options[this.n_index].projtaskmag_optionscore = JSON.stringify(this.optionscore)
+        console.log(this.form.projtaskmag_options)
+      },
+      arraySpanMethod({ row, column, rowIndex, columnIndex }) {
       // 合并行列产品名字相同合并(计算组长度以内的列,需要进行合并操作的列)
       let mergeLength = 1;//需要进行横纵合并的列
       if (columnIndex < mergeLength) {
@@ -401,12 +236,12 @@ export default {
         let cgname = Object.keys(row)[columnIndex]
         console.log(cgname,'---')
         // let cgname = 'value'
-        if(rowIndex === 0 || row[cgname] !== this.associatedData[rowIndex-1][cgname]){
+        if(rowIndex === 0 || row[cgname] !== this.optionscore[rowIndex-1][cgname]){
           let rowspan = 1;
           //计算需要进行合并操作的行
-          for(let i=0; i<this.associatedData.length-1; i++){
+          for(let i=0; i<this.optionscore.length-1; i++){
             // 只合并连续的
-            if(this.associatedData[i][cgname] === row[cgname] && this.associatedData[i+1][cgname] === row[cgname]){
+            if(this.optionscore[i][cgname] === row[cgname] && this.optionscore[i+1][cgname] === row[cgname]){
               rowspan ++;
             }
           }
@@ -433,40 +268,72 @@ export default {
         }
         return finArray
       }
-    },
-    noop(){},
-    expandChange (row, expandedRows) {
-      var that = this
-
-      that.nowIndex = row.index
-      console.log(that.form.projtaskmag_options[row.index].projtaskmag_optionscore)
-      // that.associatedData = that.form.projtaskmag_options[row.index].projtaskmag_optionscore
+      },
+      refreshTable() {
+        this.show = false
+        setTimeout(() => {
+          this.show = true
+        }, 1000);
+      },
+      onPartiesChange (val) {
+        if (val === 1) {
+          let arr = []
 
-      if (expandedRows.length>1) {
-        that.expands = []
-        if (row) {
-          that.expands.push(row);
+          this.$refs.onparties.drawer = true
+          this.optionscore = arr.sort()
+        } else {
+          this.oldData = []
+          const res = new Map();
+          this.optionscore = this.optionscore.filter((item) => !res.has(item['stagename']) && res.set(item['stagename'], 1));
+          this.form.projtaskmag_options.forEach(e=>{
+            e.projtaskmag_optionscore = this.optionscore
+          })
         }
-        this.$refs.refTable.toggleRowExpansion(expandedRows[0]);
-      } else {
-        that.expands = [];
+      },
+      onOnstageChange (val) {
+        if (val === 1) {
+          this.$refs.onstage.drawer = true
+        } else {
+          this.oldStage = []
+          const res = new Map();
+          this.optionscore = this.optionscore.filter((item) => !res.has(item['partiestype']) && res.set(item['partiestype'], 1));
+          this.form.projtaskmag_options.forEach(e=>{
+            e.projtaskmag_optionscore = this.optionscore
+          })
+        }
+      },
+      tableRowClassName({row,rowIndex}) {
+        row.index = rowIndex
+      },
+      addOptions(){
+        this.form.projtaskmag_options.push({
+          "sa_projtaskmag_optionsid": 0,
+          "optionname": "",
+          "remarks": "",
+          "score": 0,
+          "projtaskmag_optionscore": null
+        })
+      },
+      async onSubmit () {
+        this.form.projtaskmag_options.forEach(e=>{
+          e.projtaskmag_optionscore = JSON.parse(e.projtaskmag_optionscore)
+        })
+        const res = await this.$api.requested({
+          "id": "20221128144204",
+          "content":this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.drawer = false
+        })
+      },
+      deleteOption (index) {
+        this.form.projtaskmag_options = this.form.projtaskmag_options.filter((e,idx)=>{
+          if (index !== idx) return e
+        })
+        this.activeOptions = ''
+        console.log(this.form.projtaskmag_options)
       }
-    },
-    refreChildTable () {
-      this.showChildTable = false
-      setTimeout(() => {
-        this.showChildTable = true
-      }, 100);
-    },
-    cellClick (row, column, cell, event) {
-      console.log(row, column, cell, event)
     }
-  },
-  mounted() {
   }
-}
-</script>
-
-<style scoped>
-
-</style>
+</script>

+ 343 - 8
src/Form/projectTask/edit.vue

@@ -1,15 +1,350 @@
 <template>
   <div>
-    <el-button size="mini" type="primary"  >编 辑</el-button>
+    <el-button size="small" type="primary" @click="onShow(drawer = true)">编 辑</el-button>
+    <el-drawer
+      title="我是标题"
+      :visible.sync="drawer"
+      direction="rtl"
+      append-to-body
+      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-col :span="20">
+              <el-form-item  style="width:100%" label="工作任务">
+                <el-input style="width:100%" v-model="form.taskname" placeholder="输入工作任务"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-form-item label="排序">
+                <el-input v-model="form.sequence"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="关键任务">
+                <el-radio-group class="inline-16" v-model="form.important">
+                  <el-radio :label="1">是</el-radio>
+                  <el-radio :label="0">否</el-radio>
+                </el-radio-group>
+
+                <div class="inline-16">
+                  <el-checkbox disabled v-model="form.onparties" :true-label="1" :false-label="0" @change="onPartiesChange">关联客户对象</el-checkbox>
+                  <AssociateCustomerObject ref="onparties" :data="form" class="inline-16" style="margin-left: 10px" @selectObject="selectObject"></AssociateCustomerObject>
+                </div>
+                <div class="inline-16">
+                  <el-checkbox disabled v-model="form.onstage" :true-label="1" :false-label="0" style="font-size: 14px" @change="onOnstageChange">关联项目阶段</el-checkbox>
+                  <AssociatedProjectPhases ref="onstage" :data="form" class="inline-16" style="margin-left: 10px" @selectStage="selectStage"></AssociatedProjectPhases>
+                </div>
+              </el-form-item>
+            </el-col>
+            
+          </el-form>
+        </el-row>
+        <div class="normal-margin">
+          <div class="normal-margin flex-align-center flex-between">
+            <p class="normal-title">评估项</p>
+            <el-button type="primary" size="small" @click="addOptions">添加任务</el-button>
+          </div>
+          <el-table
+              :data="form.projtaskmag_options"
+              style="width: 100%"
+              @row-click="rowClick"
+              :row-class-name="tableRowClassName"
+              highlight-current-row
+              border>
+            <el-table-column
+              type="index"
+              width="50">
+            </el-table-column>
+            <el-table-column
+                prop="optionname"
+                label="任务内容"
+                width="360">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.optionname" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="remarks"
+                label="描述"
+                width="0">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.remarks" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="score"
+                width="160"
+                label="独立项分值">
+              <template slot-scope="scope">
+                <el-input v-model="scope.row.score" placeholder=""></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="operation"
+                width="100"
+                label="操作">
+              <template slot-scope="scope">
+                <el-button type="text" size="mini" :disabled="form.projtaskmag_options.length === 1" @click="deleteOption(scope.$index)">删除</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div>
+          <p class="normal-title normal-margin">关联设置({{activeOptions}})</p>
+          <el-table
+            :data="optionscore"
+            border
+            style="width: 100%">
+            <el-table-column
+                v-if="form.onparties"
+                prop="partiestype"
+                label="客户对象"
+                >
+            </el-table-column>
+            <el-table-column
+                v-if="form.onstage"
+                prop="stagename"
+                label="项目阶段"
+                >
+            </el-table-column>
+            <el-table-column
+                prop="score"
+                label="分值">
+                <template slot-scope="scope">
+                  <el-input v-model="scope.row.score" placeholder="" @change="onScoreChange"></el-input>
+                  <!-- <input type="text" v-model="scope.row.score" @input="onScoreChange"> -->
+                </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </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>
+      </div>
+    </el-drawer>
   </div>
 </template>
-
 <script>
-export default {
-  name: "edit"
-}
-</script>
+  import AssociateCustomerObject from '@/HDrpManagement/projectTask/modules/AssociateCustomerObject.vue'
+  import AssociatedProjectPhases from '@/HDrpManagement/projectTask/modules/AssociatedProjectStage.vue'
+  export default {
+    components:{
+      AssociateCustomerObject,
+      AssociatedProjectPhases
+    },
+    data () {
+      return {
+        drawer:false,
+        show:true,
+        form:{
+          "sa_projtaskmagid": 0,
+          "taskname": "",
+          "sequence": 0,
+          "important": 0,
+          "onparties": 0,
+          "onstage": 0,
+          "projtaskmag_options": []
+        },
+        oldData:[],
+        oldStage:[],
+        optionscore:[],
+        optionscoreStr:'',
+        n_index:null,
+        activeOptions:null
+      }
+    },
+    methods:{
+      onShow () {
+        this.queryData()
+      },
+      async queryData () {
+        const res = await this.$api.requested({
+          "id": 20221128144104,
+          "content": {
+            "sa_projtaskmagid":this.$route.query.id
+          }
+        })
+        this.form = res.data
+      },
+      selectObject (val) {
+        this.oldData = val
+        if (val.length === 0) {
+          this.form.onparties = 0
+        } else {
+          if (this.oldStage.length > 0) {
+            let arr = []
+            this.oldData.forEach(e=>{
+              this.oldStage.forEach(vl=>{
+                arr.push({
+                  sa_projtaskmag_optionscoreid:0,
+                  partiestype:e.partiestype,
+                  stagename:vl.stagename,
+                  sa_projstagemagid:vl.sa_projstagemagid,
+                  score:0
+                })
+              })
+            })
+            this.optionscore = arr.sort()
+          } else {
+            this.optionscore = val
+          }
+        }
+      },
+      selectStage (val) {
+        this.oldStage = val
+        if (val.length === 0) {
+          this.form.onstage = 0
+        } else {
+           if (this.oldData.length > 0) {
+              let arr = []
+              this.oldData.forEach(e=>{
+                this.oldStage.forEach(vl=>{
+                  arr.push({
+                    sa_projtaskmag_optionscoreid:0,
+                    partiestype:e.partiestype,
+                    stagename:vl.stagename,
+                    sa_projstagemagid:vl.sa_projstagemagid,
+                    score:0
+                  })
+                })
+              })
+              this.optionscore = arr.sort()
+            } else {
+              this.optionscore = val
+            }
+        }
+      },
+      rowClick (row, column, event) {
+        try {
+          this.n_index = row.index
+          this.activeOptions = this.form.projtaskmag_options[this.n_index].optionname
+          this.optionscore = this.form.projtaskmag_options[row.index].projtaskmag_optionscore
+        } catch (error) {
+          
+        }
+        
+      },
+      onScoreChange (row) {
+        if (!this.activeOptions) return this.$message({
+          message:'请先点击要设置的任务行',
+          type:'error'
+        })
+        this.form.projtaskmag_options[this.n_index].projtaskmag_optionscore = this.optionscore
+      },
+      arraySpanMethod({ row, column, rowIndex, columnIndex }) {
+      // 合并行列产品名字相同合并(计算组长度以内的列,需要进行合并操作的列)
+      let mergeLength = 1;//需要进行横纵合并的列
+      if (columnIndex < mergeLength) {
+        let finArray = [1,1];
+        // 处理行数据
+        let cgname = Object.keys(row)[columnIndex]
+        console.log(cgname,'---')
+        // let cgname = 'value'
+        if(rowIndex === 0 || row[cgname] !== this.optionscore[rowIndex-1][cgname]){
+          let rowspan = 1;
+          //计算需要进行合并操作的行
+          for(let i=0; i<this.optionscore.length-1; i++){
+            // 只合并连续的
+            if(this.optionscore[i][cgname] === row[cgname] && this.optionscore[i+1][cgname] === row[cgname]){
+              rowspan ++;
+            }
+          }
+          finArray[0] = rowspan;
+        }else {
+          finArray[0] = 0;
+        }
 
-<style scoped>
+        // 处理列数据
+        let colkeys = Object.keys(row);
+        let cgvalue = Object.values(row)[columnIndex]
+        if(columnIndex ===0 || row[colkeys[columnIndex-1]] !== row[colkeys[columnIndex]]){
+          let colspan = 1;
+          //计算需要进行合并操作的列
+          for(let i=columnIndex; i<mergeLength; i++) {
+            // 只合并连续的
+            if (row[colkeys[i]]===cgvalue && row[colkeys[i+1]]===cgvalue && i+1<mergeLength) {
+              colspan ++;
+            }
+          }
+          finArray[1] = colspan;
+        } else {
+          finArray[1] = 0;
+        }
+        return finArray
+      }
+      },
+      refreshTable() {
+        this.show = false
+        setTimeout(() => {
+          this.show = true
+        }, 1000);
+      },
+      onPartiesChange (val) {
+        if (val === 1) {
+          let arr = []
 
-</style>
+          this.$refs.onparties.drawer = true
+          this.optionscore = arr.sort()
+        } else {
+          this.oldData = []
+          const res = new Map();
+          this.optionscore = this.optionscore.filter((item) => !res.has(item['stagename']) && res.set(item['stagename'], 1));
+          this.form.projtaskmag_options.forEach(e=>{
+            e.projtaskmag_optionscore = this.optionscore
+          })
+        }
+      },
+      onOnstageChange (val) {
+        if (val === 1) {
+          this.$refs.onstage.drawer = true
+        } else {
+          this.oldStage = []
+          const res = new Map();
+          this.optionscore = this.optionscore.filter((item) => !res.has(item['partiestype']) && res.set(item['partiestype'], 1));
+          this.form.projtaskmag_options.forEach(e=>{
+            e.projtaskmag_optionscore = this.optionscore
+          })
+        }
+      },
+      tableRowClassName({row,rowIndex}) {
+        row.index = rowIndex
+      },
+      addOptions(){
+        this.form.projtaskmag_options.push({
+          "sa_projtaskmag_optionsid": 0,
+          "optionname": "",
+          "remarks": "",
+          "score": 0,
+          "projtaskmag_optionscore": {
+            "sa_projtaskmag_optionscoreid":0,
+            "partiestype": "",
+            "sa_projstagemagid": "",
+            "score": 0
+          }
+        })
+      },
+      async onSubmit () {
+        this.form.projtaskmag_options.forEach(e=>{
+          e.projtaskmag_optionscore = JSON.parse(e.projtaskmag_optionscore)
+        })
+        const res = await this.$api.requested({
+          "id": "20221128144204",
+          "content":this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.drawer = false
+        })
+      },
+      deleteOption (index) {
+        this.form.projtaskmag_options = this.form.projtaskmag_options.filter((e,idx)=>{
+          if (index !== idx) return e
+        })
+        this.activeOptions = ''
+        console.log(this.form.projtaskmag_options)
+      }
+    }
+  }
+</script>

+ 14 - 3
src/HDrpManagement/projectChange/modules/modules/quotation/index.vue

@@ -1,7 +1,8 @@
 
 <template>
   <div>
-    <div style="">
+    <div >
+      <add class="inline-16" :data="data" @addSuccess="onSuccess"></add>
       <el-input
           placeholder="请输入搜索内容"
           suffix-icon="el-icon-search"
@@ -17,7 +18,13 @@
     <div style="margin-top: 15px">
       <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" >
         <template v-slot:customcol="scope">
-          <p >{{scope.column.data[scope.column.columnname]}}</p>
+          <div v-if="scope.column.columnname === 'invaliddate'">
+            {{scope.column.data.begdate?scope.column.data.begdate + '至' + scope.column.data.enddate:'--'}}
+          </div>
+          <div v-else-if="scope.column.columnname === 'specialoffer'">
+            <span>{{scope.column.data[scope.column.columnname] === 0?'否':'是'}}</span>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
         </template>
         <template v-slot:opreation="scope">
           <!--          <edit class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="scope.data" @updateSuccess="onSuccess"></edit>
@@ -43,6 +50,7 @@
 
 <script>
 import buillDetail from './modules/buillDetail'
+import add from './modules/add'
 export default {
   props:["data"],
   data () {
@@ -89,7 +97,7 @@ export default {
       productList:() => this.productList
     }
   },
-  components:{buillDetail},
+  components:{buillDetail,add},
   methods:{
     async submit (data) {
       let res = await this.$api.requested({
@@ -153,6 +161,9 @@ export default {
     queryClick(){
       this.params.content.where.condition = this.search
       this.listData()
+    },
+    onSuccess(){
+      this.listData()
     }
   },
   created() {

+ 524 - 81
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -1,115 +1,558 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" @click="dialogFormVisible = true">新 建</el-button>
-    <el-dialog title="新 建" :visible.sync="dialogFormVisible" width="50%">
-      <div slot="title" style="font-size: 15px">
-        新增报价单
+    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-drawer
+        title="创建项目报价单"
+        :visible.sync="dialogFormVisible"
+        size="93%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel" style="margin-bottom: 0px">
+        <el-row style="margin-top: 10px">
+          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
+            <el-col :span="6">
+              <el-form-item label="报价类型:" label-width="90px" >
+                <el-input v-model="form.type" autocomplete="off" placeholder="报价类型" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="是否特价:" label-width="90px" >
+                <el-input  v-model="form.specialOffer" autocomplete="off" placeholder="是否特价" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6" >
+              <el-form-item label="项目名称:" label-width="90px" prop="projectname">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="projectShow"
+                    @show="projectList">
+                  <el-table :data="project.projectData" @row-click="projectData">
+                    <el-table-column
+                        label="项目编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.projectnum?scope.row.projectnum:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="项目名称"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.projectname?scope.row.projectname:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <!--                    <el-table-column
+                                            fixed="right"
+                                            label="操作"
+                                            width="60">
+                                          <template slot-scope="scope">
+                                            <el-button type="text" @click="projectData(scope.row)">选择</el-button>
+                                          </template>
+                                        </el-table-column>-->
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeProject"
+                        @current-change="handleCurrentChangeProject"
+                        :current-page="project.currentPage"
+                        :total="project.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"   @input="selectProject"></el-input>
+                </el-popover>
+
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6" >
+              <el-form-item label="项目编号:" label-width="90px" >
+                <el-input  v-model="form.projectnum" autocomplete="off" placeholder="项目编号" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="customerShow"
+                    @show="customerList">
+                  <el-table :data="customer.customerData" @row-click="customerData">
+                    <el-table-column
+                        label="客户编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="客户名称"
+                        width="200">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCustomer"
+                        @current-change="handleCurrentChangeCustomer"
+                        :current-page="customer.currentPage"
+                        :total="customer.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col   :span="6">
+              <el-form-item label="报价日期:" label-width="90px">
+                <el-date-picker
+                    v-model="form.billdate"
+                    style="width: 100%"
+                    type="date"
+                    value-format="yyyy-MM-dd"
+                    placeholder="选择日期"
+                    :picker-options="pickerOptions">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="有效期:" label-width="90px" >
+                <el-date-picker
+                    v-model="date"
+                    style="width: 100%"
+                    type="daterange"
+                    value-format="yyyy-MM-dd"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    :picker-options="pickerOptions">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col   :span="6">
+              <el-form-item label="联系人:" label-width="90px" prop="name">
+                <el-popover
+                    placement="bottom"
+                    width="580"
+                    trigger="click"
+                    v-model="contactsShow"
+                    @show="contactsList">
+                  <el-table :data="contacts.contactsData" @row-click="contactsData">
+                    <el-table-column
+                        label="姓名"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.name?scope.row.name:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="手机号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.phonenumber?scope.row.phonenumber:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="邮箱"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.email?scope.row.email:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                        width="300">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeContacts"
+                        @current-change="handleCurrentChangeContacts"
+                        :current-page="contacts.currentPage"
+                        :total="contacts.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference"  v-model="form.name" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col  :span="6">
+              <el-form-item label="手机号:" label-width="90px" >
+                <el-input  v-model="form.phonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <!--            <el-col :span="6">
+                          <el-form-item label="总金额:" label-width="90px" >
+                            <el-input  v-model="form.totalPrice" autocomplete="off" placeholder="总金额" disabled></el-input>
+                          </el-form-item>
+                        </el-col>-->
+          </el-form>
+        </el-row>
+      </div>
+      <div >
+        <el-divider></el-divider>
       </div>
-      <el-row :gutter="20">
-        <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
-          <el-col :span="12">
-            <el-form-item label="项目名称" prop="projectname">
-              <el-input v-model="form.projectname" placeholder="请输入项目名称"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="折扣率" prop="discountrate">
-              <el-input v-model="form.discountrate" placeholder="请输入折扣率"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="地址" prop="address">
-              <el-input v-model="form.address" placeholder="请输入地址"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="有效日期" prop="invaliddate">
-              <el-date-picker
-                v-model="form.invaliddate"
-                type="date"
-                placeholder="选择日期"
-                @change="timeChange">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="备注" prop="remarks">
-              <el-input type="textarea" v-model="form.remarks" placeholder="请输入备注"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-form>
-      </el-row>
-      <div class="dialog-footer">
-        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      <div style="margin:30px 20px 20px 20px">
+        <quotedPriceProduct :sa_projectid="form.sa_projectid" :type="form.type" ref="quoterPrice" @checkFormImport="onCheckFormImport" @checkForm="onSubmit" @productData="productDataChange"></quotedPriceProduct>
       </div>
-    </el-dialog>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button :disabled="form.sa_quotedpriceid === 0" size="small" type="primary" @click="getSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
 <script>
+import quotedPriceProduct from '@/SDrpManagement/QuotedPrice/components/quotedPriceProduct'
 export default {
   name: "add",
-  inject:['detailData'],
-  components:{},
+  props:["data"],
+  components:{quotedPriceProduct},
   data(){
     return {
       dialogFormVisible:false,
+      projectShow:false,
+      customerShow:false,
+      contactsShow:false,
+      projectParam:{
+        "id": 20221020143502,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "type":0, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
+          "where": {
+            "condition": "",
+            "startdate": "",
+            "enddate": "",
+            "status":"",//跟进中、已成交、已失败
+            "projecttype":"",
+            "stagename":"",
+            "tag":""
+          }
+        },
+      },
+      project:{
+        projectData:[],
+        total:0,
+        currentPage:0,
+      },
+      customerParam:{
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where": {
+            "condition": "",
+            "type":4,
+            "sa_projectid":""
+          }
+        }
+      },
+      customer:{
+        customerData:[],
+        total:0,
+        currentPage:0,
+      },
+      contactsParam:{
+        "id": "20221022165503",
+        "version": 1,
+        "content": {
+          "sys_enterpriseid":"",
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where": {
+            "condition": "",
+            "workaddress": 0//0表示人,1表示地址
+          }
+        }
+      },
+      contacts:{
+        contactsData:[],
+        total:0,
+        currentPage:0,
+      },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() + 3600 * 1000 * 24 < Date.now() ;
+        },
+      },
+      drawer:false,
+      isQuotedPrice:false,
+      date:[],
+      productObj:{},
       form:{
-        "sa_quotedpriceid":0,     //sat_notice_classid<=0时 为新增
-        "sys_enterpriseid": "",
-        "sa_projectid": "",
-        "discountrate": "",
-        "remarks": "",
-        "invaliddate": "",
-        "projectname": "",
-        "address": ""
+        totalPrice:'',
+        type:'',
+        projectnum:'',
+        enterprisename:'',
+        name:'',
+        phonenumber:'',
+        specialOffer:'否',
+        sa_quotedpriceid:0,     //sat_notice_classid<=0时 为新增
+        sys_enterpriseid: "",
+        contactsid:8,
+        sa_projectid: "0",
+        discountrate: 0,
+        remarks: "",
+        invaliddate: "",
+        projectname: "",
+        address: "",
+        billdate:"",
+        enddate:'',
+        begdate:''
       },
       rules:{
         projectname:[
-          { required: true, message: '输入项目名称', trigger: 'blur'},
-        ],
-        invaliddate:[
-          { required: true, message: '请选择报价有效期', trigger: 'blur'}
+          { required: true, message: '请选择项目', trigger: 'change'},
         ],
-        discountrate:[
-          { required: true, message: '整单折扣率,保留2位小数', trigger: 'blur'}
+        enterprisename:[
+          { required: true, message: '请选择客户', trigger: 'change'},
         ],
-      }
+        name:[
+          { required: true, message: '请选择联系人', trigger: 'change'},
+        ]
+      },
     }
   },
   methods:{
+    onClose(){
+      this.dialogFormVisible = false
+      /*this.$emit('addSuccess')*/
+    },
+    /*创建报价单,获取商品信息*/
     onSubmit(){
-      this.$refs['form'].validate(async (valid) => {
+      console.log(this.date)
+      if (this.date.length === 0){
+        this.form.begdate = ''
+        this.form.enddate = ''
+      }else {
+        this.form.begdate = this.date[0]
+        this.form.enddate = this.date[1]
+      }
+      console.log(this.form,"表单")
+      this.$refs.form.validate(async (valid) => {
         if (!valid) return false
-        this.form.sys_enterpriseid = this.detailData().sys_enterpriseid
-        this.form.sa_projectid = parseInt(this.$route.query.id)
         const res = await this.$api.requested({
-          "id": "20221020164803",
+          "id": 20221020164803,
           "version":1,
           "content": this.form
         })
-        this.tool.showMessage(res,()=>{
-          this.$emit('onSuccess')
-          this.$refs['form'].resetFields();
-          this.dialogFormVisible = false
+        this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)
+        this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
+      })
+    },
+    /*导入创建报价单校验*/
+    onCheckFormImport(){
+      console.log(this.date)
+      if (this.date.length === 0){
+        this.form.begdate = ''
+        this.form.enddate = ''
+      }else {
+        this.form.begdate = this.date[0]
+        this.form.enddate = this.date[1]
+      }
+      console.log(this.form,"表单")
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221020164803,
+          "version":1,
+          "content": this.form
         })
+        this.$refs.quoterPrice.quoterImport(res.data.sa_quotedpriceid,this.form.type)
+        this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
       })
     },
-    timeChange(e) {
-      if(!e) {
-        this.form.invaliddate = ''
-      } 
-      let result = this.changeTimeFormat(e.getTime())
- 
-      this.form.invaliddate = result
-    },
-    changeTimeFormat(time) {
-      var date = new Date(time);
-      var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
-      var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
-      return date.getFullYear() + "-" + month + "-" + currentDate
-    }
+    /*提交*/
+    getSubmit(){
+      this.dialogFormVisible = false
+      console.log(this.data)
+      if (this.date.length === 0){
+        this.form.begdate = ''
+        this.form.enddate = ''
+      }else {
+        this.form.begdate = this.date[0]
+        this.form.enddate = this.date[1]
+      }
+      console.log(this.form,"表单")
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221020164803,
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,() => {
+          this.changeData(this.productObj)
+        })
+      })
+    },
+    /*修改后的产品数据*/
+    productDataChange(val){
+      console.log(val,"修改后的产品数据")
+      let obj = val.map(e=>{
+        return {
+          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
+          itemid:e.itemid,
+          oldprice:e.marketprice,
+          price:e.price,
+          discountrate:(e.discountrate/100).toFixed(4),
+          qty:e.qty
+        }
+      })
+      this.productObj = obj
+    },
+    async changeData(obj){
+      console.log(this.productObj,"数据")
+      const res = await this.$api.requested({
+        "id": 20221021095403,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
+          "items":obj
+        }
+      })
+      console.log(res)
+      this.$emit('addSuccess')
+    },
+    async projectList(){
+      const res = await this.$api.requested(this.projectParam)
+      console.log(res)
+      this.project.projectData = res.data
+      this.project.total = res.total
+      this.project.currentPage = res.pageNumber
+    },
+    async selectProject(){
+      console.log(this.form.projectname)
+      this.projectParam.content.where.condition = this.form.projectname
+      this.projectList()
+    },
+    async customerList(){
+      if (this.form.sa_projectid === '0' && this.form.type === '普通报价'){
+        this.customerParam.content.where.type = 2
+      }else {
+        this.customerParam.content.where.type = 4
+        this.customerParam.content.where.sa_projectid = this.form.sa_projectid
+      }
+      const res = await this.$api.requested(this.customerParam)
+      this.customer.customerData = res.data
+      this.customer.total = res.total
+      this.customer.currentPage = res.pageNumber
+    },
+    selectCustomer(){
+      this.customerParam.content.where.condition = this.form.enterprisename
+      this.customerList()
+    },
+    async contactsList(){
+      this.contactsParam.content.sys_enterpriseid = this.form.sys_enterpriseid
+      const res = await this.$api.requested(this.contactsParam)
+      this.contacts.contactsData = res.data
+      this.contacts.total = res.total
+      this.contacts.currentPage = res.pageNumber
+    },
+    selectContacts(){
+      this.contactsParam.content.where.condition = this.form.name
+      this.contactsList()
+    },
+    /*项目选择信息*/
+    projectData(val){
+      this.form.sa_projectid = val.sa_projectid
+      this.form.projectname = val.projectname
+      this.form.projectnum = val.projectnum
+      this.form.sys_enterpriseid = ''
+      this.form.enterprisename = ''
+      this.form.contactsid = ''
+      this.form.name = ''
+      this.form.phonenumber = ''
+      this.projectShow = false
+    },
+    /*客户选择信息*/
+    customerData(val){
+      this.form.sys_enterpriseid = val.sys_enterpriseid
+      this.form.enterprisename = val.enterprisename
+      this.form.contactsid = ''
+      this.form.name = ''
+      this.form.phonenumber = ''
+      this.customerShow = false
+    },
+    /*联系人选择信息*/
+    contactsData(val){
+      this.form.contactsid = val.contactsid
+      this.form.name = val.name
+      this.form.phonenumber = val.phonenumber
+      this.contactsShow = false
+    },
+    /*项目分页*/
+    handleSizeChangeProject(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.projectList()
+    },
+    handleCurrentChangeProject(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.projectList()
+    },
+    /*客户分页*/
+    handleSizeChangeCustomer(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.customerList()
+    },
+    handleCurrentChangeCustomer(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.customerList()
+    },
+    /*联系人分页*/
+    handleSizeChangeContacts(val) {
+      // console.log(`每页 ${val} 条`);
+      this.projectParam.content.pageSize = val
+      this.contactsList()
+    },
+    handleCurrentChangeContacts(val) {
+      // console.log(`当前页: ${val}`);
+      this.projectParam.content.pageNumber = val
+      this.contactsList()
+    },
+  },
+  mounted() {
+    const date = new Date()
+    console.log(date)
+    this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
+    this.form.sa_projectid = this.data.sa_projectid
+    this.form.projectname = this.data.projectname
+    this.form.projectnum = this.data.projectnum
+    this.form.type = '项目报价'
+    console.log(this.form)
   }
 }
 </script>

+ 10 - 0
src/HDrpManagement/projectTask/index.vue

@@ -17,6 +17,16 @@
         <div v-if="scope.data.column.columnname === 'important'">
           {{scope.data.column.columnname === 1?'是':'否'}}
         </div>
+        <div v-else-if="scope.data.column.columnname === 'partiestype'">
+          <span v-for="item in scope.data.column.data.partiestype" :key="item.index">
+            {{item}},
+          </span>
+        </div>
+        <div v-else-if="scope.data.column.columnname === 'stage'">
+          <span v-for="item in scope.data.column.data.stage" :key="item.index">
+            {{item}},
+          </span>
+        </div>
         <div v-else-if="scope.data.column.columnname === 'projtaskmag_options'" >
           <div v-for="(item,index) in scope.data.column.data.projtaskmag_options" :key="index" >
             <div v-if="index === 0 && scope.data.column.data.projtaskmag_options.length -1  === index" style="height: 40px;line-height: 40px;vertical-align: center;margin-top:-5px;margin-bottom: -5px">

+ 4 - 1
src/HDrpManagement/projectTask/modules/AssociateCustomerObject.vue

@@ -77,7 +77,10 @@ export default {
     checkboxCallBack(val){
       this.selectObject = val.map(e=>{
         return {
-          partiestype:e.value
+          partiestype:e.value,
+          stagename:'',
+          sa_projstagemagid:'',
+          score:0
         }
       })
 

+ 1 - 0
src/HDrpManagement/projectTask/modules/AssociatedProjectStage.vue

@@ -85,6 +85,7 @@ export default {
     },
     onClose(){
       this.drawer = false
+      this.$emit("selectStage",this.selectStage)
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

+ 3 - 2
src/HDrpManagement/publicCustomer/modules/detail/operation/toVoid.vue

@@ -1,11 +1,11 @@
 <template>
   <div>
     <el-button style="width:100%" size="mini"   block @click="onshow">作废</el-button>
-    <el-dialog title="" :visible.sync="dialogForm" width="400px" append-to-body>
+    <el-dialog title="" :visible.sync="dialogForm" width="25%" append-to-body>
       <div>
         <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="top" label-width="90px">
           <el-form-item  label="作废原因:" prop="deletereason">
-            <el-input type="textarea"  v-model="form.deletereason" :rows="4" placeholder="输入作废原因"></el-input>
+            <el-input type="textarea"  v-model="form.deletereason"  placeholder="输入作废原因"></el-input>
           </el-form-item>
         </el-form>
       </div>
@@ -55,6 +55,7 @@ export default {
         this.tool.showMessage(res,()=>{
           this.dialogForm = false
           this.$emit("toVoidSuccess")
+          this.$store.dispatch('changeDetailDrawer',false)
         })
       })
     }

+ 2 - 2
src/HManagement/clueManage/m_activity/index.vue

@@ -29,10 +29,10 @@
       <div class="label_center">
         <p class="search__label">活动状态:</p>
         <el-select v-model="search.status" style="margin-right:10px" size="small" placeholder="请选择活动状态" @change="statusChange" clearable>
-          <el-option label="发布" value="发布">
-          </el-option>
           <el-option label="新建" value="新建">
           </el-option>
+          <el-option label="发布" value="发布">
+          </el-option>
           <el-option label="结束" value="结束">
           </el-option>
         </el-select>

+ 3 - 3
src/SDrpManagement/salerPrivatecustomer/detail/modules/operation/toVoid.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-button style="width:100%" size="mini"  block @click="onshow">作废</el-button>
-    <el-dialog title="" :visible.sync="dialogForm" width="400px" append-to-body>
+    <el-dialog title="" :visible.sync="dialogForm" width="25%" append-to-body>
       <div slot="title" style="font-size: 15px">
         作废
       </div>
@@ -10,7 +10,7 @@
           <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="top" label-width="90px">
             <el-col :span="24">
               <el-form-item  label="作废原因:" prop="deletereason">
-                <el-input type="textarea" v-model="form.deletereason" :rows="4" placeholder="输入作废原因"></el-input>
+                <el-input type="textarea" v-model="form.deletereason"  placeholder="输入作废原因"></el-input>
               </el-form-item>
             </el-col>
           </el-form>
@@ -60,7 +60,7 @@ export default {
         this.tool.showMessage(res,()=>{
           this.dialogForm = false
           this.$emit("toVoidSuccess")
-          this.goBack(-1)
+          this.$store.dispatch('changeDetailDrawer',false)
         })
       })
     }

+ 3 - 3
src/components/normal-basic-layout/details/modules/followUp/addLog.vue

@@ -4,7 +4,7 @@
     <el-dialog title="创建跟进动态" width="600px" append-to-body :visible.sync="dialogFormVisible">
       <el-form :model="form" ref="form" label-position="top" label-width="80px">
         <el-form-item label="跟进动态" prop="content">
-          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.content" placeholder="请输入跟进\动态" autocomplete="off"></el-input>
+          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 18 }" v-model="form.content" placeholder="请输入跟进动态" autocomplete="off"></el-input>
         </el-form-item>
         <el-form-item>
           <upload
@@ -49,7 +49,7 @@ export default {
   
   methods:{
     onSuccess(res) {
-      this.attachmentids = [...this.attachmentids,...res.data.attachmentids]
+      this.attachmentids = res.data.attachmentids
     },
     async submitLog () {
       const res = await this.$api.requested({
@@ -68,10 +68,10 @@ export default {
           "ownerid": res.data.sys_datafollowupid,
           "usetype": 'default',
         }
+        this.dialogFormVisible = false
         this.$refs['form'].resetFields();
           
         this.$refs['upload'].toUpload()
-
         this.$emit('onSuccess')
       })
     },

+ 1 - 0
src/components/normal-basic-layout/details/modules/followUp/editLog.vue

@@ -76,6 +76,7 @@ export default {
       })
       this.tool.showMessage(res,()=>{
         this.form.content = ''
+        this.dialogFormVisible = false
         this.$store.dispatch('bindFileToData',{
           "ownertable": 'sys_datafollowup',
           "ownerid": res.data.sys_datafollowupid,

+ 4 - 6
src/components/normal-basic-layout/index.vue

@@ -32,7 +32,7 @@
         </div>
         <div class="flex-align-stretch" style="min-width:800px">
           <slot name="custom"></slot>
-          <el-input style="width:200px;" placeholder="请输入搜索内容" @input="searchChange" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
+          <el-input style="width:200px;" placeholder="搜索" suffix-icon="el-icon-search" @input="searchChange" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
           </el-input>
         </div>
       </div>
@@ -251,9 +251,7 @@ export default {
 </script>
 <style>
 .layout_search__panel{
-  display: flex;
   align-items: center;
-  /* margin-top:10px; */
 }
 .layout-header-panel .el-input-group__append, .el-input-group__prepend{
   background-color: #fff !important;
@@ -261,9 +259,9 @@ export default {
   border: 1px solid #dcdfe6 !important;
   cursor: pointer;
 }
-/* .layout_search__panel .el-input__suffix{
-  margin-top:-4px
-} */
+.layout-header-panel .el-input--small .el-input__icon{
+  height: 32px !important;
+}
 </style>
 <style scoped>
 

+ 6 - 2
src/components/upload/preview_upload.vue

@@ -11,6 +11,7 @@
         <i style="color:red;" class="el-icon-delete" @click="handleRemove(index)"></i>
       </div>
       <el-upload
+        ref="upload"
         action="#"
         :on-change="onChange"
         :show-file-list="false"
@@ -65,7 +66,6 @@ export default {
       this.beforeUpload(file.raw)
     },
     beforeUpload (file) {
-      console.log(file)
       var that = this
 
       var fileReader = new FileReader();
@@ -91,6 +91,7 @@ export default {
       })
     },
     toUpload () {
+      console.log(this.fileList)
       this.fileList.forEach(file=>{
         let index = file.name.lastIndexOf(".");
         let ext = file.name.substr(index + 1);
@@ -135,9 +136,12 @@ export default {
       const res = await this.$api.requested(param)
       if (res.code ===  1) {
         this.$emit('onSuccess',res)
-        this.fileList = []
+        // this.fileList = []
         this.fileLinkList = []
+        this.$refs.upload.clearFiles()
       }
+      console.log(this.fileList)
+      
     },
   }
 }

+ 0 - 1
src/utils/basic-data.js

@@ -27,7 +27,6 @@ function getEnterpriseList () {
         }
     },
   }).then(res=>{
-    console.log(res.data);
     
     enterpriseList = res.data
   })