qymljy 3 years ago
parent
commit
bd0916876e

+ 10 - 4
src/Form/QuotedPrice/edit.vue

@@ -243,7 +243,7 @@
         <el-divider></el-divider>
       </div>
       <div style="margin:30px 20px 20px 20px">
-        <quoted_price_product :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @totalPrice="queryTotalPrice"></quoted_price_product>
+        <quotedPriceProduct :id="form.sa_projectid" ref="quoterPrice" @checkForm="onSubmit" @totalPrice="queryTotalPrice"></quotedPriceProduct>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
@@ -254,7 +254,7 @@
 </template>
 
 <script>
-import quoted_price_product from "@/SDrpManagement/QuotedPrice/components/quotedPriceProduct";
+import quotedPriceProduct from "@/SDrpManagement/QuotedPrice/components/quotedPriceProduct";
 
 export default {
   name: "edit",
@@ -361,12 +361,13 @@ export default {
       },
     }
   },
-  components:{quoted_price_product},
+  components:{quotedPriceProduct},
   methods:{
     onShow(){
       this.drawer = true
       console.log(this.data,"报价单")
-      this.form = this.data
+      /*this.form = this.data*/
+      this.form = Object.assign({},this.form,this.data)
       this.date[0] = this.form.begdate
       this.date[1] = this.form.enddate
       if (this.form.quotedpricetype === '项目报价'){
@@ -442,6 +443,7 @@ export default {
     },
     async selectProject(){
       console.log(this.form.projectname)
+      this.projectShow = true
       this.projectParam.content.where.condition = this.form.projectname
       this.projectList()
     },
@@ -470,6 +472,7 @@ export default {
       this.contacts.currentPage = res.pageNumber
     },
     selectContacts(){
+      this.contactsShow = true
       this.contactsParam.content.where.condition = this.form.name
       this.contactsList()
     },
@@ -498,6 +501,7 @@ export default {
       this.form.contactsname = val.name
       this.form.contactsphonenumber = val.phonenumber
     },
+    /*项目翻页*/
     handleSizeChangeProject(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val
@@ -508,6 +512,7 @@ export default {
       this.projectParam.content.pageNumber = val
       this.projectList()
     },
+    /*客户翻页*/
     handleSizeChangeCustomer(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val
@@ -518,6 +523,7 @@ export default {
       this.projectParam.content.pageNumber = val
       this.customerList()
     },
+    /*联系人翻页*/
     handleSizeChangeContacts(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val

+ 1 - 1
src/HDrpManagement/ProductMag/detail/modules/detailedData.vue

@@ -37,7 +37,7 @@ export default {
     }
   },
   mounted() {
-    this.systemData(this.data)
+
   },
 }
 </script>

+ 8 - 4
src/HDrpManagement/ProductMag/modules/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div >
-    <el-button  :disabled="form.status==='审核'" size="mini" @click="onShow">编 辑</el-button>
+    <el-button  :disabled="data.status ==='审核'" size="mini" @click="onShow">编 辑</el-button>
     <el-drawer append-to-body title="编辑产品" :visible.sync="dialogFormVisible" size="50%">
       <div class="drawer__panel" >
         <el-row :gutter="10">
@@ -248,10 +248,10 @@ export default {
   methods:{
     onShow () {
       this.dialogFormVisible = true
-      this.queryMain(()=>{
+      /*this.queryMain(()=>{
         this.unitlist()
         this.unitGrouplist()
-      })
+      })*/
     },
     async queryMain(fn) {
       const res = await this.$api.requested({
@@ -337,7 +337,11 @@ export default {
     }
   },
   mounted () {
-
+    console.log(this.data,"接收数据")
+    this.queryMain(()=>{
+      this.unitlist()
+      this.unitGrouplist()
+    })
   }
 }
 

+ 4 - 3
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -11,7 +11,7 @@
           @clear="productData(param.content.pageNumber = 1)"
           clearable>
       </el-input>
-      <product_table style="float: right" :id="id" @checkForm="checkForm" ref="quoterPrice" @productAdd="productInitialization"></product_table>
+      <productTable style="float: right" :id="id" @checkForm="checkForm" ref="quoterPrice" @productAdd="productInitialization"></productTable>
     </div>
     <div class="produtMag-panel">
       <el-table
@@ -182,12 +182,13 @@
 <script>
 import uploadFile from "@/components/upload/hw_obs_upload";
 import previewImage from "@/components/previewImage";
-import product_table from '../components/productTable'
+import productTable from '../components/productTable'
+import importExcel from '../modules/importQuotedPrice'
 
 export default {
   props:["id"],
   name: "quotedPriceProduct",
-  components:{uploadFile, previewImage,product_table},
+  components:{uploadFile, previewImage,productTable,importExcel},
   data(){
     return {
       step:1,

+ 17 - 12
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -29,7 +29,7 @@
                     trigger="click"
                     v-model="projectShow"
                     @show="projectList">
-                  <el-table :data="project.projectData">
+                  <el-table :data="project.projectData" @row-click="projectData">
                     <el-table-column
                         label="项目编号"
                         width="180">
@@ -51,14 +51,14 @@
                         <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
                       </template>
                     </el-table-column>
-                    <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-column>-->
                   </el-table>
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
@@ -70,7 +70,7 @@
                         :total="project.total">
                     </el-pagination>
                   </div>
-                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目" @focus="projectShow = true"  @input="selectProject"></el-input>
+                  <el-input slot="reference"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"   @input="selectProject"></el-input>
                 </el-popover>
 
               </el-form-item>
@@ -88,7 +88,7 @@
                     trigger="click"
                     v-model="customerShow"
                     @show="customerList">
-                  <el-table :data="customer.customerData">
+                  <el-table :data="customer.customerData" @row-click="customerData">
                     <el-table-column
                         label="客户编号"
                         width="180">
@@ -110,14 +110,14 @@
                         <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
                       </template>
                     </el-table-column>
-                    <el-table-column
+<!--                    <el-table-column
                         fixed="right"
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
                         <el-button type="text" @click="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
                       </template>
-                    </el-table-column>
+                    </el-table-column>-->
                   </el-table>
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
@@ -167,7 +167,7 @@
                     trigger="click"
                     v-model="contactsShow"
                     @show="contactsList">
-                  <el-table :data="contacts.contactsData">
+                  <el-table :data="contacts.contactsData" @row-click="contactsData">
                     <el-table-column
                         label="姓名"
                         width="180">
@@ -196,14 +196,14 @@
                         <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
                       </template>
                     </el-table-column>
-                    <el-table-column
+<!--                    <el-table-column
                         fixed="right"
                         label="操作"
                         width="60">
                       <template slot-scope="scope">
                         <el-button type="text" @click="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
                       </template>
-                    </el-table-column>
+                    </el-table-column>-->
                   </el-table>
                   <div class="container normal-panel" style="text-align:right">
                     <el-pagination
@@ -382,6 +382,7 @@ export default {
         this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
       })
     },
+    /*创建报价单,获取商品信息*/
     getSubmit(){
       this.drawer = false
       console.log(this.data)
@@ -404,8 +405,8 @@ export default {
           this.$emit('addSuccess')
         })
       })
-
     },
+
     async projectList(){
       const res = await this.$api.requested(this.projectParam)
       console.log(res)
@@ -445,6 +446,7 @@ export default {
       this.contactsParam.content.where.condition = this.form.name
       this.contactsList()
     },
+    /*项目选择信息*/
     projectData(val){
       this.form.sa_projectid = val.sa_projectid
       this.form.projectname = val.projectname
@@ -456,7 +458,7 @@ export default {
       this.form.phonenumber = ''
       this.projectShow = false
     },
-
+    /*客户选择信息*/
     customerData(val){
       this.form.sys_enterpriseid = val.sys_enterpriseid
       this.form.enterprisename = val.enterprisename
@@ -472,6 +474,7 @@ export default {
       this.form.phonenumber = val.phonenumber
       this.contactsShow = false
     },
+    /*项目分页*/
     handleSizeChangeProject(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val
@@ -482,6 +485,7 @@ export default {
       this.projectParam.content.pageNumber = val
       this.projectList()
     },
+    /*客户分页*/
     handleSizeChangeCustomer(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val
@@ -492,6 +496,7 @@ export default {
       this.projectParam.content.pageNumber = val
       this.customerList()
     },
+    /*联系人分页*/
     handleSizeChangeContacts(val) {
       // console.log(`每页 ${val} 条`);
       this.projectParam.content.pageSize = val

+ 1 - 2
src/SDrpManagement/QuotedPrice/modules/importQuotedPrice.vue

@@ -150,8 +150,7 @@ export default {
       const res = await this.$api.requested({
         "id": "20221024141503",
         "content": {
-          "sa_projectid":"1",
-          "discountrate":"100",
+          "sa_quotedpriceid":"1",
           "attachmentid": id
         }
       })