Browse Source

项目报价内容调整

qymljy 2 years ago
parent
commit
e431b939d5

+ 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": {

+ 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("返回")

+ 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"

+ 35 - 27
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -10,8 +10,9 @@
         delApiId="20221020165503"
         idname="sa_quotedpriceid"
         ownertable="sa_quotedprice"
+        :statusCheck="[{key:'status',value:'审核'}]"
         :tags="[]"
-        :tabs="['详细信息','项目商机','产品清单','关联客户','联系人']"
+        :tabs="['产品清单','详细信息']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -23,24 +24,12 @@
         <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>
-      <div slot="slot0" class="container normal-panel">
+      <div slot="slot1" class=" normal-panel">
         <detailed :data="mainData"  v-if="flag"></detailed>
       </div>
-      <div slot="slot1" class="container normal-panel">
-        <project_change :data="mainData" v-if="flag"></project_change>
-      </div>
-      <div slot="slot2" class="container normal-panel">
+      <div slot="slot0" class=" normal-panel">
         <productInventory :data="mainData" v-if="flag"></productInventory>
       </div>
-      <div slot="slot3" class="container normal-panel">
-        <customer_assocalated :data="mainData" v-if="flag"></customer_assocalated>
-      </div>
-      <div slot="slot4" class="container normal-panel">
-        <contacts  :data="mainData"  v-if="flag"></contacts>
-      </div>
-<!--      <div slot="slot4" class="container normal-panel">
-        <address_manage  :data="mainData"  v-if="flag"></address_manage>
-      </div>-->
     </basicDetails>
   </div>
 </template>
@@ -60,7 +49,8 @@ export default {
     return {
       mainData:[],
       mainAreaData:[],
-      flag:false
+      flag:false,
+      totalPrice:0
     }
   },
   components:{
@@ -89,8 +79,8 @@ export default {
     changeDataStructure(){
       this.mainAreaData = [
         {
-          label:'单号',
-          value:this.mainData.billno
+          label:'客户名称',
+          value:this.mainData.enterprisename
         },
         {
           label:'项目编号',
@@ -109,30 +99,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>

+ 2 - 3
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.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"
@@ -386,7 +386,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); */

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

@@ -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

@@ -60,10 +60,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} 条`);