qymljy преди 2 години
родител
ревизия
4537a874f3

+ 1 - 1
src/Form/QuotedPrice/edit.vue

@@ -228,7 +228,7 @@
                         :total="contacts.total">
                     </el-pagination>
                   </div>
-                  <el-input slot="reference" disabled readonly="true" v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
+                  <el-input slot="reference" disabled :readonly="true" v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
                 </el-popover>
               </el-form-item>
             </el-col>

+ 50 - 48
src/Form/QuotedPrice/editCopy.vue

@@ -20,10 +20,20 @@
             <el-form-item label="项目名称:" label-width="90px" prop="projectname">
               <el-popover
                   placement="bottom"
-                  width="580"
+                  width="700"
                   trigger="click"
                   v-model="projectShow"
                   @show="projectList">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="projectParam.content.where.condition"
+                    clearable
+                    @clear="projectList(projectParam.content.pageNumber = 1)"
+                    size="mini"
+                    @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-column
                       label="项目编号"
@@ -41,19 +51,11 @@
                   </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)" @focus="projectShow = true">选择</el-button>
-                    </template>
-                  </el-table-column>
                 </el-table>
                 <div class="container normal-panel" style="text-align:right">
                   <el-pagination
@@ -61,11 +63,13 @@
                       small
                       @size-change="handleSizeChangeProject"
                       @current-change="handleCurrentChangeProject"
+                      :page-sizes="[10,20,50,100,]"
+                      layout="total,sizes, prev, pager, next, jumper"
                       :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-input slot="reference" disabled :readonly="true" v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  @input="selectProject"></el-input>
               </el-popover>
             </el-form-item>
           </el-col>
@@ -78,10 +82,20 @@
             <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
               <el-popover
                   placement="bottom"
-                  width="580"
+                  width="700"
                   trigger="click"
                   v-model="customerShow"
                   @show="customerList">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="customerParam.content.where.condition"
+                    clearable
+                    @clear="customerList(customerParam.content.pageNumber = 1)"
+                    size="mini"
+                    @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-column
                       label="客户编号"
@@ -97,28 +111,13 @@
                       <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:'&#45;&#45;' }}</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="customerData(scope.row)" @focus="customerShow = true">选择</el-button>
-                    </template>
-                  </el-table-column>
                 </el-table>
                 <div class="container normal-panel" style="text-align:right">
                   <el-pagination
@@ -126,11 +125,13 @@
                       small
                       @size-change="handleSizeChangeCustomer"
                       @current-change="handleCurrentChangeCustomer"
+                      :page-sizes="[10,20,50,100,]"
+                      layout="total,sizes, prev, pager, next, jumper"
                       :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-input slot="reference" disabled :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
               </el-popover>
             </el-form-item>
           </el-col>
@@ -164,10 +165,20 @@
             <el-form-item label="联系人:" label-width="90px" prop="contactsname">
               <el-popover
                   placement="bottom"
-                  width="580"
+                  width="700"
                   trigger="click"
                   v-model="contactsShow"
                   @show="contactsList">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="contactsParam.content.where.condition"
+                    clearable
+                    @clear="contactsList(contactsParam.content.pageNumber = 1)"
+                    size="mini"
+                    @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-column
                       label="姓名"
@@ -192,19 +203,11 @@
                   </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="contactsData(scope.row)" @focus="contactsShow = true">选择</el-button>
-                    </template>
-                  </el-table-column>
                 </el-table>
                 <div class="container normal-panel" style="text-align:right">
                   <el-pagination
@@ -212,11 +215,13 @@
                       small
                       @size-change="handleSizeChangeContacts"
                       @current-change="handleCurrentChangeContacts"
+                      :page-sizes="[10,20,50,100,]"
+                      layout="total,sizes, prev, pager, next, jumper"
                       :current-page="contacts.currentPage"
                       :total="contacts.total">
                   </el-pagination>
                 </div>
-                <el-input slot="reference"  v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
+                <el-input slot="reference" disabled :readonly="true" v-model="form.contactsname" autocomplete="off" placeholder="请选择联系人"  @input="selectContacts"></el-input>
               </el-popover>
             </el-form-item>
           </el-col>
@@ -225,11 +230,6 @@
               <el-input  v-model="form.contactsphonenumber" 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>
