zhangqiOMG 2 gadi atpakaļ
vecāks
revīzija
1a8cf2c9ef

+ 18 - 12
src/Form/QuotedPrice/edit.vue

@@ -26,7 +26,8 @@
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="projectShow"
                     @show="projectList">
                   <el-table :data="project.projectData">
                     <el-table-column
@@ -55,7 +56,7 @@
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
-                        <el-button type="text" @click="projectData(scope.row)">选择</el-button>
+                        <el-button type="text" @click="projectData(scope.row)" @focus="projectShow = true">选择</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -79,11 +80,12 @@
               </el-form-item>
             </el-col>
             <el-col :span="11">
-              <el-form-item label="客户:" label-width="90px" prop="enterprisename">
+              <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="customerShow"
                     @show="customerList">
                   <el-table :data="customer.customerData">
                     <el-table-column
@@ -94,19 +96,19 @@
                       </template>
                     </el-table-column>
                     <el-table-column
-                        label="客户"
-                        width="180">
+                        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
+<!--                    <el-table-column
                         label="省市县"
                         width="230">
                       <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'--' }}</span>
+                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'&#45;&#45;' }}</span>
                       </template>
-                    </el-table-column>
+                    </el-table-column>-->
                     <el-table-column
                         label="地址"
                         width="300">
@@ -119,7 +121,7 @@
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
-                        <el-button type="text" @click="customerData(scope.row)">选择</el-button>
+                        <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -168,7 +170,8 @@
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="contactsShow"
                     @show="contactsList">
                   <el-table :data="contacts.contactsData">
                     <el-table-column
