qymljy 2 anni fa
parent
commit
12ea836710

+ 48 - 5
src/Form/QuotedPrice/edit.vue

@@ -41,7 +41,7 @@
                       @keyup.enter.native="projectList(projectParam.content.pageNumber = 1)">
                     <i slot="prefix" class="el-icon-search" @click="projectList(projectParam.content.pageNumber = 1)"></i>
                   </el-input>
-                  <el-table :data="project.projectData" @row-click="projectData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                  <el-table :data="project.projectData" @row-click="projectOpen" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
                     <el-table-column
                         label="项目编号"
                         width="180">
@@ -273,8 +273,8 @@ export default {
         "id": 20221020143502,
         "content": {
           "pageNumber": 1,
-          "pageSize": 5,
-          "type":0, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
+          "pageSize": 10,
+          "type":1, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
           "where": {
             "condition": "",
             "startdate": "",
@@ -295,7 +295,7 @@ export default {
         "id": 20220920083901,
         "content": {
           "pageNumber": 1,
-          "pageSize": 5,
+          "pageSize": 10,
           "where": {
             "condition": "",
             "type":4,
@@ -310,7 +310,6 @@ export default {
       },
       contactsParam:{
         "id": "20221022165503",
-        "version": 1,
         "content": {
           "sys_enterpriseid":"",
           "where": {
@@ -332,6 +331,7 @@ export default {
       drawer:false,
       isQuotedPrice:false,
       date:[],
+      clearData:[],
       form:{
         quotedpricetype:'',
         totalPrice:0,
@@ -517,6 +517,49 @@ export default {
       this.form.contactsphonenumber = ''
       this.projectShow = false
     },
+    /*更改项目前提示*/
+    projectOpen(val) {
+      this.$confirm('修改项目后将清空产品配置, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.productList()
+        this.projectData(val)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      });
+    },
+    /*获取产品明细*/
+    async productList(){
+      const res = await this.$api.requested({
+        "id": 20221021095503,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid     //sat_notice_classid<=0时 为新增
+        }
+      })
+      console.log(res,"产品明细")
+      this.clearData = []
+      res.data.forEach((item,index)=>{
+        console.log(item)
+        this.clearData[index] = item.sa_quotedprice_itemsid
+      })
+      console.log(this.clearData,"需要删除的产品明细")
+      this.productClear()
+    },
+    /*清空产品明细*/
+    async productClear(){
+      const res = await this.$api.requested({
+        "id": 20221021095603,
+        "content": {
+          "sa_quotedprice_itemsids":this.clearData     //sat_notice_classid<=0时 为新增
+        }
+      })
+      this.$refs.quoterPrice.productData()
+    },
     /*客户选择信息*/
     customerData(val){
       this.form.sys_enterpriseid = val.sys_enterpriseid

+ 49 - 5
src/Form/QuotedPrice/editCopy.vue

@@ -34,7 +34,7 @@
                     @keyup.enter.native="projectList(projectParam.content.pageNumber = 1)">
                   <i slot="prefix" class="el-icon-search" @click="projectList(projectParam.content.pageNumber = 1)"></i>
                 </el-input>
-                <el-table :data="project.projectData">
+                <el-table :data="project.projectData" @row-click="projectOpen" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
                   <el-table-column
                       label="项目编号"
                       width="180">
@@ -96,7 +96,7 @@
                     @keyup.enter.native="customerList(customerParam.content.pageNumber = 1)">
                   <i slot="prefix" class="el-icon-search" @click="customerList(customerParam.content.pageNumber = 1)"></i>
                 </el-input>
-                <el-table :data="customer.customerData">
+                <el-table :data="customer.customerData" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
                   <el-table-column
                       label="客户编号"
                       width="180">
@@ -179,7 +179,7 @@
                     @keyup.enter.native="contactsList(contactsParam.content.pageNumber = 1)">
                   <i slot="prefix" class="el-icon-search" @click="contactsList(contactsParam.content.pageNumber = 1)"></i>
                 </el-input>
-                <el-table :data="contacts.contactsData">
+                <el-table :data="contacts.contactsData" @row-click="contactsData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
                   <el-table-column
                       label="姓名"
                       width="180">
@@ -323,6 +323,7 @@ export default {
       drawer:true,
       isQuotedPrice:false,
       date:[],
+      clearData:[],
       form:{
         quotedpricetype:'',
         totalPrice:0,
@@ -490,16 +491,59 @@ export default {
       this.form.projectnum = val.projectnum
       this.form.sys_enterpriseid = ''
       this.form.enterprisename = ''
-      this.form.contactsid = ''
+      this.form.contactsid = 0
       this.form.contactsname = ''
       this.form.contactsphonenumber = ''
       this.projectShow = false
     },
+    /*更改项目前提示*/
+    projectOpen(val) {
+      this.$confirm('修改项目后将清空产品配置, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.productList()
+        this.projectData(val)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      });
+    },
+    /*获取产品明细*/
+    async productList(){
+      const res = await this.$api.requested({
+        "id": 20221021095503,
+        "content": {
+          "sa_quotedpriceid":this.form.sa_quotedpriceid     //sat_notice_classid<=0时 为新增
+        }
+      })
+      console.log(res,"产品明细")
+      this.clearData = []
+      res.data.forEach((item,index)=>{
+        console.log(item)
+        this.clearData[index] = item.sa_quotedprice_itemsid
+      })
+      console.log(this.clearData,"需要删除的产品明细")
+      this.productClear()
+    },
+    /*清空产品明细*/
+    async productClear(){
+      const res = await this.$api.requested({
+        "id": 20221021095603,
+        "content": {
+          "sa_quotedprice_itemsids":this.clearData     //sat_notice_classid<=0时 为新增
+        }
+      })
+      this.$refs.quoterPrice.productData()
+    },
     /*客户选择信息*/
     customerData(val){
       this.form.sys_enterpriseid = val.sys_enterpriseid
       this.form.enterprisename = val.enterprisename
-      this.form.contactsid = ''
+      this.form.contactsid = 0
       this.form.contactsname = ''
       this.form.contactsphonenumber = ''
       this.customerShow = false

+ 1 - 1
src/HDrpManagement/contractManage/components/addContract.vue

@@ -33,7 +33,7 @@
               <el-form-item label="折扣(%):" prop="discountrate">
                 <el-input type="text" size="small" v-model="form.discountrate"></el-input>
               </el-form-item>
-            </el-col>
+            </el-co暂存
             <el-col :span="24">
               <el-form-item label="合同有效期:" prop="begdate">
                 <el-input style="display:none" v-model="form.begdate"></el-input>

+ 2 - 1
src/SManagement/project_target/modules/detailInfo.vue

@@ -274,6 +274,7 @@ export default {
       this.$confirm('只能填写目标年度的月份!', '提示', {
         confirmButtonText: '确定',
         showCancelButton:false,
+        closeOnClickModal:false,
         type: 'warning'
       }).then(() => {
         this.$message({
@@ -283,7 +284,7 @@ export default {
       }).catch(() => {
         this.$message({
           type: 'info',
-          message: '已取消删除'
+          message: '已取消'
         });
       });
     }