@@ -362,8 +362,9 @@ export default {
     onShow(){
       console.log('弹窗')
       this.drawer = true
+      this.data = this.$route.query.data
       /*this.form = this.data*/
-      this.form = Object.assign({},this.form,this.data)
+      this.form = Object.assign({},this.form,this.$route.query.data)
       this.date[0] = this.form.begdate
       this.date[1] = this.form.enddate
       if (this.form.quotedpricetype === '项目报价'){
@@ -371,6 +372,7 @@ export default {
       }else {
         this.isQuotedPrice = false
       }
+      console.log(this.form,"传过来的表单数据")
       /*this.$nextTick(()=>{
         this.$refs.quoterPrice.productData(this.data.sa_quotedpriceid)
       })*/
@@ -560,10 +562,10 @@ export default {
     },
   },
   mounted() {
-    this.onShow()
+
   },
   created() {
-
+    this.onShow()
     this.data = this.$route.query.data
     /*this.drawer = true*/
     console.log(this.data,"获取项目报价")

+ 1 - 1
src/SDrpManagement/QuotedPrice/components/edit/quotedPriceProduct.vue

@@ -243,7 +243,7 @@ export default {
   methods:{
     /*产品配置信息*/
     async productData(){
-      console.log(this.id,"配置信息")
+      console.log(this.sa_quotedpriceid,this.sa_projectid,this.quotedpricetype,"配置信息")
       this.param.content.sa_quotedpriceid = this.sa_quotedpriceid
       console.log(this.param,"param数据")
       const res = await this.$api.requested(this.param)

+ 1 - 1
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -169,7 +169,7 @@ export default {
     onShow(){
      /* this.dialogProjectVisible = true*/
       console.log(this.id,"项目编号")
-      this.$emit('checkFormProject')
+      this.$emit('checkFormProject','project')
       /*this.productData()*/
 
     },

+ 15 - 8
src/SDrpManagement/QuotedPrice/components/quotedPriceProduct.vue

@@ -13,8 +13,8 @@
       </el-input>
 
       <importExcel style="float: right" @onSuccess="onSuccess" v-if="type === '客户报价'" ref="quoterImport" @checkForm="checkFormImport"></importExcel>
-      <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkFormProject="checkFormProject" ref="quoterPriceProject" @productAdd="productData"></productTableProject>
-      <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productData"></productTable>
+      <productTableProject style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkFormProject="checkFormProject" ref="quoterPriceProject" @productAdd="productAddF"></productTableProject>
+      <productTable style="float: right;margin-right: 10px;margin-bottom: 10px" :id="sa_projectid" @checkForm="checkForm" ref="quoterPrice" @productAdd="productAddS"></productTable>
       <delProduct style="float: right;margin-right: 10px" :data="selectDel" @delSuccess="delSuccess"></delProduct>
     </div>
     <div class="produtMag-panel" >
@@ -241,6 +241,12 @@ export default {
       this.$emit("queryTotalPrice",totalPrice)
       console.log(this.list,totalPrice,'产品配置信息')
     },*/
+    productAddF(){
+      this.productData()
+    },
+    productAddS(){
+      this.productData()
+    },
     /*产品配置信息*/
     async productData(){
       console.log(this.id,"配置信息")
@@ -306,8 +312,9 @@ export default {
     checkForm(){
       this.$emit('checkForm')
     },
-    checkFormProject(){
-      this.$emit('checkFormProject')
+    checkFormProject(type){
+      console.log(type+'type')
+      this.$emit('checkFormProject',type)
     },
     checkFormImport(){
       this.$emit('checkFormImport')
@@ -316,12 +323,12 @@ export default {
       this.sa_quotedpriceid = sa_quotedpriceid
       this.$refs.quoterImport.onImport(sa_quotedpriceid)
     },
-    quoterPrice(sa_quotedpriceid,type){
+    quoterPrice(sa_quotedpriceid,type,btntype){
       this.sa_quotedpriceid = sa_quotedpriceid
       console.log(sa_quotedpriceid,"报价单id")
-      console.log(type,"项目报价")
-      this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
-      this.$refs.quoterPriceProject.queryProduct(sa_quotedpriceid,type)
+      console.log(btntype,"项目报价")
+      btntype === 'project'?this.$refs.quoterPriceProject.queryProduct(sa_quotedpriceid,type):this.$refs.quoterPrice.queryProduct(sa_quotedpriceid,type)
+
     },
     onChangeNum (val,data,index,step) {
       data.amount = val * data.price

+ 2 - 2
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -372,7 +372,7 @@ export default {
       this.$emit('addSuccess')
     },
     /*创建报价单,获取商品信息*/
-    onSubmit(){
+    onSubmit(type){
       console.log(this.form,"表单123444")
       console.log(this.date)
       if (this.date.length === 0){
@@ -394,7 +394,7 @@ export default {
         })
         console.log(res,"报价单创建数据")
         setTimeout(()=>{
-          this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type)
+          this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type,type)
           this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
         },500)
       })