@@ -204,7 +207,7 @@
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
-                        <el-button type="text" @click="contactsData(scope.row)">选择</el-button>
+                        <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -252,6 +255,9 @@ export default {
   props:['data','btnType'],
   data(){
     return {
+      projectShow:false,
+      customerShow:false,
+      contactsShow:false,
       projectParam:{
         "id": 20221020143502,
         "content": {

+ 185 - 0
src/Form/projectStageMag/add.vue

@@ -0,0 +1,185 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" icon="el-icon-plus" @click="onShow">新 建</el-button>
+    <el-drawer
+        title="创建项目阶段"
+        :visible.sync="drawer"
+        size="35%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row>
+          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right" label-width="100px">
+            <el-col :span="24">
+              <el-form-item label="阶段名称:"  prop="stagename">
+                <el-input v-model="form.stagename" autocomplete="off" placeholder="输入阶段名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="顺序"  >
+                <el-input  v-model="form.sequence" autocomplete="off" placeholder="输入阶段顺序"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="说明:" prop="remarks">
+                <el-input v-model="form.remarks" autocomplete="off" placeholder="输入阶段说明"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="17">
+              <el-form-item label="请选择适用项目类型:" label-width="160px" prop="remarks">
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item >
+                <el-checkbox v-model="checked" @change="checkedChange">适用所有项目类型</el-checkbox>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <layoutTable ref="projectType" :layout="tablecols" :data="list"  :custom="true" :checkbox="true" @checkboxCallBack="checkboxCallBack">
+                <template v-slot:customcol="scope">
+                  <p>{{scope.column.data[scope.column.columnname]}}</p>
+                </template>
+              </layoutTable>
+            </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 layoutTable from '@/components/table/index2'
+export default {
+  name: "add",
+  components:{
+    layoutTable
+  },
+  data(){
+    return {
+      drawer:false,
+      checked:true,
+      tablecols:[],
+      list:[],
+      selectType:[],
+      total:0,
+      form:{
+        "sa_projstagemagid":0,
+        "stagename": "",
+        "remarks": "",
+        "allprojecttype":0,
+        "sequence":'',
+        "projecttype":["水务","燃气"]
+      },
+      rules:{
+        stagename: [
+          { required: true, message: '阶段名称不能为空', trigger: 'blur' },
+        ],
+        remarks: [
+          { required: true, message: '说明不能为空', trigger: 'blur' },
+        ],
+      },
+      param:{
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "projecttype",
+          "parameter": {
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    onShow(){
+      this.drawer = true
+      this.typeData()
+    },
+    /*获取项目类型*/
+    async typeData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res,"项目类型")
+      this.list = res.data
+      this.total = res.total
+      this.$nextTick(()=>{
+        for (let i=0;i<this.list.length;i++){
+          this.$refs.projectType.$refs.tables.toggleRowSelection(this.list[i],true)
+        }
+      })
+    },
+    onSubmit(){
+      this.form.projecttype = this.selectType
+      if (this.checked){
+        this.form.allprojecttype = 1
+      }else {
+        this.form.allprojecttype = 0
+      }
+      console.log(this.form)
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": "20221128143504",
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.drawer = false
+          this.$refs.form.resetFields()
+          this.form = {
+            "sa_projstagemagid":0,
+            "stagename": "",
+            "remarks": "",
+            "allprojecttype":0,
+            "sequence":'',
+            "projecttype":''
+          }
+          this.selectType = []
+          this.$emit('onSuccess')
+        })
+      })
+    },
+    onClose(){
+
+    },
+    checkboxCallBack(val){
+      this.selectType = []
+      val.forEach((item,index)=>{
+        this.selectType[index] = item.value
+      })
+      this.$nextTick(()=>{
+        if (this.selectType.length < this.total){
+          this.checked = false
+        }else {
+          this.checked = true
+        }
+      })
+
+    },
+    checkedChange(){
+      if (this.checked){
+        for (let i=0;i<this.list.length;i++){
+          this.$refs.projectType.$refs.tables.toggleRowSelection(this.list[i],true)
+        }
+      }else{
+        for (let i=0;i<this.list.length;i++){
+          this.$refs.projectType.$refs.tables.toggleRowSelection(this.list[i],false)
+        }
+      }
+    }
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).projectTypeTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 155 - 0
src/Form/projectStageMag/edit.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <el-button type="text" size="mini" @click="onShow">编 辑</el-button>
+    <el-drawer
+        title="修改项目阶段"
+        :visible.sync="drawer"
+        size="35%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row>
+          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right" label-width="100px">
+            <el-col :span="24">
+              <el-form-item label="阶段名称:"  prop="stagename">
+                <el-input v-model="form.stagename" autocomplete="off" placeholder="输入阶段名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="顺序"  >
+                <el-input  v-model="form.sequence" autocomplete="off" placeholder="输入阶段顺序"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="说明:" prop="remarks">
+                <el-input v-model="form.remarks" autocomplete="off" placeholder="输入阶段说明"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="17">
+              <el-form-item label="请选择适用项目类型:" label-width="160px" prop="remarks">
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item >
+                <el-checkbox v-model="checked" @change="checkedChange">适用所有项目类型</el-checkbox>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <layoutTable ref="projectType" :layout="tablecols" :data="list"  :custom="true" :checkbox="true" @checkboxCallBack="checkboxCallBack">
+                <template v-slot:customcol="scope">
+                  <p>{{scope.column.data[scope.column.columnname]}}</p>
+                </template>
+              </layoutTable>
+            </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="warning" @click="onSubmit" class="normal-btn-width">保 存</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import layoutTable from '@/components/table/index2'
+export default {
+  props:["data"],
+  name: "edit",
+  components:{layoutTable},
+  data(){
+    return {
+      drawer:false,
+      checked:true,
+      tablecols:[],
+      list:[],
+      selectType:[],
+      total:0,
+      form:{},
+      rules:{
+        stagename: [
+          { required: true, message: '阶段名称不能为空', trigger: 'blur' },
+        ],
+        remarks: [
+          { required: true, message: '说明不能为空', trigger: 'blur' },
+        ],
+      },
+      param:{
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "projecttype",
+          "parameter": {
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    onShow(){
+      console.log(this.data,'获取数据')
+      this.drawer = true
+      this.form = this.data.data
+      this.typeData()
+    },
+    /*获取项目类型*/
+    async typeData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res,"项目类型")
+      this.list = res.data
+      this.total = res.total
+      this.$nextTick(()=>{
+        if (this.form.allprojecttype === 0){
+          this.checked = false
+          let arr = [...this.list].filter(x => [...this.form.projecttype].some(y => y === x.value));
+          this.$refs['projectType'].setDefaultData(arr)
+        }else {
+          this.checked = true
+          this.checkedChange()
+        }
+      })
+    },
+    onSubmit(){},
+    onClose(){},
+    checkboxCallBack(val){
+      this.selectType = []
+      val.forEach((item,index)=>{
+        this.selectType[index] = item.value
+      })
+      this.$nextTick(()=>{
+        if (this.selectType.length < this.total){
+          this.checked = false
+        }else {
+          this.checked = true
+        }
+      })
+
+    },
+    checkedChange(){
+      if (this.checked){
+        for (let i=0;i<this.list.length;i++){
+          this.$refs.projectType.$refs.tables.toggleRowSelection(this.list[i],true)
+        }
+      }else{
+        for (let i=0;i<this.list.length;i++){
+          this.$refs.projectType.$refs.tables.toggleRowSelection(this.list[i],false)
+        }
+      }
+    }
+  },
+  mounted() {
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).projectTypeTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 64 - 14
src/HDrpManagement/projectChange/components/putPeople.vue

@@ -1,7 +1,13 @@
 <template>
   <div>
-    <el-button size="mini" @click="btn" style="width:100%">报 备</el-button>
-    <el-dialog title="选择报备人" append-to-body :visible.sync="dialogFormVisible" width="25%">
+    <el-popconfirm
+        title="确定进行报备操作吗?"
+        @confirm="onSubmit"
+    >
+      <el-button size="mini" slot="reference">{{ flag === 0?'报 备':'报备审核' }}</el-button>
+    </el-popconfirm>
+<!--    <el-button size="mini" @click="btn" style="width:100%">报 备</el-button>-->
+<!--    <el-dialog title="选择报备人" append-to-body :visible.sync="dialogFormVisible" width="25%">
       <el-row :gutter="20">
         <el-form :model="form" :rules="rules" ref="form" label-width="120px" label-position="right" size="mini">
           <el-col :span="20">
@@ -22,7 +28,7 @@
         <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>
-    </el-dialog>
+    </el-dialog>-->
   </div>
 </template>
 
@@ -32,24 +38,34 @@ export default {
   props:['data','rowData'],
   data(){
     return {
-      dialogFormVisible:false,
+      butTag:'',
       form:{
-        reportby:'',
-        sa_projectid:''
+        sa_projectid: '',
+        tag: "" //报备中,已报备
       },
-      rules:{
-        reportby:[
-          { required: true, message: '请选择负责人', trigger: 'blur'},
-        ],
-      }
+      flag:0, //0:未报备,1:报备中 2:报备审核
     }
   },
   methods:{
-    btn () {
+    /*btn () {
       this.dialogFormVisible = true
+    },*/
+    onshow(){
+      console.log(this.rowData)
+      /*this.tagData()*/
     },
-    onSubmit(){
-      this.$refs['form'].validate(async (valid) => {
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20221114163402,
+        "content": {
+          "sa_projectid": this.rowData.sa_projectid,
+          "tag": this.flag === 0?'报备中':'已报备' //报备中,已报备
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('putSuccess')
+      })
+      /*this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         this.form.sa_projectid = this.rowData.sa_projectid
         const res = await this.$api.requested({
@@ -62,9 +78,43 @@ export default {
           this.$refs['form'].resetFields();
           this.dialogFormVisible = false
         })
+      })*/
+    },
+    async tagData(){
+      console.log(this.rowData.sa_projectid,"rowData数据")
+      const res = await this.$api.requested({
+        content: {
+          ownertable: "sa_project",
+          ownerid: this.rowData.sa_projectid
+        },
+        id: 20220929085401
       })
+      console.log(res,'标签')
+      if (res.data.systemtag.length === 0){
+        console.log("还未有报备")
+        this.flag = 0
+      }else {
+        for (let i=0;i<res.data.systemtag.length;i++){
+          if (res.data.systemtag[i] === '报备中'){
+            this.flag = 1
+            break
+          }else if (res.data.systemtag[i] === '已报备'){
+            this.flag = 2
+            break
+          }else {
+            this.flag = 0
+          }
+        }
+      }
+      console.log(this.flag,'报备状态')
     }
+  },
+  mounted() {
+    this.tagData()
+  },
+  created() {
   }
+
 }
 </script>
 

+ 31 - 3
src/HDrpManagement/projectChange/modules/detail.vue

@@ -18,9 +18,8 @@
       <!-- 此区域提供了自定义操作按钮 -->
       <div style="margin-right: 10px" class="inline-16">
         <putPeople
-            @onSuccess="queryMainData"
-            v-if="!mainData.reportby &&  tool.checkAuth($route.name,'put')"
-            :data="putPeople"
+            @putSuccess="queryMainData"
+            v-if="tool.checkAuth($route.name,'put') && flag === 1 && flagTag !==2"
             :rowData="mainData"
             style="width:100%;"
         />
@@ -106,6 +105,7 @@ export default {
   components:{Quotation,product_set,Rival,BaseInfo,StageTask,putPeople,Check,Locked,andEnterprise,Del},
   data () {
     return {
+      flagTag:0,
       flag:0,
       mainData:'',
       mainAreaData:'',
@@ -158,6 +158,34 @@ export default {
       this.$router.replace({path:'/projectChangeDetail',query:{id:id,rowindex:rowindex}})
       this.queryMainData(id)
     },
+    /*获取标签数据*/
+    async tagData(){
+      const res = await this.$api.requested({
+        content: {
+          ownertable: "sa_project",
+          ownerid: this.$route.query.id
+        },
+        id: 20220929085401
+      })
+      console.log(res,'标签')
+      if (res.data.systemtag.length === 0){
+        console.log("还未有报备")
+        this.flagTag = 0
+      }else {
+        for (let i=0;i<res.data.systemtag.length;i++){
+          if (res.data.systemtag[i] === '报备中'){
+            this.flagTag = 1
+            break
+          }else if (res.data.systemtag[i] === '已报备'){
+            this.flagTag = 2
+            break
+          }else {
+            this.flagTag = 0
+          }
+        }
+      }
+      console.log(this.flagTag,'报备标签状态')
+    },
     /*获取货品选择信息*/
     selectionChange(val){
       console.log("返回")

+ 6 - 6
src/HDrpManagement/projectStage/index.vue

@@ -2,14 +2,14 @@
   <div>
     <basicLayout 
       ref="basicLayout" 
-      formPath="projectManage" 
-      tableName="projectPanelTable" 
-      idName="sa_projstagetempid" 
-      :apiId="{query:20221019085604,del:20221019085804}" 
+      formPath="projectManage"
+      tableName="projectStageTable"
+      idName="sa_projstagemagid"
+      :apiId="{query:20221128143604,del:20221128143704}"
       :options="options"
       >
       <div slot="custom">
-        <label  class="search__label" style="margin: auto;width: 70px;">项目类型:</label>
+<!--        <label  class="search__label" style="margin: auto;width: 70px;">项目类型:</label>
         <el-select class="inline-24" v-model="selectParam.projecttype" placeholder="请选择项目类型" @change="selectChange" size="small" clearable>
           <el-option
               v-for="item in projectType"
@@ -39,7 +39,7 @@
             start-placeholder="开始日期"
             end-placeholder="结束日期"
             clearable>
-        </el-date-picker>
+        </el-date-picker>-->
       </div>
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname === 'isorder'">

+ 125 - 0
src/HDrpManagement/projectStageMag/index.vue

@@ -0,0 +1,125 @@
+<template>
+  <div>
+    <basicLayout 
+      ref="basicLayout" 
+      formPath="projectStageMag"
+      tableName="projectStageTable"
+      idName="sa_projstagemagid"
+      :apiId="{query:20221128143604,del:20221128143704}"
+      :options="options"
+      >
+      <div slot="custom">
+<!--        <label  class="search__label" style="margin: auto;width: 70px;">项目类型:</label>
+        <el-select class="inline-24" v-model="selectParam.projecttype" placeholder="请选择项目类型" @change="selectChange" size="small" clearable>
+          <el-option
+              v-for="item in projectType"
+              :key="item.value"
+              :label="item.value"
+              :value="item.value">
+          </el-option>
+        </el-select>
+        <label  class="search__label" style="margin: auto;width: 70px;">是否启用:</label>
+        <el-select class="inline-24" v-model="selectParam.isused" placeholder="请选择项目类型" @change="selectChange" size="small" clearable>
+          <el-option
+              v-for="item in isUsedList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value">
+          </el-option>
+        </el-select>
+        <label class="search__label" style="margin: auto;width: 65px;">创建时间:</label>
+        <el-date-picker
+            style="margin-right: 24px !important;"
+            size="small"
+            @change="selectChange"
+            value-format="yyyy-MM-dd"
+            v-model="dateSelect"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            clearable>
+        </el-date-picker>-->
+      </div>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname === 'projecttype'">
+          <span v-for="(item,index) in scope.data.column.data.projecttype">
+            <span v-if="index === scope.data.column.data.projecttype.length -1">
+              {{item}}
+            </span>
+            <span v-else>
+              {{item}}、
+            </span>
+          </span>
+        </div>
+        <div v-else>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <edit v-if="tool.checkAuth($route.name,'update')" :data="scope.data"></edit>
+<!--        <delete-btn v-if="tool.checkAuth($route.name,'delete')" :id="scope.data.data.sa_projstagetempid" @deleteSuccess="$refs.basicLayout.listData()" nameId="20221019085804" nameKey="sa_projstagetempids"/>-->
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import edit from '@/Form/projectStageMag/edit'
+export default {
+  name: "index",
+  components:{edit},
+  projectType:() => this.projectType,
+  data() {
+    return {
+      options:[],
+      projectType:'',
+      isUsedList:[
+        {
+          value:'1',
+          label:'是'
+        },
+        {
+          value:'0',
+          label:'否'
+        }
+      ],
+      dateSelect:'',
+      selectParam: {
+        projecttype:'',
+        isused:'',
+        begindate:'',
+        enddate:'',
+      },
+    }
+  },
+  created() {
+    this.getSysetms()
+  },
+  methods:{
+    async getSysetms () {
+      /* 获取项目类型 */
+      let res = await this.$store.dispatch('optiontypeselect','projecttype')
+      this.projectType = res.data
+    },
+    onSuccess(){
+      this.$refs.basicLayout.listData()
+    },
+    selectChange(){
+      if (this.dateSelect !== '' && this.dateSelect !== null){
+        this.selectParam.begindate = this.dateSelect[0]
+        this.selectParam.enddate = this.dateSelect[1]
+      }else {
+        this.selectParam.begindate = ''
+        this.selectParam.enddate = ''
+      }
+      this.$refs.basicLayout.param.content.where = this.selectParam
+      this.$refs.basicLayout.listData()
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -18,8 +18,8 @@
           ref="multipleTable"
           :data="list"
           style="width: 100%"
-          :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
-          :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
           @selection-change="selectionChange">
         <el-table-column
             type="selection"

+ 6 - 2
src/SDrpManagement/QuotedPrice/detail/components/examineTo.vue

@@ -82,8 +82,12 @@ export default {
       /*this.$refs.form.validate(async (valid) => {
         if (!valid) return false*/
         const res = await this.$api.requested({
-          "sa_quotedpriceid":this.sa_quotedpriceid,
-          "backreason":this.form.backreason
+          "id":20221125162803,
+          "version":1,
+          "content":{
+            "sa_quotedpriceid":this.sa_quotedpriceid,
+            "backreason":this.form.backreason
+          }
         })
         this.tool.showMessage(res,()=>{
           console.log(res)

+ 42 - 13
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -10,8 +10,9 @@
         delApiId="20221020165503"
         idname="sa_quotedpriceid"
         ownertable="sa_quotedprice"
+        :statusCheck="[{key:'status',value:'审核'},{key:'status',value:'提交'}]"
         :tags="[]"
-        :tabs="['详细信息','项目商机','产品清单','关联客户','联系人']"
+        :tabs="['产品清单','详细信息']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -23,6 +24,7 @@
         <submit_to class="inline-16" v-if="tool.checkAuth($route.name,'submit') && mainData.status === '新建'" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onSubmit="onSuccess"></submit_to>
         <examine_to class="inline-16" v-if="tool.checkAuth($route.name,'toExamine') && mainData.status === '提交'" :sa_quotedpriceid="mainData.sa_quotedpriceid" @onExamine="onSuccess"></examine_to>
       </div>
+<<<<<<< HEAD
       <div slot="slot0" class=" normal-panel">
         <detailed :data="mainData"  v-if="flag"></detailed>
       </div>
@@ -41,6 +43,14 @@
 <!--      <div slot="slot4" class="container normal-panel">
         <address_manage  :data="mainData"  v-if="flag"></address_manage>
       </div>-->
+=======
+      <div slot="slot1" class=" normal-panel">
+        <detailed :data="mainData"  v-if="flag"></detailed>
+      </div>
+      <div slot="slot0" class=" normal-panel">
+        <productInventory :data="mainData" v-if="flag"></productInventory>
+      </div>
+>>>>>>> 382a5f32771cdce513d280fc4fbff13e907ede5a
     </basicDetails>
   </div>
 </template>
@@ -60,7 +70,8 @@ export default {
     return {
       mainData:[],
       mainAreaData:[],
-      flag:false
+      flag:false,
+      totalPrice:0
     }
   },
   components:{
@@ -89,8 +100,8 @@ export default {
     changeDataStructure(){
       this.mainAreaData = [
         {
-          label:'单号',
-          value:this.mainData.billno
+          label:'客户名称',
+          value:this.mainData.enterprisename
         },
         {
           label:'项目编号',
@@ -109,30 +120,48 @@ export default {
           value:this.mainData.begdate?this.mainData.begdate + '至' + this.mainData.enddate:"--"
         },
         {
-          label:'负责人',
-          value:this.mainData.name
+          label:'总金额',
+          value:this.totalPrice + '元'
         },
         {
-          label:'负责人部门',
-          value:this.mainData.depname
+          label:'联系人',
+          value:this.mainData.contactsname
         },
         {
-          label:'备注',
-          value:this.mainData.remarks
+          label:'手机号',
+          value:this.mainData.contactsphonenumber
         },
         {
-          label:'状态',
-          value:this.mainData.status
+          label:'邮箱',
+          value:this.mainData.email
         }
       ]
     },
+    /*产品配置信息*/
+    async productList(){
+      const res = await this.$api.requested({
+        "id": 20221021095503,
+        "version":1,
+        "content": {
+          "sa_quotedpriceid":this.$route.query.id     //sat_notice_classid<=0时 为新增
+        }
+      })
+      console.log(res,"计算产品明细合计信息")
+      res.data.forEach((item)=> {
+        console.log(item,"类别数据")
+        this.totalPrice = this.totalPrice + item.price * item.qty
+      })
+      console.log(this.totalPrice,'商品总价')
+      this.queryMainData(this.$route.query.id)
+    },
     onSuccess(){
       this.queryMainData(this.$route.query.id)
     }
   },
   mounted() {
     console.log(this.$route.query.id)
-    this.queryMainData(this.$route.query.id)
+
+    this.productList()
   }
 }
 </script>

+ 3 - 0
src/SDrpManagement/QuotedPrice/detail/modules/detailed/index.vue

@@ -7,6 +7,9 @@
         <el-descriptions-item label="项目编号">{{ basic.projectnum?basic.projectnum:"--" }}</el-descriptions-item>
         <el-descriptions-item label="项目名称">{{ basic.projectname?basic.projectname:"--"}}</el-descriptions-item>
         <el-descriptions-item label="项目地址">{{ basic.address?basic.address:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="客户">{{ basic.enterprisename?basic.enterprisename:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="联系人">{{ basic.contactsname?basic.contactsname:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="手机号">{{ basic.contactsphonenumber?basic.contactsphonenumber:"--" }}</el-descriptions-item>
         <el-descriptions-item label="有效期">{{ basic.begdate?basic.begdate + '至' + basic.enddate:"--" }}</el-descriptions-item>
         <el-descriptions-item label="负责人">{{ basic.contactsname?basic.contactsname:"--" }}</el-descriptions-item>
         <el-descriptions-item label="备注">{{ basic.remarks?basic.remarks:"--" }}</el-descriptions-item>

+ 32 - 20
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue

@@ -11,16 +11,17 @@
           @clear="productData(param.content.pageNumber = 1)"
           clearable>
       </el-input>&nbsp;
-      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization"></product_table>
+      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization" ></product_table>
     </div>
     <div class="produtMag-panel">
       <el-table
           ref="multipleTable"
           :data="list"
           style="width: 100%"
-          :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
-          :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
-          @selection-change="selectionChange">
+          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
+          @selection-change="selectionChange"
+         >
         <el-table-column
             type="selection"
             width="55">
@@ -111,7 +112,7 @@
             label="数量"
             width="180">
           <template slot-scope="scope">
-            <el-input-number  v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
+            <el-input-number  v-model="scope.row.qty" size="mini" :min="1"  label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"  :disabled="data.status !== '新建'"></el-input-number>
           </template>
         </el-table-column>
         <el-table-column
@@ -127,7 +128,7 @@
             label="折扣(%)"
             width="100">
           <template slot-scope="scope">
-            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"  :disabled="data.status !== '新建'"></el-input>
           </template>
         </el-table-column>
         <el-table-column
@@ -135,7 +136,7 @@
             label="单价"
             width="100">
           <template slot-scope="scope">
-            <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
+            <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"  :disabled="data.status !== '新建'"></el-input>
           </template>
         </el-table-column>
         <el-table-column
@@ -163,17 +164,22 @@
           </template>
         </el-table-column>
       </el-table>
-      <div style="margin-top:16px;text-align:right">
-        <el-pagination
-            background
-            small
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-size="param.content.pageSize"
-            layout="total, prev, pager, next, jumper"
-            :total="total">
-        </el-pagination>
+      <div style="height: 35px;margin-top: 20px">
+        <div style="float: left">总金额:{{ totalPrice }}元</div>
+        <div style="float: right">
+          <el-pagination
+              background
+              small
+              style="text-align: right;"
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-size="param.content.pageSize"
+              layout="total, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+
       </div>
     </div>
   </div>
@@ -195,6 +201,7 @@ export default {
       total:0,
       currentPage:0,
       changeList:[],
+      totalPrice:0,
       param:{
         "id": 20221021095503,
         "version":1,
@@ -217,9 +224,11 @@ export default {
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
+      this.totalPrice = 0
       for (var i=0 ;i<this.list.length;i++){
 
         this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
 
       }
       console.log(this.list,'产品配置信息')
@@ -230,8 +239,10 @@ export default {
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
+      this.totalPrice = 0
       for (var i=0 ;i<this.list.length;i++){
         this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
       }
       console.log(this.list,'产品配置信息')
     },
@@ -241,8 +252,10 @@ export default {
       const res = await this.$api.requested(this.param)
       this.list = res.data
       this.total = res.total
+      this.totalPrice = 0
       for (var i=0 ;i<this.list.length;i++){
         this.list[i].discountrate = this.list[i].discountrate * 100
+        this.totalPrice = this.totalPrice + this.list[i].qty * this.list[i].price
       }
       console.log(this.list,'产品配置信息')
     },
@@ -345,7 +358,7 @@ export default {
         }
       })
       console.log(res)
-      this.productData(res.data[0].sa_quotedpriceid)
+      this.productData()
     },
     async changeDiscountrateData(obj){
       console.log(this.list,"数据")
@@ -386,7 +399,6 @@ export default {
   margin-top: 35px;
   background: #fff;
   border-radius:5px;
-
   border:1px solid rgb(0 0 0 / 5%)
   /* box-shadow: 0 5px 5px rgb(0 0 0 / 10%);
   transform: translate3d(0,-2px,0); */

+ 5 - 4
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/productTable.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small"  type="primary" icon="el-icon-plus" @click="onShow">添加商品</el-button>
+    <el-button size="small"  type="primary" icon="el-icon-plus" @click="onShow" :disabled="data.status !== '新建'">添加商品</el-button>
     <el-drawer
         title="选择商品"
         :visible.sync="dialogProductVisible"
@@ -20,8 +20,8 @@
               ref="multipleTable"
               :data="list"
               style="width: 100%"
-              :header-cell-style="{height:'50px',color:'#768093',fontWeight:'100'}"
-              :cell-style="{height:'50px',color:'#768093',fontWeight:'200'}"
+              :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+              :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
               @selection-change="selectionChange">
             <el-table-column
                 type="selection"
@@ -49,6 +49,7 @@
             </el-table-column>
             <el-table-column
                 label="型号/规格"
+                width="180"
                 >
               <template slot-scope="scope">
                 <p><span>{{scope.row.model}}</span>&nbsp;/&nbsp;<span>{{scope.row.spec}}</span></p>
@@ -83,7 +84,7 @@
             <el-table-column
                 prop="itemclass"
                 label="类别"
-                width="180">
+                width="0">
               <template slot-scope="scope">
                 <p v-for="(item,index) in scope.row.itemclass">
                   <span style="float: left" v-if="index === scope.row.itemclass.length -1">{{item?item.itemclassname+'':'--'}}</span>

+ 1 - 4
src/SDrpManagement/QuotedPrice/index.vue

@@ -63,10 +63,7 @@
        </div>
       </template>
       <template v-slot:tbList="scope">
-        <div v-if="scope.data.column.columnname === 'projectname'">
-          {{scope.data.column.data.projectname?scope.data.column.data.projectnum + '/' + scope.data.column.data.projectname:'--'}}
-        </div>
-        <div v-else-if="scope.data.column.columnname === 'specialoffer'">
+        <div v-if="scope.data.column.columnname === 'specialoffer'">
           <div v-if="scope.data.column.data.specialoffer === 0">
           </div>

+ 22 - 18
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -25,7 +25,8 @@
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="projectShow"
                     @show="projectList">
                   <el-table :data="project.projectData">
                     <el-table-column
@@ -68,7 +69,7 @@
                         :total="project.total">
                     </el-pagination>
                   </div>
-                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  @input="selectProject"></el-input>
+                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目" @focus="projectShow = true"  @input="selectProject"></el-input>
                 </el-popover>
 
               </el-form-item>
@@ -79,11 +80,12 @@
               </el-form-item>
             </el-col>
             <el-col :span="11">
-              <el-form-item label="客户:" label-width="90px" prop="enterprisename">
+              <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="customerShow"
                     @show="customerList">
                   <el-table :data="customer.customerData">
                     <el-table-column
@@ -94,19 +96,12 @@
                       </template>
                     </el-table-column>
                     <el-table-column
-                        label="客户"
-                        width="180">
+                        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="230">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.province?scope.row.province + '-' + scope.row.city + '-' + scope.row.county:'--' }}</span>
-                      </template>
-                    </el-table-column>
                     <el-table-column
                         label="地址"
                         width="300">
@@ -119,7 +114,7 @@
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
-                        <el-button type="text" @click="customerData(scope.row)">选择</el-button>
+                        <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -168,7 +163,8 @@
                 <el-popover
                     placement="bottom"
                     width="580"
-                    trigger="hover"
+                    trigger="click"
+                    v-model="contactsShow"
                     @show="contactsList">
                   <el-table :data="contacts.contactsData">
                     <el-table-column
@@ -204,7 +200,7 @@
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
-                        <el-button type="text" @click="contactsData(scope.row)">选择</el-button>
+                        <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
                       </template>
                     </el-table-column>
                   </el-table>
@@ -252,11 +248,14 @@ export default {
   components:{quoted_price_product},
   data(){
     return {
+      projectShow:false,
+      customerShow:false,
+      contactsShow:false,
       projectParam:{
         "id": 20221020143502,
         "content": {
           "pageNumber": 1,
-          "pageSize": 5,
+          "pageSize": 10,
           "type":0, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
           "where": {
             "condition": "",
@@ -278,7 +277,7 @@ export default {
         "id": 20220920083901,
         "content": {
           "pageNumber": 1,
-          "pageSize": 5,
+          "pageSize": 10,
           "where": {
             "condition": "",
             "type":4,
@@ -296,6 +295,8 @@ export default {
         "version": 1,
         "content": {
           "sys_enterpriseid":"",
+          "pageNumber": 1,
+          "pageSize": 10,
           "where": {
             "condition": "",
             "workaddress": 0//0表示人,1表示地址
@@ -446,6 +447,7 @@ export default {
       this.form.contactsid = ''
       this.form.name = ''
       this.form.phonenumber = ''
+      this.projectShow = false
     },
 
     customerData(val){
@@ -454,12 +456,14 @@ export default {
       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} 条`);

+ 6 - 1
src/components/table/index2.vue

@@ -51,7 +51,12 @@ export default {
     },
     isCheck(row,rowIndex) {
 
-    }
+    },
+    setDefaultData (rows) {
+      rows.forEach(row => {
+        this.$refs.tables.toggleRowSelection(row);
+      });
+    },
   },
   mounted () {
     // this.listData()

+ 1 - 13
src/router/HDrpManagement.js

@@ -238,19 +238,7 @@ const HDrpManagement = [
       ast_nav: true,
       keeproute: true,
     },
-    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/projectStage/index'),
-    children: [
-      {
-        path: '/projectStageDetail',
-        name:'projectstage',
-        meta: {
-          title: '项目阶段管理详情',
-          ast_nav: true,
-          keeproute: true,
-        },
-        component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/projectStage/detail/index'),
-      }
-    ]
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/projectStageMag/index'),
   },{
     path: '/competitor',
     name: 'competitor',