Browse Source

报价单、企业客户

qymljy 2 years ago
parent
commit
e865e7a1d3

+ 15 - 8
src/Form/QuotedPrice/edit.vue

@@ -389,7 +389,10 @@ export default {
         begdate:'',
         date:[],
         itemtype:[],
-        quotedpricenotes:[]
+        quotedpricenotes: [
+          "1、报价为含税13%税率, 含运费 ",
+          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
+        ]
       },
       rules:{
         projectname:[
@@ -401,6 +404,9 @@ export default {
         itemtype:[
           { required: true, message: '请选择产品系列', trigger: 'change'},
         ],
+        date:[
+          { required: true, message: '请选择有效期', trigger: 'change'},
+        ],
        /* name:[
           { required: true, message: '请选择联系人', trigger: 'change'},
         ]*/
@@ -437,9 +443,10 @@ export default {
       this.$emit('onSuccess')
     },
     onSubmit(){
-     if (this.data.length !== 0){
-       this.form.begdate = this.date[0]
-       this.form.enddate = this.date[1]
+     if (this.form.data.length !== 0){
+       this.form.begdate = this.form.date[0]
+       this.form.enddate = this.form.date[1]
+       this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
      }else {
        this.form.begdate = ''
        this.form.enddate = ''
@@ -448,18 +455,18 @@ export default {
         if (!valid) return false
         const res = await this.$api.requested({
           "id": 20221020164803,
-          "version":1,
           "content": this.form
         })
       })
     },
     getSubmit(){
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false

+ 77 - 36
src/Form/QuotedPrice/editCopy.vue

@@ -6,18 +6,18 @@
     <div class="drawer__panel" style="margin-bottom: 0px">
       <el-row style="margin-top: 10px">
         <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
-          <el-col :span="6">
-            <el-form-item label="报价类型:" label-width="90px" >
+          <el-col :span="8">
+            <el-form-item label="报价类型:" label-width="100px" >
               <el-input v-model="form.quotedpricetype" autocomplete="off" placeholder="报价类型" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col  :span="6">
-            <el-form-item label="是否特价:" label-width="90px" >
+          <el-col  :span="8">
+            <el-form-item label="是否特价:" label-width="100px" >
               <el-input  v-model="form.specialoffer === 0?'否':'是'" autocomplete="off" placeholder="是否特价" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col  :span="6" v-if="isQuotedPrice">
-            <el-form-item label="项目名称:" label-width="90px" prop="projectname">
+          <el-col  :span="8" v-if="isQuotedPrice">
+            <el-form-item label="项目名称:" label-width="100px" prop="projectname">
               <el-popover
                   placement="bottom"
                   width="700"
@@ -73,13 +73,13 @@
               </el-popover>
             </el-form-item>
           </el-col>
-          <el-col :span="6" v-if="isQuotedPrice">
-            <el-form-item label="项目编号:" label-width="90px" >
+          <el-col :span="8" v-if="isQuotedPrice">
+            <el-form-item label="项目编号:" label-width="100px" >
               <el-input  v-model="form.projectnum" autocomplete="off" placeholder="项目编号" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="6">
-            <el-form-item label="客户名称:" label-width="90px" prop="enterprisename">
+          <el-col :span="8">
+            <el-form-item label="客户名称:" label-width="100px" prop="enterprisename">
               <el-popover
                   placement="bottom"
                   width="700"
@@ -135,18 +135,13 @@
               </el-popover>
             </el-form-item>
           </el-col>
-          <el-col  :span="6">
+          <el-col  :span="8">
             <el-form-item label="电话:" label-width="100px" >
               <el-input  v-model="form.telephone" autocomplete="off" placeholder="输入电话" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col  :span="6">
-            <el-form-item label="传真:" label-width="100px" >
-              <el-input  v-model="form.fax" autocomplete="off" placeholder="输入传真" disabled></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="6">
-            <el-form-item label="联系人:" label-width="90px" prop="contactsname">
+          <el-col :span="8">
+            <el-form-item label="联系人:" label-width="100px" prop="contactsname">
               <el-popover
                   placement="bottom"
                   width="700"
@@ -209,12 +204,12 @@
               </el-popover>
             </el-form-item>
           </el-col>
-          <el-col  :span="6">
-            <el-form-item label="手机号:" label-width="90px" >
+          <el-col  :span="8">
+            <el-form-item label="联系人手机号:" label-width="100px" >
               <el-input  v-model="form.contactsphonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
             </el-form-item>
           </el-col>
-          <el-col  :span="6">
+          <el-col  :span="8">
             <el-form-item label="报价日期:" label-width="90px">
               <el-date-picker
                   v-model="form.billdate"
@@ -226,10 +221,10 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-          <el-col :span="6">
-            <el-form-item label="有效期:" label-width="90px" >
+          <el-col :span="8">
+            <el-form-item label="有效期:" label-width="100px" prop="date">
               <el-date-picker
-                  v-model="date"
+                  v-model="form.data"
                   style="width: 100%"
                   type="daterange"
                   value-format="yyyy-MM-dd"
@@ -240,7 +235,33 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-
+          <el-col  :span="8" >
+            <el-form-item label="产品系列:" label-width="100px" prop="itemtype">
+              <el-select
+                  ref="sle"
+                  style="width:100%;"
+                  v-model="form.itemtype"
+                  multiple
+                  placeholder="请选择产品系列"
+                  size="mini"
+              >
+                <el-option
+                    v-for="item in itemtype"
+                    :key="item.index"
+                    :label="item.value"
+                    :value="item.value"
+                >
+                  <span style="float: left">{{ item.value }}</span>
+                  <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col  :span="8">
+            <el-form-item label="备注:" label-width="100px" prop="remarks">
+              <el-input  v-model="form.remarks" autocomplete="off" placeholder="请输入备注信息" type="textarea" autosize></el-input>
+            </el-form-item>
+          </el-col>
         </el-form>
       </el-row>
     </div>
@@ -357,7 +378,13 @@ export default {
         address: "",
         billdate:"",
         enddate:'',
-        begdate:''
+        begdate:'',
+        date:[],
+        itemtype:[],
+        quotedpricenotes: [
+          "1、报价为含税13%税率, 含运费 ",
+          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
+        ]
       },
       rules:{
         projectname:[
@@ -366,10 +393,17 @@ export default {
         enterprisename:[
           { required: true, message: '请选择客户', trigger: 'change'},
         ],
+        itemtype:[
+          { required: true, message: '请选择产品系列', trigger: 'change'},
+        ],
+        date:[
+          { required: true, message: '请选择有效期', trigger: 'change'},
+        ],
         /*contactsname:[
           { required: true, message: '请选择联系人', trigger: 'change'},
         ]*/
       },
+      itemtype:[]
     }
   },
   methods:{
@@ -377,8 +411,8 @@ export default {
       this.drawer = true
       this.data = this.$route.query.data
       this.form = Object.assign({},this.form,this.$route.query.data)
-      this.date[0] = this.form.begdate
-      this.date[1] = this.form.enddate
+      this.form.date[0] = this.form.begdate
+      this.form.date[1] = this.form.enddate
       if (this.form.quotedpricetype === '项目报价'){
         this.isQuotedPrice = true
       }else {
@@ -390,9 +424,10 @@ export default {
       this.$emit('onSuccess')
     },
     onSubmit(){
-     if (this.data.length !== 0){
-       this.form.begdate = this.date[0]
-       this.form.enddate = this.date[1]
+     if (this.form.data.length !== 0){
+       this.form.begdate = this.form.date[0]
+       this.form.enddate = this.form.date[1]
+       this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
      }else {
        this.form.begdate = ''
        this.form.enddate = ''
@@ -401,18 +436,18 @@ export default {
       if (!valid) return false
       const res = await this.$api.requested({
         "id": 20221020164803,
-        "version":1,
         "content": this.form
       })
     })
     },
     getSubmit(){
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
@@ -607,9 +642,15 @@ export default {
       this.projectParam.content.pageNumber = val
       this.contactsList()
     },
+    /*查询产品系列*/
+    queryItemType(){
+      this.$store.dispatch('optiontypeselect','itemtype').then(res => {
+        this.itemtype = res.data
+      })
+    }
   },
   mounted() {
-
+    this.queryItemType()
   },
   created() {
     this.onShow()

+ 118 - 31
src/Form/salerPrivatecustomer/add.vue

@@ -11,7 +11,7 @@
         @close="onClose">
       <div class="drawer__panel">
         <el-row :gutter="20">
-          <el-form :model="form" :rules="rules" ref="form" label-width="85px" label-position="right" size="mini">
+          <el-form :model="form" :rules="rules" ref="form" label-width="100px" label-position="right" size="mini">
             <el-col :span="20">
               <el-form-item label="客户名称:" prop="enterprisename">
                 <el-input v-model="form.enterprisename" placeholder="请输入客户名称" style="width: 100%"></el-input>
@@ -53,6 +53,11 @@
                 <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
               </el-popover>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="企业简称:" prop="abbreviation">
+                <el-input v-model="form.abbreviation" placeholder="请输入企业简称" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="24" >
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" style="width: 100%">
@@ -68,15 +73,22 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="客户来源:" >
-                <el-input v-model="form.source" placeholder="请输入客户来源" style="width: 100%"></el-input>
+              <el-form-item label="客户等级:" >
+                <el-select v-model="form.grade" placeholder="请选择客户等级" style="width: 100%">
+                  <el-option
+                      v-for="item in options.customerGrade"
+                      :key="item.rowindex"
+                      :label="item.value "
+                      :value="item.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="客户等级:" >
-                <el-select v-model="form.customergrade" placeholder="请选择客户等级" style="width: 100%">
+              <el-form-item label="客户分类:" >
+                <el-select v-model="form.customergrade" placeholder="请选择客户分类" style="width: 100%">
                   <el-option
-                      v-for="item in options.gradeData"
+                      v-for="item in options.customerClassification"
                       :key="item.rowindex"
                       :label="item.value "
                       :value="item.value">
@@ -85,12 +97,19 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="企业简称:" prop="abbreviation">
-                <el-input v-model="form.abbreviation" placeholder="请输入企业简称" style="width: 100%"></el-input>
+              <el-form-item label="客户行业:" >
+                <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
+                  <el-option
+                      v-for="item in options.industryData"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="企业税号:" prop="taxno">
+              <el-form-item label="税号:" prop="taxno">
                 <el-input v-model="form.taxno" placeholder="请输入企业税号" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
@@ -100,15 +119,8 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="所属行业:" >
-                <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
-                  <el-option
-                      v-for="item in options.industryData"
-                      :key="item.value"
-                      :label="item.value"
-                      :value="item.value">
-                  </el-option>
-                </el-select>
+              <el-form-item label="电话:" prop="contact">
+                <el-input v-model="form.telephone" placeholder="请输入电话" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -122,17 +134,13 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="企业地址:" prop="address">
+              <el-form-item label="详细地址:" prop="address">
                 <el-input v-model="form.address" placeholder="请输入企业地址" style="width: 100%"></el-input>
               </el-form-item>
             </el-col>
-<!--            <el-col :span="24">
-              <el-form-item label="联系方式:" prop="phonenumber">
-                <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%"></el-input>
-              </el-form-item>
-            </el-col>-->
+
             <el-col :span="24">
-              <el-form-item label="上级客户:" >
+              <el-form-item label="上级企业:" >
                 <el-popover
                     placement="bottom"
                     width="700"
@@ -188,6 +196,33 @@
                 </el-popover>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户来源:" >
+                <el-input v-model="form.source" placeholder="请输入客户来源" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="归属经销商:" prop="taxno">
+                <el-select v-model="form.sa_agentsid" placeholder="请选择客户等级" style="width: 100%">
+                  <el-option
+                      v-for="item in options.distributor"
+                      :key="item.value"
+                      :label="item.enterprisename"
+                      :value="item.sa_agentsid">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+
+
+
+<!--            <el-col :span="24">
+              <el-form-item label="联系方式:" prop="phonenumber">
+                <el-input v-model="form.phonenumber" placeholder="请输入联系方式" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>-->
+
 
           </el-form>
         </el-row>
@@ -246,7 +281,7 @@ export default {
       businessShow:false,
       total:0,
       currentPage:0,
-      form:{
+      /*form:{
         sa_customersid:0,
         sys_enterpriseid:0,
         enterprisename:'',
@@ -265,13 +300,39 @@ export default {
         address:'',
         ispublic:0,
         contact:''
+      },*/
+      form:{
+        sa_customersid: 0,//新增是传0
+        parentid: 0, //上级客户ID,默认或没有上级的时候传0
+        sys_enterpriseid: 0, //合作企业档案ID,新增是传0,更新
+        enterprisename:"",//客户名称(企业名称)
+        type: "", //客户类型
+        source: "", //客户来源
+        province:"",//非必填,可选
+        city:"",//非必填,可选
+        county:"",//非必填,可选
+        address:"",//非必填,可选
+        abbreviation:"",//非必填,可选
+        taxno:"",//税号,非必填,可选
+        grade:'',// 客户等级(商户等级)
+        industry:"",//非必填,可选,所属行业
+        contact:"",//非必填,可选
+        phonenumber:"",//非必填,可选
+        customergrade:"",
+        ispublic:0,//1:公海客户,0:私域客户,自己新建的
+        telephone: "",
+        sa_agentsid: ""
       },
       value:'',
       options:{
         type:[],
         parentCustomers:[],
-        gradeData:[],
-        industryData:[]
+      /*  gradeData:[],*/
+        customerGrade:[],
+        industryData:[],
+        gradeLeve:[],
+        customerClassification:[],
+        distributor:[]
       },
       rules:{
         enterprisename: [
@@ -312,6 +373,8 @@ export default {
       /*this.parentCustomer()*/
       this.gradeList()
       this.industryList()
+      this.queryCustomerGrade()
+      this.queryDistributor()
     },
     /*工商查询*/
     async businessSearch(){
@@ -564,7 +627,7 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
     },
-    /*客户等级*/
+    /*客户分类*/
     async gradeList(){
       const res = await this.$api.requested({
         "classname": "sysmanage.develop.optiontype.optiontype",
@@ -586,8 +649,14 @@ export default {
           this.options.gradeData[i] = res.data[i].value
         }
       }*/
-      this.options.gradeData = res.data
-      console.log("处理后客户等级",this.options.gradeData)
+      this.options.customerClassification = res.data
+      console.log("处理后客户等级",this.options.customerClassification)
+    },
+    /*客户等级*/
+    queryCustomerGrade(){
+      this.$store.dispatch('optiontypeselect','agentgrade').then(res=>{
+        this.options.customerGrade = res.data
+      })
     },
     /*行业列表*/
     async industryList(){
@@ -604,6 +673,24 @@ export default {
         }
       })
       this.options.industryData = res.data
+    },
+    /*所属经销商*/
+    async queryDistributor(){
+      var sessionData = sessionStorage.getItem('active_account')
+      sessionData = JSON.parse(sessionData)
+      const res = await this.$api.requested({
+        "id": 20230214162602,
+        "content": {
+          "hrid": sessionData.hrid,
+          "pageNumber": 1,
+          "pageSize": 20,
+          "where": {
+            "condition": ""
+          }
+        },
+      })
+      this.options.distributor = res.data
+      console.log(this.options.distributor,'经销商')
     }
   }
 }

+ 17 - 11
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -387,7 +387,10 @@ export default {
         enddate:'',
         begdate:'',
         itemtype:[],
-        quotedpricenotes:[]
+        quotedpricenotes: [
+          "1、报价为含税13%税率,含运费",
+          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
+        ]
       },
       rules:{
         projectname:[
@@ -413,13 +416,15 @@ export default {
     },
     /*创建报价单,获取商品信息*/
     onSubmit(type){
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
+
       console.log(this.form,"form")
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
@@ -439,18 +444,18 @@ export default {
     },
     /*导入创建报价单校验*/
     onCheckFormImport(){
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({
           "id": 20221020164803,
-          "version":1,
           "content": this.form
         })
         this.$refs.quoterPrice.quoterImport(res.data.sa_quotedpriceid,this.form.type)
@@ -460,12 +465,13 @@ export default {
     /*提交*/
     getSubmit(){
       this.dialogFormVisible = false
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false

+ 158 - 0
src/SDrpManagement/QuotedPrice/components/Select.vue

@@ -0,0 +1,158 @@
+<template>
+  <div class="border-bottom">
+    <div>
+      <ul class="flex-align-center normal-margin">
+        <li style="color:#999;font-size: 13px;">领域:</li>
+        <li :class="field_act === item.value?'act':''" class="brand-item" v-for="item in fields" :key="item.value" @click="clickField(item)">{{item.value}}</li>
+      </ul>
+      <ul class="flex-align-center normal-margin">
+        <li style="color:#999;font-size: 13px;">标准:</li>
+        <li :class="standard_act === item.value?'act':''" class="brand-item" v-for="item in itemstandards" :key="item.value" @click="clickStandard(item)">{{item.value}}</li>
+      </ul>
+      <ul class="flex-align-center normal-margin">
+        <li style="color:#999;font-size: 13px;">品牌:</li>
+        <li :class="brand_act === item.sa_brandid?'act':''" class="brand-item" v-for="item in brands" :key="item.sa_brandid" @click="clickBrand(item.sa_brandid)">{{item.brandname}}</li>
+      </ul>
+      <ul class="flex-align-center normal-margin">
+        <li style="color:#999;font-size: 13px;">分类:</li>
+        <li :class="class_act === item.itemclassnum?'act':''" class="brand-item" v-for="item in itemclass" :key="item.itemclassnum" @click="clickClass(item)">{{item.itemclassname}}</li>
+      </ul>
+      <classTree style="padding-left:31px" :data="activeClass.subdep" @onClassChange="change"></classTree>
+    </div>
+    <div>
+
+    </div>
+  </div>
+</template>
+
+<script>
+import classTree from './classTree.vue'
+export default {
+  data () {
+    return {
+      value:'',
+      brands:[],
+      fields:[],
+      itemclass:[],
+      activeClass:{},
+      field_act:0,
+      brand_act:0,
+      class_act:0,
+      standard_act:0,
+      itemstandards:[]
+    }
+  },
+  props: {
+    default: {
+      type: Boolean,
+      default:() => false
+    }
+  },
+  components:{
+    classTree
+  },
+  methods:{
+    /*async queryAgentiInfo () {
+      const res1 = await this.$api.requested({
+        "id": 20221223141802,
+        "content": {
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+              "condition": ""
+            }
+        }
+      })
+      this.fields = res1.data
+      this.field_act = res1.data[0].sys_enterprise_tradefieldid
+    },*/
+    queryAgentiInfo () {
+      this.$store.dispatch('optiontypeselect','tradefield').then(res=>{
+        this.fields = res.data
+        console.log(this.fields,'tradefield')
+        this.field_act = res.data[0].value
+        console.log(this.field_act)
+      })
+    },
+    queryStandard(){
+      this.$store.dispatch('optiontypeselect','itemstandards').then(res=>{
+        this.itemstandards = res.data
+        console.log(this.itemstandards,'itemstandards')
+        this.standard_act = res.data[0].value
+        console.log(this.standard_act)
+      })
+    },
+    async queryBrands () {
+      const res = await this.$api.requested({
+        "id": "20220924163702",
+        "content": {
+          "pageSize":1000,
+          "where":{
+            "condition":""
+          }
+        }
+      })
+      this.brands = res.data
+      this.brand_act = this.brands[0].sa_brandid
+      this.queryClass()
+    },
+
+    async queryClass () {
+      const res = await this.$api.requested({
+        "id":"20220922110403","content":{"sa_brandid":this.brand_act}
+      })
+      console.log(res.data,'pop')
+      this.itemclass = res.data[0].ttemclass
+    },
+    clickBrand (id) {
+      this.brand_act = id
+      this.queryClass()
+    },
+    clickField (item) {
+      this.field_act = item.value
+      this.$emit('clickField',item)
+    },
+    clickStandard (item) {
+      this.standard_act = item.value
+      this.$emit('clickStandard',item)
+    },
+    clickClass (item) {
+      this.activeClass = item
+      this.class_act = item.itemclassnum
+      this.change(item)
+    },
+    change(n) {
+      console.log(n)
+      this.$emit('onClassChange',n)
+    },
+    clearSearch() {
+      this.$emit('clearSearch')
+    }
+  },
+  mounted () {
+    this.queryAgentiInfo()
+    this.queryBrands()
+    this.queryStandard()
+  }
+}
+
+</script>
+<style>
+</style>
+<style scoped>
+.brand-item{
+  margin:0 25px;
+  color: #333;
+  cursor: pointer;
+  transition: .2s all linear;
+  font-size: 13px;
+}
+.act{
+  color:#3874f6;
+}
+.border-bottom{
+  padding-bottom:16px;
+  border-bottom: 1px solid #e3e5ea;
+}
+
+</style>

+ 47 - 0
src/SDrpManagement/QuotedPrice/components/classTree.vue

@@ -0,0 +1,47 @@
+<template>
+  <div>
+    <div class="flex-align-center">
+      <div v-for="item in data" :key="item.index" @click="classClick(item)">
+        <p class="normal-margin class-item"  :class="class_act === item.itemclassnum?'act':''">{{item.itemclassname}}</p>
+        <Tree v-if="item.subdep" :data="item.subdep" @onClassChange="change"></Tree>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Tree",
+  props:['data'],
+  data () {
+    return {
+      activeClass:{},
+      class_act:0,
+    }
+  },
+  methods:{
+    classClick (item) {
+      this.activeClass = item
+      this.class_act = item.itemclassnum
+      this.change(item)
+    },
+    change(item) {
+      this.$emit('onClassChange',item)
+    }
+  }
+}
+</script>
+<style scoped>
+.class-item{
+  margin:0 25px;
+  color: #333;
+  cursor: pointer;
+  transition: .2s all linear;
+  font-size: 13px;
+  
+}
+.act{
+  color:#3874f6;
+}
+
+</style>

+ 37 - 3
src/SDrpManagement/QuotedPrice/components/edit/productTable.vue

@@ -19,6 +19,9 @@
             <el-button style="float: right" :type="tableSelectData.length === 0?'':'primary'" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
+        <div class="container">
+          <selectClass @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickStandard="clickStandard" @clickField="clickField" :default="true"></selectClass>
+        </div>
         <div class="produtMag-panel">
           <el-table
               ref="multipleTable"
@@ -151,11 +154,11 @@
 <script>
 import uploadFile from "@/components/upload/hw_obs_upload";
 import previewImage from "@/components/previewImage";
-
+import selectClass from '../Select'
 export default {
   name: "productTable",
   props:["id","sa_quotedpriceid","quotedpricetype"],
-  components:{uploadFile, previewImage},
+  components:{uploadFile, previewImage,selectClass},
   data(){
     return {
       dialogProductVisible:false,
@@ -176,7 +179,11 @@ export default {
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "tradefield":"",
+            "itemclassid":"",
+            "sa_brandid":"",
+            "standards":""
           }
 
         }
@@ -319,6 +326,33 @@ export default {
       console.log(res,"已选产品123456")
       this.selectTotal = res.total
       console.log(res.total,"已选产品数量")
+    },
+    brandChange(id) {
+      this.brandId = id
+      this.queryProduct()
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.queryProduct()
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clickField (item) {
+      console.log(item,'clickField')
+      this.params.content.where.tradefield = item.value
+      this.queryProduct()
+    },
+    clickStandard (item){
+      this.params.content.where.standards = item.value
+      this.queryProduct()
     }
   },
   mounted() {

+ 40 - 5
src/SDrpManagement/QuotedPrice/components/edit/productTableProject.vue

@@ -19,6 +19,9 @@
             <el-button style="float: right" :type="tableSelectData.length === 0?'':'primary'" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
+        <div class="container">
+          <selectClass @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickStandard="clickStandard" @clickField="clickField" :default="true"></selectClass>
+        </div>
         <div class="produtMag-panel">
           <el-table
               ref="multipleTable"
@@ -88,7 +91,7 @@
             <el-table-column
                 prop="itemclass"
                 label="类别"
-                width="0">
+                width="200">
               <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>
@@ -151,11 +154,11 @@
 <script>
 import uploadFile from "@/components/upload/hw_obs_upload";
 import previewImage from "@/components/previewImage";
-
+import selectClass from '../Select'
 export default {
   name: "productTable",
   props:["id","sa_quotedpriceid","quotedpricetype"],
-  components:{uploadFile, previewImage},
+  components:{uploadFile, previewImage,selectClass},
   data(){
     return {
       dialogProductVisible:false,
@@ -169,14 +172,17 @@ export default {
       selectTotal:0,
       params:{
         "id": 20221020164903,
-        "version":1,
         "content": {
           "sa_projectid":'',
           "sa_quotedpriceid":"",
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "tradefield":"",
+            "itemclassid":"",
+            "sa_brandid":"",
+            "standards":""
           }
 
         }
@@ -248,6 +254,7 @@ export default {
     /*产品配置信息*/
     async productData(){
       this.params.content.sa_quotedpriceid = this.sa_quotedpriceid
+      console.log(this.params.content.where,'查询条件')
       const res = await this.$api.requested(this.params)
       this.list = res.data
       this.total = res.total
@@ -324,6 +331,34 @@ export default {
       console.log(res,"已选产品123456")
       this.selectTotal = res.total
       console.log(res.total,"已选产品数量")
+    },
+
+    brandChange(id) {
+      this.brandId = id
+      this.queryProduct()
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.queryProduct()
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clickField (item) {
+      console.log(item,'clickField')
+      this.params.content.where.tradefield = item.value
+      this.queryProduct()
+    },
+    clickStandard (item){
+      this.params.content.where.standards = item.value
+      this.queryProduct()
     }
   },
   mounted() {

+ 37 - 3
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -19,6 +19,9 @@
             <el-button style="float: right" type="primary" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
+        <div class="container">
+          <selectClass @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickStandard="clickStandard" @clickField="clickField" :default="true"></selectClass>
+        </div>
         <div class="produtMag-panel">
           <el-table
               ref="multipleTable"
@@ -151,11 +154,11 @@
 <script>
 import uploadFile from "@/components/upload/hw_obs_upload";
 import previewImage from "@/components/previewImage";
-
+import selectClass from './Select'
 export default {
   name: "productTable",
   props:["id"],
-  components:{uploadFile, previewImage},
+  components:{uploadFile, previewImage,selectClass},
   data(){
     return {
       dialogProductVisible:false,
@@ -176,7 +179,11 @@ export default {
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "tradefield":"",
+            "itemclassid":"",
+            "sa_brandid":"",
+            "standards":""
           }
 
         }
@@ -329,6 +336,33 @@ export default {
       console.log(res,"已选产品123456")
       this.selectTotal = res.total
       console.log(res.total,"已选产品数量")
+    },
+    brandChange(id) {
+      this.brandId = id
+      this.queryProduct()
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.queryProduct()
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clickField (item) {
+      console.log(item,'clickField')
+      this.params.content.where.tradefield = item.value
+      this.queryProduct()
+    },
+    clickStandard (item){
+      this.params.content.where.standards = item.value
+      this.queryProduct()
     }
   },
   mounted() {

+ 38 - 3
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -19,6 +19,9 @@
             <el-button style="float: right" type="primary" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
+        <div class="container">
+          <selectClass @brandChange="brandChange" @onClassChange="onClassChange" @Search="Search" @clearSearch="clearSearch" @clickStandard="clickStandard" @clickField="clickField" :default="true"></selectClass>
+        </div>
         <div class="produtMag-panel">
           <el-table
               ref="multipleTable"
@@ -151,11 +154,11 @@
 <script>
 import uploadFile from "@/components/upload/hw_obs_upload";
 import previewImage from "@/components/previewImage";
-
+import selectClass from './Select'
 export default {
   name: "productTable",
   props:["id"],
-  components:{uploadFile, previewImage},
+  components:{uploadFile, previewImage,selectClass},
   data(){
     return {
       dialogProductVisible:false,
@@ -177,7 +180,11 @@ export default {
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "tradefield":"",
+            "itemclassid":"",
+            "sa_brandid":"",
+            "standards":""
           }
 
         }
@@ -328,6 +335,34 @@ export default {
       console.log(res,"已选产品123456")
       this.selectTotal = res.total
       console.log(res.total,"已选产品数量")
+    },
+
+    brandChange(id) {
+      this.brandId = id
+      this.queryProduct()
+    },
+    onClassChange (n) {
+      this.params.content.where.itemclassid = n.itemclassid
+      this.queryProduct()
+    },
+    Search(data) {
+      this.params.content.where.condition = data
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clearSearch() {
+      this.params.content.where.condition = ''
+      this.params.content.pageNumber = 1
+      this.queryProduct()
+    },
+    clickField (item) {
+      console.log(item,'clickField')
+      this.params.content.where.tradefield = item.value
+      this.queryProduct()
+    },
+    clickStandard (item){
+      this.params.content.where.standards = item.value
+      this.queryProduct()
     }
   },
   mounted() {

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

@@ -12,7 +12,7 @@
         ownertable="sa_quotedprice"
         :statusCheck="[{key:'status',value:'审核'},{key:'status',value:'提交'}]"
         :tags="[]"
-        :tabs="['产品清单','详细信息','历史报价']"
+        :tabs="['产品清单','详细信息','其他费用','历史报价']"
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
@@ -34,10 +34,10 @@
       <div slot="slot0" class=" normal-panel">
         <productInventory ref="productList" :data="mainData" v-if="flag"></productInventory>
       </div>
-<!--      <div slot="slot2" class=" normal-panel">
-        <otherExpenses></otherExpenses>
-      </div>-->
       <div slot="slot2" class=" normal-panel">
+        <otherExpenses :status="mainData.status" :data="mainData" v-if="flag"></otherExpenses>
+      </div>
+      <div slot="slot3" class=" normal-panel">
         <historicalQuotation :data="mainData" v-if="flag"></historicalQuotation>
       </div>
     </basicDetails>

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

@@ -42,7 +42,7 @@
         <el-descriptions-item label="提交时间">{{ basic.submitdate?basic.submitdate:"--" }}</el-descriptions-item>
         <el-descriptions-item label="审核人">{{ basic.checkby?basic.checkby:"--" }}</el-descriptions-item>
         <el-descriptions-item label="审核时间">{{ basic.checkdate?basic.checkdate:"--" }}</el-descriptions-item>
-        <el-descriptions-item label="作废原因">{{ basic.deleteReason[0].deletereason?basic.deleteReason[0].deletereason:'--'}}</el-descriptions-item>
+        <el-descriptions-item label="作废原因">{{ basic.deleteReason.length !== 0?basic.deleteReason[0].deletereason:'--'}}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="转手次数">{{ data.leader.length !== 0?data.leader[0].leadernum === 0?'0':data.leader[0].leadernum:'--' }}</el-descriptions-item>
       </el-descriptions>
     </div>

+ 95 - 8
src/SDrpManagement/QuotedPrice/detail/modules/otherExpenses/add.vue

@@ -14,7 +14,14 @@
           <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
             <el-col :span="24">
               <el-form-item label="类型" label-width="80px" prop="itemtype">
-                <el-input v-model="form.items[0].itemtype" autocomplete="off" placeholder="请选择类型"></el-input>
+                <el-select v-model="form.items[0].itemtype" placeholder="请选择" style="width: 100%">
+                  <el-option
+                      v-for="item in itemtypes"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -24,17 +31,24 @@
             </el-col>
             <el-col :span="24">
               <el-form-item label="单价" label-width="80px" prop="price">
-                <el-input  v-model="form.items[0].price" autocomplete="off" placeholder="请输入单价"></el-input>
+                <el-input  v-model="form.items[0].price" autocomplete="off" placeholder="请输入单价" @change="priceChange"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="数量" label-width="80px" prop="qty">
-                <el-input  v-model="form.items[0].qty" autocomplete="off" placeholder="请输入数量"></el-input>
+                <el-input  v-model="form.items[0].qty" autocomplete="off" placeholder="请输入数量" @change="numChange"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">
               <el-form-item label="单位" label-width="80px" prop="unitname">
-                <el-input  v-model="form.items[0].unitname" autocomplete="off" placeholder="输入选择单位"></el-input>
+                <el-select v-model="form.items[0].unitname" placeholder="请选择" style="width: 100%">
+                  <el-option
+                      v-for="item in unitList"
+                      :key="item.unitname"
+                      :label="item.unitname"
+                      :value="item.unitname">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -48,7 +62,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" :disabled="form.items[0].itemtype === '' || form.items[0].itemname === '' || form.items[0].unitname === '' || form.items[0].qty === '' || form.items[0].price === ''"
+        <el-button size="small" :disabled="form.items[0].itemtype === '' && form.items[0].itemname === '' && form.items[0].unitname === '' && form.items[0].qty === '' && form.items[0].price === ''"
                    type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -63,7 +77,7 @@ export default {
       visible:false,
       amount:0,
       form:{
-        "sa_quotedpriceid":475,     //sat_notice_classid<=0时 为新增
+        "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
         "items":[
           {
             "sa_quotedprice_specialitemsid":0,
@@ -77,15 +91,88 @@ export default {
       },
       rules:{
       },
+      unitList:[],
+      itemtypes:[]
     }
   },
   methods:{
-    onSubmit(){
-
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20230211155503,
+        "content": this.form
+      })
+      this.tool.showMessage(res,()=>{
+        this.form = {
+          "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
+          "items":[
+            {
+              "sa_quotedprice_specialitemsid":0,
+              "itemtype":"",
+              "itemname":"",
+              "unitname":"",
+              "qty":'',
+              "price":''
+            }
+          ]
+        }
+        this.amount = 0
+        this.visible = false
+        this.$emit('addSuccess')
+      })
     },
     onClose(){
+      this.form = {
+        "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
+        "items":[
+          {
+            "sa_quotedprice_specialitemsid":0,
+            "itemtype":"",
+            "itemname":"",
+            "unitname":"",
+            "qty":'',
+            "price":''
+          }
+        ]
+      }
+      this.amount = 0
       this.visible = false
+    },
+    /*查询计量单位*/
+    async queryUnit(){
+      const res = await this.$api.requested({
+        "id": "20220922084803",
+        "content": {
+          "where":{
+            "condition":""
+          }
+        }
+      })
+      this.unitList = res.data
+    },
+    /*获取报价单费用类型*/
+    queryType(){
+      this.$store.dispatch('optiontypeselect','quotedpriceitemtype').then(res=>{
+        this.itemtypes = res.data
+      })
+    },
+    numChange(){
+      if (this.form.items[0].qty !== '' && this.form.items[0].price !== ''){
+        this.amount = this.form.items[0].qty * this.form.items[0].price
+      }else {
+        this.amount = 0
+      }
+    },
+    priceChange(){
+      if (this.form.items[0].qty !== '' && this.form.items[0].price !== ''){
+        this.amount = this.form.items[0].qty * this.form.items[0].price
+      }else {
+        this.amount = 0
+      }
     }
+  },
+  mounted() {
+    this.queryUnit()
+    this.queryType()
   }
 }
 </script>

+ 153 - 0
src/SDrpManagement/QuotedPrice/detail/modules/otherExpenses/edit.vue

@@ -0,0 +1,153 @@
+<template>
+  <div>
+    <el-button size="mini" type="text" @click="onShow" :disabled="!tool.checkAuth($route.name,'otherExpenses') || status !== '新建'">编 辑</el-button>
+    <el-drawer
+        title="添加其他费用"
+        :visible.sync="visible"
+        size="800px"
+        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">
+            <el-col :span="24">
+              <el-form-item label="类型" label-width="80px" prop="itemtype">
+                <el-select v-model="form.itemtype" placeholder="请选择" style="width: 100%">
+                  <el-option
+                      v-for="item in itemtypes"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="费用明细" label-width="80px" prop="itemname">
+                <el-input type="textarea"  v-model="form.itemname" autocomplete="off" placeholder="输入费用明细" autosize></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="单价" label-width="80px" prop="price">
+                <el-input  v-model="form.price" autocomplete="off" placeholder="请输入单价" @change="priceChange"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="数量" label-width="80px" prop="qty">
+                <el-input  v-model="form.qty" autocomplete="off" placeholder="请输入数量" @change="numChange"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="单位" label-width="80px" prop="unitname">
+                <el-select v-model="form.unitname" placeholder="请选择" style="width: 100%">
+                  <el-option
+                      v-for="item in unitList"
+                      :key="item.unitname"
+                      :label="item.unitname"
+                      :value="item.unitname">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="金额" label-width="80px" prop="amount">
+                <el-input  v-model="form.amount" autocomplete="off"  disabled></el-input>
+              </el-form-item>
+            </el-col>
+
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" :disabled="form.itemtype === '' && form.itemname === '' && form.unitname === '' && form.qty === '' && form.price === ''"
+                   type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "edit",
+  props:['data','status'],
+  data(){
+    return {
+      visible:false,
+      amount:0,
+      form:{
+      },
+      rules:{
+      },
+      unitList:[],
+      itemtypes:[]
+    }
+  },
+  methods:{
+    onShow(){
+      this.visible = true
+      this.form = Object.assign({},this.form,this.data)
+    },
+    async onSubmit(){
+      const res = await this.$api.requested({
+        "id": 20230211155503,
+        "content": {
+          "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
+          "items":[this.form]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$refs.form.resetFields()
+        this.visible = false
+        this.$emit('editSuccess')
+      })
+    },
+    onClose(){
+      this.$refs.form.resetFields()
+      this.visible = false
+    },
+    /*查询计量单位*/
+    async queryUnit(){
+      const res = await this.$api.requested({
+        "id": "20220922084803",
+        "content": {
+          "where":{
+            "condition":""
+          }
+        }
+      })
+      this.unitList = res.data
+    },
+    /*获取报价单费用类型*/
+    queryType(){
+      this.$store.dispatch('optiontypeselect','quotedpriceitemtype').then(res=>{
+        this.itemtypes = res.data
+      })
+    },
+    numChange(){
+      if (this.form.qty !== '' && this.form.price !== ''){
+        this.amount = this.form.qty * this.form.price
+      }else {
+        this.amount = 0
+      }
+    },
+    priceChange(){
+      if (this.form.qty !== '' && this.form.price !== ''){
+        this.amount = this.form.qty * this.form.price
+      }else {
+        this.amount = 0
+      }
+    }
+  },
+  mounted() {
+    this.queryUnit()
+    this.queryType()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 208 - 43
src/SDrpManagement/QuotedPrice/detail/modules/otherExpenses/index.vue

@@ -1,62 +1,123 @@
 <template>
   <div>
-    <div>
-      <add class="inline-16" ></add>
-      <el-input
-          placeholder="请输入搜索内容"
-          :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'"
-          v-model="params.content.where.condition"
-          style="width:200px"
-          size="small"
-          class="input-with-select inline-16"
-          @keyup.native.enter="listData(params.content.pageNumber = 1)"
-          @clear="clearData"
-          clearable>
-      </el-input>
-    </div>
-    <div style="margin-top: 15px">
-      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" fixedName="operation">
-        <template v-slot:customcol="scope">
-          <div v-if="scope.column.columnname === 'province'">
-            <p>{{ scope.column.data.province + '-' + scope.column.data.city + '-' + scope.column.data.county}}</p>
-          </div>
-          <div v-else-if="scope.column.columnname === 'operation'">
-            <span>{{scope.column.data[scope.column.columnname]}}</span>
-          </div>
-          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
-        </template>
-        <template v-slot:opreation="scope">
-          <!--          <edit class="inline-16"  :data="scope.data" @updateSuccess="onSuccess" :disabled="rowData.disabled"></edit>-->
-        </template>
-      </tableLayout>
+    <div style="height: 390px">
+      <div >
+        <add class="inline-16" @addSuccess="onSuccess" v-if="tool.checkAuth($route.name,'otherExpenses') && status === '新建'"></add>
+        <el-input
+            placeholder="请输入搜索内容"
+            :suffix-icon="params.content.where.condition?params.content.where.condition.length > 0?'':'':'el-icon-search'"
+            v-model="params.content.where.condition"
+            style="width:200px"
+            size="small"
+            class="input-with-select inline-16"
+            @keyup.native.enter="listData(params.content.pageNumber = 1)"
+            @clear="clearData"
+            clearable>
+        </el-input>
+      </div>
+      <div style="margin-top: 15px">
+        <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true"  :height="tableHieght" fixedName="operation">
+          <template v-slot:customcol="scope">
+            <div v-if="scope.column.columnname === 'province'">
+              <p>{{ scope.column.data.province + '-' + scope.column.data.city + '-' + scope.column.data.county}}</p>
+            </div>
+            <div v-else-if="scope.column.columnname === 'operation'">
+              <span>{{scope.column.data[scope.column.columnname]}}</span>
+            </div>
+            <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
+          </template>
+          <template v-slot:opreation="scope">
+            <!--          <edit class="inline-16"  :data="scope.data" @updateSuccess="onSuccess" :disabled="rowData.disabled"></edit>-->
+            <edit class="inline-16"  :data="scope.data" @editSuccess="onSuccess" :status="status"></edit>
+            <el-popconfirm
+                title="确定删除该费用吗?"
+                @confirm="onDel(scope.data.sa_quotedprice_specialitemsid)"
+            >
+              <el-button slot="reference" type="text" size="mini" class="inline-16" :disabled="!tool.checkAuth($route.name,'otherExpenses') || status !== '新建'">删除</el-button>
+            </el-popconfirm>
+
+          </template>
+        </tableLayout>
+      </div>
+      <div style="margin-top:16px;text-align:right">
+        <el-pagination
+            background
+            small
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="params.content.pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
     </div>
-    <div style="margin-top:16px;text-align:right">
-      <el-pagination
-          background
-          small
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-          :current-page="currentPage"
-          :page-size="params.content.pageSize"
-          layout="total, prev, pager, next, jumper"
-          :total="total">
-      </el-pagination>
+    <div style="height: 390px">
+      <div >
+<!--        <add class="inline-16" @addSuccess="onSuccess" v-if="tool.checkAuth($route.name,'otherExpenses') && status === '新建'"></add>-->
+        <el-button size="small" type="primary" @click="addNotes" :disabled="!addShow" v-if="tool.checkAuth($route.name,'otherExpenses') && status === '新建'">添加</el-button>
+      </div>
+      <div style="margin-top: 15px">
+        <el-table ref="table" size="mini"  border :data="notes">
+          <el-table-column
+              label="报价说明">
+            <template slot-scope="scope">
+              <span v-if="!saveShow || index !== scope.row.index">{{scope.row.notes}}</span>
+              <span v-else-if="saveShow && index === 0">
+               {{scope.row.notes}}
+                <el-select v-model="value" placeholder="请选择" size="mini">
+                  <el-option
+                      v-for="item in options"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
+              </span>
+              <span v-else>
+                <el-input v-model="scope.row.notes"></el-input>
+              </span>
+            </template>
+          </el-table-column>
+          <el-table-column
+              label="操作"
+              width="120px">
+            <template slot-scope="scope">
+              <el-button class="inline-16" size="mini" type="text" v-if="!saveShow" :disabled="scope.row.index === 1 || !tool.checkAuth($route.name,'otherExpenses') || status !== '新建'" @click="onEdit(scope.row)">编 辑</el-button>
+              <el-popconfirm
+                  title="确定删除该报价说明吗?"
+                  @confirm="onDelNodes(scope.row)"
+              >
+                <el-button slot="reference" size="mini" type="text" v-if="!saveShow" :disabled="scope.row.index === 0 || scope.row.index === 1 || !tool.checkAuth($route.name,'otherExpenses') || status !== '新建'" >删 除</el-button>
+              </el-popconfirm>
+
+              <el-button size="mini" type="text" v-if="saveShow && index === scope.row.index" @click="onSave">保 存</el-button>
+              <el-button size="mini" type="text" v-if="saveShow && index === scope.row.index" @click="onCancel">取 消</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
 import add from './add'
+import edit from './edit'
 export default {
   name: "index",
-  components:{add},
+  props:["status","data"],
+  components:{add,edit},
   data(){
     return {
-      tableHieght:"600px",
+      tableHieght:"300px",
       tablecols:[],
       list:[],
+      saveShow:false,
+      addShow:true,
       total:0,
       currentPage:0,
+      index:'',
       params:{
         "id": 20230211155603,
         "content": {
@@ -67,7 +128,18 @@ export default {
             "condition": ""
           }
         }
-      }
+      },
+      notes:[],
+      value:'含运费',
+      options:[
+        {
+          value:'含运费'
+        },
+        {
+          value:'不含运费'
+        }
+      ],
+      noteLast:''
     }
   },
   methods:{
@@ -89,8 +161,101 @@ export default {
     clearData(){
       this.params.content.pageNumber = 1
       this.listData()
+    },
+    onSuccess(){
+      this.listData()
+    },
+    async onDel(id){
+      const res = await this.$api.requested({
+        "id": 20230211155703,
+        "content": {
+          "sa_quotedprice_specialitemsids":[id]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+      })
+    },
+    addNotes(){
+      this.addShow = false
+      this.index = this.notes.length
+      this.notes.push({
+        index:this.notes.length,
+        notes:""
+      })
+      this.saveShow = true
+      console.log(this.notes)
+    },
+    async onSave(){
+      if (this.index === 0){
+        if (this.value === '含运费'){
+          this.notes[0].notes = '1、报价为含税13%税率, 含运费'
+        }else {
+          this.notes[0].notes = '1、报价为含税13%税率, 不含运费'
+        }
+      }
+      this.notes.forEach((item,index)=>{
+        this.data.quotedpricenotes[index] = item.notes
+      })
+      const res = await this.$api.requested({
+        "id": 20221020164803,
+        "content":this.data
+      })
+      this.tool.showMessage(res,()=>{
+        this.saveShow = false
+        this.addShow = true
+      })
+    },
+    onEdit(val){
+      this.index = val.index
+      if (val.index === 0){
+        this.noteLast = this.notes[0].notes.substring(this.notes[0].notes.lastIndexOf(','))
+        console.log(this.noteLast)
+        if (this.noteLast === ',含运费'){
+          this.value = '含运费'
+        }else if(this.noteLast === ',不含运费') {
+          this.value = '不含运费'
+        }
+        this.notes[0].notes = this.notes[0].notes.substring(0,this.notes[0].notes.lastIndexOf(','))
+      }
+      this.saveShow = true
+      this.addShow = false
+    },
+    async onDelNodes(val){
+      this.notes.splice(val.index,1)
+      this.data.quotedpricenotes = []
+      this.notes.forEach((item,index)=>{
+        this.data.quotedpricenotes[index] = item.notes
+      })
+      const res = await this.$api.requested({
+        "id": 20221020164803,
+        "content":this.data
+      })
+      this.tool.showMessage(res,()=>{
+        this.saveShow = false
+        this.addShow = true
+      })
+    },
+    onCancel(){
+      if (this.noteLast === ', 含运费'){
+        this.notes[0].notes = '1、报价为含税13%税率, 含运费'
+      }else if(this.noteLast === ', 不含运费') {
+        this.notes[0].notes = '1、报价为含税13%税率, 不含运费'
+      }
+      this.saveShow = false
+      this.addShow = true
     }
   },
+  mounted() {
+    this.listData()
+    this.notes = this.data.quotedpricenotes
+    this.notes = this.notes.map((e,index) =>{
+      return {
+        notes:e,
+        index:index
+      }
+    })
+  },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).otherExpensesTable.tablecols
   },

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

@@ -388,7 +388,10 @@ export default {
         enddate:'',
         begdate:'',
         itemtype:[],
-        quotedpricenotes:[]
+        quotedpricenotes: [
+          "1、报价为含税13%税率, 含运费 ",
+          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
+        ]
       },
       rules:{
         projectname:[
@@ -417,15 +420,18 @@ export default {
     },
     /*创建报价单,获取商品信息*/
     onSubmit(type){
-      if (this.date.length === 0){
+      console.log(this.form.date,'date')
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
         this.form.sa_quotedpriceid = 0
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
         this.form.sa_quotedpriceid = 0
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
+      console.log(this.form,'form')
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({
@@ -441,12 +447,13 @@ export default {
     },
     /*导入创建报价单校验*/
     onCheckFormImport(){
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
@@ -461,12 +468,13 @@ export default {
    /*提交*/
     getSubmit(){
       this.drawer = false
-      if (this.date.length === 0){
+      if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
       }else {
-        this.form.begdate = this.date[0]
-        this.form.enddate = this.date[1]
+        this.form.begdate = this.form.date[0]
+        this.form.enddate = this.form.date[1]
+        this.form.quotedpricenotes[1] = "2、报价有限期" + this.form.begdate + "至" + this.form.enddate
       }
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false

+ 1 - 0
src/SDrpManagement/salerPrivatecustomer/index.vue

@@ -212,6 +212,7 @@ export default {
       this.$refs['list'].param.content.type = id
       this.$refs['list'].param.content.isExport = false
       this.$refs.list.param.content.deleted = 0
+      this.$refs.list.param.content.isend = 0
       this.$refs['list'].listData()
       // this.$store.dispatch('sendDataToForm',)
     },