Explorar o código

Merge branch 'mergeBranch' into greenUrgent

qymljy hai 1 ano
pai
achega
9c92841044

+ 18 - 6
src/Form/QuotedPrice/edit.vue

@@ -9,7 +9,7 @@
         :show-close="false"
         append-to-body
         @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
+      <div class="drawer__panel" >
         <el-row style="margin-top: 10px" :gutter="10">
           <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
             <el-col :span="24">
@@ -74,16 +74,16 @@
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group >
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
                 </el-button-group>
-                <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
+                <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group disabled>
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
@@ -95,6 +95,11 @@
                 </div>
               </el-form-item>
             </el-col>
+            <el-col  :span="24" >
+              <el-form-item label="报价金额:" label-width="100px" prop="quotedpriceamount">
+                <el-input  v-model="form.quotedpriceamount" autocomplete="off" placeholder="报价金额" :disabled="data.iseditamount == 0" @change="quotedpriceamountChange(form.quotedpriceamount)"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col  :span="24">
               <el-form-item label="报价日期:" label-width="100px">
                 <el-date-picker
@@ -305,9 +310,13 @@ export default {
         discountrate:[
           { required: false, validator: discountrate, trigger: 'change'},
         ],
-       /* name:[
+        quotedpriceamount:[
+          { required: true, message: '请填写报价金额', trigger: 'blur'},
+          { pattern:/^[0-9]+\.{0,1}[0-9]{0,4}$/,message: '输入不合法,请输入数值',trigger: 'blur'},
+        ],
+        name:[
           { required: true, message: '请选择联系人', trigger: 'change'},
-        ]*/
+        ]
       },
       itemtype:[],
       isPhone:true,
@@ -628,6 +637,9 @@ export default {
         this.telephone = ''
       }
     },
+    quotedpriceamountChange(data){
+      this.form.quotedpriceamount = Math.round(data * 100)/100
+    }
    /* async mainData(val) {
       const res = await this.$api.requested({
         "id": 20220930103501,

+ 1 - 1
src/HDrpManagement/contactProfile/modules/detail.vue

@@ -254,7 +254,7 @@
                 :list="
               [
                 {title:'报价次数',value:$refs.quotationRef && $refs.quotationRef.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:unitCompile($refs.quotationRef && $refs.quotationRef.list[0] && $refs.quotationRef.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.quotationRef && $refs.quotationRef.list[0] && $refs.quotationRef.list[0].quotedpriceamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.quotationRef && $refs.quotationRef.list[0] && $refs.quotationRef.list[0].submitdate || '--',bg:'#F9F2E5',color:'#FF7603'},
               ]"
             >

+ 29 - 36
src/HDrpManagement/contractManage/components/addContract.vue

@@ -841,45 +841,38 @@ export default {
         if (val) {
           this.$store.commit('setLoading',true)
           /* 居间新建 */
-          if (this.$route.query.type == '居间' && this.centerEnterpriseList) {
-            let is = this.centerEnterpriseList.some(item => item.sys_enterpriseid == this.form.sys_enterpriseid)
-            if (is) {
-              this.$confirm('该项目商机已存在居间服务商,不可创建','提示',{
-                cancelButtonText:'取消',
-                showConfirmButton:false
-              }).then(() => {
-                this.$store.commit('setLoading',false)
-              })
+          if (this.$route.query.type == '居间') {
+
+            if (this.$route.query.type == '直销项目') {
+              this.form.type = '项目'
+              this.form.typemx = '直销'
+            } else if (this.$route.query.type == '经销项目') {
+              this.form.type = '项目'
+              this.form.typemx = '经销'
             } else {
-              if (this.$route.query.type == '直销项目') {
-                this.form.type = '项目'
-                this.form.typemx = '直销'
-              } else if (this.$route.query.type == '经销项目') {
-                this.form.type = '项目'
-                this.form.typemx = '经销'
-              } else {
-                this.form.type = this.$route.query.type
-              }
+              this.form.type = this.$route.query.type
+            }
 
-              this.form.discountrate ? this.form.discountrate =  (this.form.discountrate / 100).toFixed(4) : ''
-              this.form.productdiscount ? this.form.productdiscount =  (this.form.productdiscount / 100).toFixed(4) : ''
-              this.form.orderratio ? this.form.orderratio =  (this.form.orderratio / 100).toFixed(4) : ''
-              let res = await this.$api.requested({
-                "id":20221121185302,
-                "content": this.form
-              })
-              if (res.code == 0){
-                this.form.discountrate = this.form.discountrate * 100
-                this.form.productdiscount = this.form.productdiscount * 100
-                this.form.orderratio = this.form.orderratio * 100
-              }
-              this.tool.showMessage(res,() => {
-                this.$store.commit('setLoading',false)
-                this.$store.dispatch('DrawerShowChange',false)
-                this.$store.dispatch('changeDetailDrawer',true)
-                this.$router.push({path:'/contractDetail',query:{type:this.$route.query.type,id:res.data.sa_contractid,rowindex:res.data.rowindex}})
-              })
+            this.form.discountrate ? this.form.discountrate =  (this.form.discountrate / 100).toFixed(4) : ''
+            this.form.productdiscount ? this.form.productdiscount =  (this.form.productdiscount / 100).toFixed(4) : ''
+            this.form.orderratio ? this.form.orderratio =  (this.form.orderratio / 100).toFixed(4) : ''
+            let res = await this.$api.requested({
+              "id":20221121185302,
+              "content": this.form
+            })
+            if (res.code == 0){
+              this.form.discountrate = this.form.discountrate * 100
+              this.form.productdiscount = this.form.productdiscount * 100
+              this.form.orderratio = this.form.orderratio * 100
+              this.$store.commit('setLoading',false)
             }
+            this.tool.showMessage(res,() => {
+              this.$store.commit('setLoading',false)
+              this.$store.dispatch('DrawerShowChange',false)
+              this.$store.dispatch('changeDetailDrawer',true)
+              this.$router.push({path:'/contractDetail',query:{type:this.$route.query.type,id:res.data.sa_contractid,rowindex:res.data.rowindex}})
+            })
+
           } else {
             /* 其它新建 */
             if (this.$route.query.type == '直销项目') {

+ 1 - 1
src/HDrpManagement/customerPortrait/modules/detail.vue

@@ -182,7 +182,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].quotedpriceamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate || '--',bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>

+ 10 - 4
src/HDrpManagement/orderManage/modules/add.vue

@@ -51,7 +51,7 @@
                   placement="bottom"
                   trigger="click"
                   v-model="visible">
-                  <orderCanUseContract ref="contract" @listCreate="listCreate" ismanage="1" @rowClick="contractClick"></orderCanUseContract>
+                  <orderCanUseContract ref="contract" @listCreate="listCreate" ismanage="1" @rowClick="contractClick" @inputChange="inputChange"></orderCanUseContract>
                   <el-input readonly v-model="form.contractname" slot="reference" placeholder="选择合同"></el-input>
                 </el-popover>
               </el-form-item>
@@ -231,7 +231,7 @@ export default {
       this.specordermx()
     },
     submitForm() {
-      console.log(this.form)
+      console.log(this.form,'form')
       this.$refs['form'].validate(async valid => {
         if (!valid) return
         if (this.form.type === '工具订单') {
@@ -294,6 +294,7 @@ export default {
       this.form.sa_projectid = row.sa_projectid
       this.form.contractname = row.title === ''?'未知':row.title
       this.visible = false
+      this.$refs.form.validateField('contractname')
     },
     setChildField (item) {
       this.childField = item.subvalues
@@ -329,18 +330,23 @@ export default {
         "type": "", //订单类型
         "typemx": "", //明细分类,可选
         "remarks": "", //可选
-        "saler_hrid":0,//销售人员hrid,业务员hrid
         "tradefield":"",//必选
         "pay_enterpriseid": 0, //结算单位
         "rebate_used":0,//默认0,是否使用返利金
         "billdate":"",//单据日期,默认创建日期
-        "signbacknum":""
+        "signbacknum":"",
+        "promname":"",
+        "projectnote":"",
+        "contractname":''
       }
       if( this.$refs['enterprise'] ) {
         this.$refs['enterprise'].form.enterprisename = ''
       }
       this.visible1 = false
       this.visible = false
+    },
+    inputChange(){
+      this.$refs.form.clearValidate('contractname')
     }
   }
 }

+ 66 - 8
src/HDrpManagement/projectChange/modules/modules/quotation/modules/add.vue

@@ -9,7 +9,7 @@
         append-to-body
         :show-close="false"
         @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
+      <div class="drawer__panel" >
         <el-row style="margin-top: 10px" :gutter="10">
           <el-form ref="form" :model="form" :rules="rules" label-position="right" size="mini">
             <el-col :span="24">
@@ -94,7 +94,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group >
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
@@ -103,7 +103,7 @@
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group disabled>
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
@@ -115,6 +115,11 @@
                 </div>
               </el-form-item>
             </el-col>
+            <el-col  :span="24" >
+              <el-form-item label="报价金额:" label-width="100px" prop="quotedpriceamount">
+                <el-input  v-model="form.quotedpriceamount" autocomplete="off" placeholder="报价金额" @change="quotedpriceamountChange(form.quotedpriceamount)"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col  :span="24">
               <el-form-item label="报价日期:" label-width="100px">
                 <el-date-picker
@@ -178,12 +183,17 @@
                 <el-input  v-model="form.remarks" autocomplete="off" placeholder="请输入备注信息" type="textarea" autosize></el-input>
               </el-form-item>
             </el-col>
+            <el-col  :span="24">
+              <el-form-item label="附件上传:" label-width="100px" prop="remarks">
+                <upload @uploadGet="loading = true"  ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" :ownerid=ownerid @onSuccess="uploadSuccess"></upload>
+              </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" type="primary" @click="getSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" @click="onClose" class="normal-btn-width" :disabled="loading">取 消</el-button>
+        <el-button  size="small" type="primary" @click="getSubmit" class="normal-btn-width" :loading="loading">确 定</el-button>
       </div>
     </el-drawer>
   </div>
@@ -192,11 +202,11 @@
 <script>
 import quotedPriceProduct from '@/SDrpManagement/QuotedPrice/components/quotedPriceProduct'
 import contactsNewTemplate from '@/template/contactsNewTemplate/index1'
-
+import upload from '@/template/upload/index'
 export default {
   name: "add",
   props:["data","flagTag"],
-  components:{quotedPriceProduct,contactsNewTemplate},
+  components:{quotedPriceProduct,contactsNewTemplate,upload},
   data(){
     var discountrate = (rule,value,callback) =>{
       if (this.form.discountrate < 0 || this.form.discountrate > 100){
@@ -206,6 +216,9 @@ export default {
       }
     }
     return {
+      ownerid:'',
+      loading:false,
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
       dialogFormVisible:false,
       projectShow:false,
       customerShow:false,
@@ -305,7 +318,8 @@ export default {
           "1、报价为含税13%税率,含运费",
           "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
         ],
-        source:1
+        source:1,
+        iscreatenewid:0
       },
       rules:{
         projectname:[
@@ -323,6 +337,13 @@ export default {
         discountrate:[
           { required: false, validator: discountrate, trigger: 'change'},
         ],
+        quotedpriceamount:[
+          { required: true, message: '请填写报价金额', trigger: 'blur'},
+          { pattern:/^[0-9]+\.{0,1}[0-9]{0,4}$/,message: '输入不合法,请输入数值',trigger: 'blur'},
+        ],
+        name:[
+          { required: true, message: '请选择联系人', trigger: 'change'},
+        ]
       },
       itemtype:[],
       isPhone:true,
@@ -338,6 +359,7 @@ export default {
         this.$message.error('当前项目报备审核未通过,不可创建报价单');
       }else {
         this.dialogFormVisible = true
+        this.queryID()
       }
     },
     onClose(){
@@ -402,6 +424,7 @@ export default {
     /*提交*/
     getSubmit(){
       this.dialogFormVisible = false
+      this.loading = true
       if (this.form.date.length === 0){
         this.form.begdate = ''
         this.form.enddate = ''
@@ -413,11 +436,16 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
         this.form.discountrate = this.form.discountrate / 100
+        this.form.sa_quotedpriceid = this.ownerid
         const res = await this.$api.requested({
           "id": 20221020164803,
           "content": this.form
         })
+        if (res.code == 0){
+          this.loading = false
+        }
         this.tool.showMessage(res,() => {
+          this.loading = false
           /*this.changeData(this.productObj)*/
           this.$emit('addSuccess')
           let route = this.$route
@@ -583,6 +611,36 @@ export default {
         this.telephone = ''
       }
     },
+    async queryID(){
+      const res = await this.$api.requested({
+        "id": 202400904102104,
+        "content": {}
+      })
+      this.ownerid = res.data
+    },
+    async uploadSuccess(){
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sa_quotedprice',
+          "ownerid": this.ownerid,
+          "usetype":""
+        }
+      })
+      this.$refs.uploadRef.listFile = res.data.map(item=>{
+        return {
+          "name":item.document,
+          "url":item.url,
+          "linksid":item.linksid
+        }
+
+      })
+      this.loading = false
+    },
+    quotedpriceamountChange(data){
+      this.form.quotedpriceamount = Math.round(data * 100)/100
+    }
   },
   mounted() {
     const date = new Date()

+ 1 - 1
src/HDrpManagement/projectPortrait/modules/detail.vue

@@ -269,7 +269,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || 0),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].quotedpriceamount || 0),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate || '--',bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>

+ 1 - 1
src/HDrpManagement/salerPortrait/modules/detail.vue

@@ -363,7 +363,7 @@
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].quotedpriceamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate || '--',bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>

+ 8 - 5
src/HManagement/archvies_mag/index.vue

@@ -8,9 +8,9 @@
         </template>
         <template  v-else>
           <el-button-group slot="btngroup">
-            <download v-if="tool.checkAuth($route.name,'download')" :checklist="checklist"></download>
-            <delete-file v-if="tool.checkAuth($route.name,'delete')" :checklist="checklist" @onSuccess="onSuccess"></delete-file>
-            <more-operation v-if="tool.checkAuth($route.name,'update')" ref="edit" :checklist="checklist" @restName="restName" @onSuccess="onSuccess" @changeAuthData="changeAuth"></more-operation>
+            <download v-if="tool.checkAuth($route.name,'download')" :checklist="checklist" :isRest="isRest"></download>
+            <delete-file v-if="tool.checkAuth($route.name,'delete')" :checklist="checklist" @onSuccess="onSuccess" :isRest="isRest"></delete-file>
+            <more-operation v-if="tool.checkAuth($route.name,'update')" ref="edit" :checklist="checklist" @restName="restName" @onSuccess="onSuccess" @changeAuthData="changeAuth" :isRest="isRest"></more-operation>
           </el-button-group>
         </template>
       </list>
@@ -50,13 +50,15 @@ export default {
     return {
       showBtnGroup:false,
       folderid:JSON.parse(sessionStorage.getItem('folderid')).salematerialfolderid,
-      checklist:[]
+      checklist:[],
+      isRest:false,
     }
   },
   methods:{
     // 监听修改文件夹名称,失去焦点执行
     onNameChange (folder) {
       folder.attachmentid ? this.$refs.edit.confirmRestName(folder) : this.$refs.add.createFolderComplete(folder)
+      this.isRest = false
     },
 
     // 监听创建成功
@@ -70,7 +72,7 @@ export default {
     // 监听文件选择
     folderChecked (arr) {
       this.checklist = arr
-      if (arr.length > 0) {
+      if (arr.length > 0 || this.isRest) {
         this.showBtnGroup = true
       } else {
         this.showBtnGroup = false
@@ -82,6 +84,7 @@ export default {
     },
     // 监听重命名
     restName () {
+      this.isRest = true
       this.checklist[0].newfolder = true
       let obj = this.checklist[0]
       this.$refs.list.list.forEach((e,index) => {

+ 4 - 4
src/HManagement/archvies_mag/modules/delete.vue

@@ -1,11 +1,11 @@
 <template>
-    <el-button icon="el-icon-delete" size="small" @click="clickDelete">删 除</el-button>
+    <el-button icon="el-icon-delete" size="small" @click="clickDelete" :disabled="isRest">删 除</el-button>
 </template>
 
 <script>
 import { Loading } from 'element-ui';
 export default {
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {
       filecount:0
@@ -27,7 +27,7 @@ export default {
         this.$message({
           type: 'info',
           message: '已取消删除'
-        });          
+        });
       });
     },
     async deleteFiles (id) {
@@ -61,4 +61,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 2 - 2
src/HManagement/archvies_mag/modules/download.vue

@@ -1,10 +1,10 @@
 <template>
-  <el-button icon="el-icon-download" size="small" @click="clickDownload" v-show="checklist.length === 1">下 载</el-button>
+  <el-button icon="el-icon-download" size="small" @click="clickDownload" v-show="checklist.length === 1 || isRest"  :disabled="isRest">下 载</el-button>
 </template>
 
 <script>
 export default {
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {}
   },

+ 3 - 3
src/HManagement/archvies_mag/modules/moreOperation.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-dropdown style="border-left:1px solid #dcdfe6" v-show="checklist.length === 1" >
+  <el-dropdown style="border-left:1px solid #dcdfe6" v-show="checklist.length === 1" :disabled="isRest">
     <el-button size="small">
       <i class="el-icon-more"></i>
     </el-button>
@@ -26,7 +26,7 @@ export default {
   components:{
     modifyLocation
   },
-  props:['checklist'],
+  props:['checklist','isRest'],
   data () {
     return {
       urlDialog:false,
@@ -96,4 +96,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 1 - 1
src/HManagement/department/staff/list/modules/edit.vue

@@ -271,7 +271,7 @@ export default {
       this.form = Object.assign({},this.form, res.data)
       /*this.form.discountrate = Math.round((this.form.discountrate*100)*100)/100*/
       this.issalehr = this.form.issalehr
-      this.salerList = res.data.salearearows.map(item=>{
+      this.salerList = res.data.salearea.map(item=>{
         return {
           "name":this.form.name,
           "areaname":item.areaname,

+ 21 - 21
src/HManagement/marketing2/saler/area/detail/modules/Prortraitdetail.vue

@@ -42,7 +42,7 @@
               <myRadio :value1="param1.content" key1="type" @clickBtn="getPerformance" :btnOptions="[{label:'本年',value:3},{label:'本季',value:2},{label:'本月',value:1}]">
               </myRadio>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {custom:'dingdan',data:performance,title:'订单目标',value2descript:'差额',value:performance.orderCR,value2:unitCompile(performance.amount - performance.target_l),bg:'#F3F9FC',color:'#3874F6'},
@@ -85,7 +85,7 @@
                 <el-option :label="item.value" :value="item.value" v-for="(item,index) in orderTypeList" :key="index"></el-option>
               </el-select>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'订单数量',value:$refs.dingdan && $refs.dingdan.list && $refs.dingdan.list[0] && $refs.dingdan.list[0].allOrderQty,bg:'#F3F9FC',color:'#3874F6'},
@@ -97,7 +97,7 @@
               ]"
             ></myCard>
             <showIsNone title="订单明细">
-            <pageTable 
+            <pageTable
               ref="dingdan"
               :tablecols="tool.tabelCol($route.name).orderTable.tablecols"
               :param="param2"
@@ -136,7 +136,7 @@
               <myRadio :value1="param3.content" key1="type" @clickBtn="refreshTable('param3','xiansuo');param8.content.type=param3.content.type;refreshTable('param8','fllow')" :btnOptions="[{label:'本年',value:3},{label:'本季',value:2},{label:'本月',value:1}]">
               </myRadio>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'线索数',value:$refs.xiansuo && $refs.xiansuo.list[0] && $refs.xiansuo.list[0].orderclueSize,bg:'#F3F9FC',color:'#3874F6'},
@@ -148,7 +148,7 @@
             >
             </myCard>
             <showIsNone title="销售线索明细">
-            <pageTable 
+            <pageTable
               ref="xiansuo"
               :tablecols="tool.tabelCol($route.name).orderclueList.tablecols"
               :param="param3"
@@ -169,7 +169,7 @@
             </showIsNone>
 
             <showIsNone title="线索跟进记录明细">
-            <pageTable 
+            <pageTable
               ref="fllow"
               :tablecols="tool.tabelCol($route.name).clueFollow.tablecols"
               :param="param8"
@@ -204,7 +204,7 @@
             >
             </myCard>
             <showIsNone title="客户明细">
-            <pageTable 
+            <pageTable
               ref="kehu"
               :tablecols="tool.tabelCol($route.name).publicCustomerTable.tablecols"
               :param="param4"
@@ -212,10 +212,10 @@
             >
             <template v-slot:custom="scope">
               <div v-if="scope.data.columnname == 'sys_tag'">
-                <el-tag size="mini" v-for="(item,index) in scope.data.data.sys_tag" :key="index">{{ item }}</el-tag>  
+                <el-tag size="mini" v-for="(item,index) in scope.data.data.sys_tag" :key="index">{{ item }}</el-tag>
               </div>
               <div v-else-if="scope.data.columnname == 'industry'">
-                <el-tag size="mini" v-for="(item,index) in scope.data.data.industry" :key="index">{{ item }}</el-tag>  
+                <el-tag size="mini" v-for="(item,index) in scope.data.data.industry" :key="index">{{ item }}</el-tag>
               </div>
               <div v-else>
                 {{ scope.data.data[scope.data.columnname] }}
@@ -225,7 +225,7 @@
             </showIsNone>
 
             <showIsNone title="客户跟进记录明细">
-            <pageTable 
+            <pageTable
               ref="fllowkehu"
               :tablecols="tool.tabelCol($route.name).customerFollow.tablecols"
               :param="param9"
@@ -249,7 +249,7 @@
               <myRadio :value1="param5.content" key1="type" @clickBtn="refreshTable('param5','project');param10.content.type=param5.content.type;refreshTable('param10','projectfllow')" :btnOptions="[{label:'本年',value:3},{label:'本季',value:2},{label:'本月',value:1}]">
               </myRadio>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'项目数',value:$refs.project && $refs.project.list && $refs.project.list[0] && $refs.project.list[0].projectSize,bg:'#F3F9FC',color:'#3874F6'},
@@ -261,7 +261,7 @@
             ></myCard>
 
             <showIsNone title="项目明细">
-            <pageTable 
+            <pageTable
               ref="project"
               :tablecols="tool.tabelCol($route.name).competeProjectsTable.tablecols"
               :param="param5"
@@ -285,7 +285,7 @@
             </showIsNone>
 
             <showIsNone title="项目跟进记录明细">
-            <pageTable 
+            <pageTable
               ref="projectfllow"
               :tablecols="tool.tabelCol($route.name).projectFollow.tablecols"
               :param="param10"
@@ -310,16 +310,16 @@
               <myRadio :value1="param6.content" key1="isAll" @clickBtn="refreshTable('param6','baojiadan')" :btnOptions="[{label:'全部',value:1},{label:'本年',value:0}]">
               </myRadio>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'报价次数',value:$refs.baojiadan && $refs.baojiadan.total,bg:'#F3F9FC',color:'#3874F6'},
-                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].sumamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
+                {title:'最近报价金额',value:unitCompile($refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].quotedpriceamount || '0'),bg:'#E8F7EC',color:'#78B32B'},
                 {title:'最近报价时间',value:$refs.baojiadan && $refs.baojiadan.list && $refs.baojiadan.list[0] && $refs.baojiadan.list[0].submitdate || '--',bg:'#F9F2E5',color:'#FF7603'},
               ]"
             ></myCard>
             <showIsNone title="报价单明细">
-            <pageTable 
+            <pageTable
               ref="baojiadan"
               :tablecols="tool.tabelCol($route.name).quotedPriceTable.tablecols"
               :param="param6"
@@ -357,7 +357,7 @@
                 <el-option :label="item.remarks" :value="item.value" v-for="(item,index) in contractTypeList" :key="index"></el-option>
               </el-select>
             </div>
-            <myCard 
+            <myCard
               :list="
               [
                 {title:'合同总数',value:$refs.hetong && $refs.hetong.list && $refs.hetong.list[0] && $refs.hetong.list[0].allQty,bg:'#F3F9FC',color:'#3874F6'},
@@ -371,7 +371,7 @@
               ]"
             ></myCard>
             <showIsNone title="合同明细">
-            <pageTable 
+            <pageTable
               ref="hetong"
               :tablecols="tool.tabelCol($route.name).contractTable.tablecols"
               :param="param7"
@@ -390,9 +390,9 @@
           </el-card>
         </div>
 
-  
+
       </div>
-      
+
     </div>
   </el-drawer>
 </template>
@@ -603,7 +603,7 @@ export default {
 }
 
 /deep/.el-drawer {
-  background:#F5F5F5 !important; 
+  background:#F5F5F5 !important;
 }
 /deep/.el-drawer__header{
   display: none !important;

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

@@ -268,7 +268,7 @@ export default {
         },
         {
           label:'总金额(元)',
-          value:this.mainData.sumamount ? this.tool.formatAmount(this.mainData.sumamount,2) : '--'
+          value:this.mainData.quotedpriceamount ? this.tool.formatAmount(this.mainData.quotedpriceamount,2) : '--'
         },
         {
           label:'客户名称',
@@ -343,7 +343,7 @@ export default {
             },
             {
               label:'总金额(元)',
-              value:this.mainData.sumamount ? this.tool.formatAmount(this.mainData.sumamount,2) : '--'
+              value:this.mainData.quotedpriceamount ? this.tool.formatAmount(this.mainData.quotedpriceamount,2) : '--'
             },
             {
               label:'是否特价',

+ 70 - 30
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAdd.vue

@@ -8,7 +8,7 @@
         append-to-body
         :show-close="false"
         @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
+      <div class="drawer__panel">
         <el-row style="margin-top: 10px" :gutter="10">
           <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
             <el-col :span="24">
@@ -68,36 +68,22 @@
                 </el-popover>
               </el-form-item>
             </el-col>
-
-<!--            <el-col  :span="24">
-              <el-form-item label="联系人:" label-width="100px" prop="name">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="contactsShow"
-                    @show="contactsList">
-                  <selectTemplate type="联系人" ref="contactTemplate" :param="contactsParam" @selectData="contactsData"></selectTemplate>
-                  <el-input slot="reference" :readonly="true" v-model="form.name" autocomplete="off" placeholder="请选择联系人" :disabled="form.sys_enterpriseid === ''" ></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>-->
             <el-col  :span="24">
               <el-form-item label="联系人:" label-width="100px" prop="name">
                 <contactsNewTemplate ref="contactsRef"  :sys_enterpriseid="form.sys_enterpriseid" :sa_projectid="form.sa_projectid" :name="form.name"  :disabled="form.sys_enterpriseid === ''" @contactData="contactData" @inputChange="inputChange" @focus="$refs.contactsRef.listData($refs.contactsRef.param.content.pageNumner = 1)" placement="left-start"></contactsNewTemplate>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group >
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
                 </el-button-group>
-                <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" @input="telephoneChange('手机')"></el-input>
+                <el-input v-model="phonenumber" disabled placeholder="请输入手机号" style="width: 100%;margin-top: 10px" ></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24" v-if="!isPhone">
-              <el-form-item label="联系方式:" label-width="100px" >
+              <el-form-item label="联系方式:" label-width="100px" :rules="{ required: true, message: '请输入联系方式', trigger: 'change'}">
                 <el-button-group disabled>
                   <el-radio v-model="isPhone" :label="true" disabled>手机号</el-radio>
                   <el-radio v-model="isPhone" :label="false" disabled>座机电话</el-radio>
@@ -109,6 +95,11 @@
                 </div>
               </el-form-item>
             </el-col>
+            <el-col  :span="24" >
+              <el-form-item label="报价金额:" label-width="100px" prop="quotedpriceamount">
+                <el-input  v-model="form.quotedpriceamount" autocomplete="off" placeholder="报价金额" @change="quotedpriceamountChange(form.quotedpriceamount)"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col  :span="24">
               <el-form-item label="报价日期:" label-width="100px">
                 <el-date-picker
@@ -174,11 +165,16 @@
                 <el-input  v-model="form.remarks" autocomplete="off" placeholder="请输入备注信息" type="textarea" autosize></el-input>
               </el-form-item>
             </el-col>
+            <el-col  :span="24">
+              <el-form-item label="附件上传:" label-width="100px" prop="remarks">
+                <upload @uploadGet="loading = true"  ref="uploadRef" class="inline-16" :folderid="folderid" :bindData="{ ownertable: 'sa_quotedprice', ownerid: ownerid, usetype: 'default' }" :ownerid=ownerid @onSuccess="uploadSuccess"></upload>
+              </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" @click="onClose" class="normal-btn-width" :disabled="loading">取 消</el-button>
         <el-button  size="small" type="primary" @click="getSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -192,10 +188,11 @@ import {mapGetters} from "vuex";
 
 import selectTemplate from '@/template/quotation/index.vue'
 import contactsNewTemplate from '@/template/contactsNewTemplate/index1'
+import upload from '@/template/upload/index'
 export default {
   name: "ProjectQuotationAdd",
   props:["drawerShow","typeData"],
-  components:{quoted_price_product,selectSalesman,selectTemplate,contactsNewTemplate},
+  components:{quoted_price_product,selectSalesman,selectTemplate,contactsNewTemplate,upload},
   data(){
     var discountrate = (rule,value,callback) =>{
       if (this.form.discountrate < 0 || this.form.discountrate > 100){
@@ -205,6 +202,8 @@ export default {
       }
     }
     return {
+      ownerid:'',
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
       search:'',
       title:'',
       projectShow:false,
@@ -300,7 +299,9 @@ export default {
         quotedpricenotes: [
           "1、报价为含税13%税率, 含运费 ",
           "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
-        ]
+        ],
+        quotedpriceamount:'',
+        iscreatenewid:0
       },
       rules:{
         projectname:[
@@ -318,22 +319,27 @@ export default {
         discountrate:[
           { required: false, validator: discountrate, trigger: 'change'},
         ],
-        /*name:[
+        quotedpriceamount:[
+          { required: true, message: '请填写报价金额', trigger: 'blur'},
+          { pattern:/^[0-9]+\.{0,1}[0-9]{0,4}$/,message: '输入不合法,请输入数值',trigger: 'blur'},
+        ],
+        name:[
           { required: true, message: '请选择联系人', trigger: 'change'},
-        ]*/
+        ]
       },
       itemtype:[],
       isPhone:true,
       areaCode:'',
       telephone:'',
-      phonenumber:''
+      phonenumber:'',
+      loading:false
     }
   },
-  computed:{
+  /*computed:{
     ...mapGetters({
       loading:'loading'
     })
-  },
+  },*/
   methods:{
     onClose(){
       this.drawer = false
@@ -401,14 +407,20 @@ export default {
 
       this.$refs.form.validate(async (valid) => {
         if (!valid) return false
-        this.$store.commit('setLoading',true)
+        /*this.$store.commit('setLoading',true)*/
+        this.loading = true
         this.form.discountrate = this.form.discountrate?(this.form.discountrate / 100).toFixed(4):''
+        this.form.sa_quotedpriceid = this.ownerid
         const res = await this.$api.requested({
           "id": 20221020164803,
           "content": this.form
         })
+        if (res.code == 0){
+          this.loading = false
+        }
         this.tool.showMessage(res,() => {
-          this.$store.commit('setLoading',false)
+          /*this.$store.commit('setLoading',false)*/
+          this.loading = false
           this.drawer = false
           this.$emit('addSuccess')
           this.$store.dispatch('changeDetailDrawer',true)
@@ -585,9 +597,36 @@ export default {
         this.telephone = ''
       }
     },
+    async queryID(){
+      const res = await this.$api.requested({
+        "id": 202400904102104,
+        "content": {}
+      })
+      this.ownerid = res.data
+    },
+    async uploadSuccess(){
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sa_quotedprice',
+          "ownerid": this.ownerid,
+          "usetype":""
+        }
+      })
+      this.$refs.uploadRef.listFile = res.data.map(item=>{
+        return {
+          "name":item.document,
+          "url":item.url,
+          "linksid":item.linksid
+        }
 
-
-
+      })
+      this.loading = false
+    },
+    quotedpriceamountChange(data){
+      this.form.quotedpriceamount = Math.round(data * 100)/100
+    }
   },
   mounted() {
     if (this.drawerShow){this.drawer = true}
@@ -603,6 +642,7 @@ export default {
     this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
     this.form.sa_quotedpriceid = 0
     this.queryItemType()
+    this.queryID()
   },
   created() {
 

+ 0 - 921
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAddCopy1.vue

@@ -1,921 +0,0 @@
-<template>
-  <div>
-    <el-drawer
-        :title="title"
-        :visible.sync="drawer"
-        size="600px"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
-        <el-row style="margin-top: 10px" :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
-            <el-col :span="24">
-              <el-form-item label="报价类型:" label-width="100px" >
-                <el-input v-model="form.type" autocomplete="off" placeholder="报价类型" disabled></el-input>
-              </el-form-item>
-            </el-col>
-<!--            <el-col  :span="24">
-              <el-form-item label="是否特价:" label-width="100px" >
-                <el-input  v-model="form.specialOffer" autocomplete="off" placeholder="是否特价" disabled></el-input>
-              </el-form-item>
-            </el-col>-->
-            <el-col  :span="24" v-if="isQuotedPrice">
-              <el-form-item label="项目名称:" label-width="100px" prop="projectname">
-                <el-popover
-                    placement="bottom"
-                    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" @row-click="projectData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
-                    <el-table-column
-                        label="项目编号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.projectnum?scope.row.projectnum:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="项目名称"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.projectname?scope.row.projectname:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="地址"
-                    >
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        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" :readonly="true"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"   @input="selectProject"></el-input>
-                </el-popover>
-
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24" 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="24" v-if="isQuotedPrice">
-              <el-form-item label="客户名称:" label-width="100px" prop="enterprisename">
-                <el-popover
-                    placement="bottom"
-                    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" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
-                    <el-table-column
-                        label="客户编号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="客户名称"
-                        width="200">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="地址"
-                    >
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        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" :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户" :disabled="form.sa_projectid === ''"  @input="selectCustomer"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="客户名称:" label-width="100px" prop="enterprisename" v-if="!isQuotedPrice">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="customerShow"
-                    @show="customerList">
-                  <el-tabs type="border-card" v-model="activeName"  @tab-click="handleClick">
-                    <el-tab-pane label="客户" name="客户">
-                      <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" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
-                        <el-table-column
-                            label="客户编号"
-                            width="180">
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
-                          </template>
-                        </el-table-column>
-                        <el-table-column
-                            label="客户名称"
-                            width="200">
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
-                          </template>
-                        </el-table-column>
-                        <el-table-column
-                            label="地址"
-                        >
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                          </template>
-                        </el-table-column>
-                      </el-table>
-                      <div class="container normal-panel" style="text-align:right">
-                        <el-pagination
-                            background
-                            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-tab-pane>
-                    <el-tab-pane label="合作伙伴" name="合作伙伴">
-                      <el-input
-                          style="width:300px;margin-bottom: 10px"
-                          placeholder="请输入内容"
-                          v-model="customerParam.content.where.condition"
-                          clearable
-                          @clear="distributorList(customerParam.content.pageNumber = 1)"
-                          size="mini"
-                          @keyup.enter.native="distributorList(customerParam.content.pageNumber = 1)">
-                        <i slot="prefix" class="el-icon-search" @click="distributorList(customerParam.content.pageNumber = 1)"></i>
-                      </el-input>
-                      <el-table :data="distributor.distributorData" @row-click="distributorData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
-                        <el-table-column
-                            label="客户编号"
-                            width="180">
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
-                          </template>
-                        </el-table-column>
-                        <el-table-column
-                            label="客户名称"
-                            width="200">
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
-                          </template>
-                        </el-table-column>
-                        <el-table-column
-                            label="地址"
-                        >
-                          <template slot-scope="scope">
-                            <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                          </template>
-                        </el-table-column>
-                      </el-table>
-                      <div class="container normal-panel" style="text-align:right">
-                        <el-pagination
-                            background
-                            small
-                            @size-change="handleSizeChangeDistributor"
-                            @current-change="handleCurrentChangeDistributor"
-                            :page-sizes="[10,20,50,100]"
-                            layout="total,sizes, prev, pager, next, jumper"
-                            :current-page="distributor.currentPage"
-                            :total="distributor.total">
-                        </el-pagination>
-                      </div>
-                    </el-tab-pane>
-                  </el-tabs>
-                  <el-input slot="reference"  :readonly="true"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-
-            <el-col  :span="24">
-              <el-form-item label="联系人:" label-width="100px" prop="name">
-                <el-popover
-                    placement="bottom"
-                    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" @row-click="contactsData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
-                    <el-table-column
-                        label="姓名"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.name?scope.row.name:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="手机号"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.phonenumber?scope.row.phonenumber:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="邮箱"
-                        width="180">
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.email?scope.row.email:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                    <el-table-column
-                        label="地址"
-                    >
-                      <template slot-scope="scope">
-                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                  <div class="container normal-panel" style="text-align:right">
-                    <el-pagination
-                        background
-                        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" :readonly="true" v-model="form.name" autocomplete="off" placeholder="请选择联系人" :disabled="form.sys_enterpriseid === ''"  @input="selectContacts"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <el-form-item label="联系人手机号:" label-width="100px" >
-                <el-input  v-model="form.phonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <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="24">
-              <el-form-item label="报价日期:" label-width="100px">
-                <el-date-picker
-                    v-model="form.billdate"
-                    style="width: 100%"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="有效期:" label-width="100px" prop="date">
-                <el-date-picker
-                    v-model="form.date"
-                    style="width: 100%"
-                    type="daterange"
-                    value-format="yyyy-MM-dd"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24" >
-              <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="24">
-              <el-form-item label="折扣(%):" label-width="100px" prop="discountrate">
-                <el-input type="number" v-model="form.discountrate" autocomplete="off" placeholder="请输入0-100%"  @change="discountrateChange"></el-input>
-              </el-form-item>
-            </el-col>-->
-            <el-col  :span="24">
-              <el-form-item label="业务员:" label-width="100px" prop="salername">
-                <el-popover
-                    placement="bottom"
-                    trigger="manual"
-                    v-model="salesmanVisible"
-                    width="500">
-                  <selectSalesman  ref="selectSalesman"  :radio="true" @onSelect="salesmanChange" @onCancel="salesmanVisible = false"></selectSalesman>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange" v-model="form.salername" placeholder="请选择业务员"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <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>
-<!--      <div >
-        <el-divider></el-divider>
-      </div>
-      <div style="margin:20px 20px 20px 20px">
-        <quoted_price_product :sa_projectid="form.sa_projectid" :type="form.type" ref="quoterPrice" @checkFormImport="onCheckFormImport" @checkForm="onSubmit" @checkFormProject="onSubmit" @productData="productDataChange"></quoted_price_product>
-      </div>-->
-      <div class="fixed__btn__panel">
-        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button  size="small" type="primary" @click="getSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
-      </div>
-    </el-drawer>
-  </div>
-</template>
-
-<script>
-import quoted_price_product from '../components/quotedPriceProduct'
-import selectSalesman from '../components/selectSalesman'
-import {mapGetters} from "vuex";
-export default {
-  name: "ProjectQuotationAdd",
-  props:["drawerShow","typeData"],
-  components:{quoted_price_product,selectSalesman},
-  data(){
-    var discountrate = (rule,value,callback) =>{
-      if (this.form.discountrate < 0 || this.form.discountrate > 100){
-        callback(new Error('请输入0-100%'))
-      } else {
-        callback();
-      }
-    }
-    return {
-      search:'',
-      title:'',
-      projectShow:false,
-      customerShow:false,
-      contactsShow:false,
-      salesmanVisible:false,
-      activeName:'客户',
-      projectParam:{
-        "id": 20221020143503,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 10,
-          "type":1, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
-          "where": {
-            "condition": "",
-            "startdate": "",
-            "enddate": "",
-            "status":"",//跟进中、已成交、已失败
-            "projecttype":"",
-            "stagename":"",
-            "tag":""
-          }
-        },
-      },
-      project:{
-        projectData:[],
-        total:0,
-        currentPage:0,
-      },
-      customerParam:{
-        "id": 20220920083901,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where": {
-            "condition": "",
-            "type":4,
-            "sa_projectid":""
-          }
-        }
-      },
-      customer:{
-        customerData:[],
-        total:0,
-        currentPage:0,
-      },
-      distributor:{
-        distributorData:[],
-        total:0,
-        currentPage:0
-      },
-      contactsParam:{
-        "id": "20221022165503",
-        "version": 1,
-        "content": {
-          "sys_enterpriseid":"",
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where": {
-            "condition": "",
-            "workaddress": 0//0表示人,1表示地址
-          }
-        }
-      },
-      salerParam:{
-        "id":20230306144402,
-        "content":{
-          "type":'',////type:1客户2:项目
-          "sys_enterpriseid":'',//type=1
-          "sa_projectid":'' //type=2时传
-        }
-      },
-      contacts:{
-        contactsData:[],
-        total:0,
-        currentPage:0,
-      },
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() + 3600 * 1000 * 24 < Date.now() ;
-        },
-      },
-      drawer:false,
-      isQuotedPrice:false,
-      date:[],
-      productObj:{},
-      form:{
-        date:[],
-        totalPrice:'',
-        type:'',
-        projectnum:'',
-        enterprisename:'',
-        name:'',
-        phonenumber:'',
-        fax:'',
-        telephone:'',
-        specialOffer:'否',
-        sa_quotedpriceid:0,     //sat_notice_classid<=0时 为新增
-        sys_enterpriseid: "",
-        contactsid:0,
-        sa_projectid: "",
-        discountrate: '',
-        remarks: "",
-        invaliddate: "",
-        projectname: "",
-        address: "",
-        billdate:"",
-        enddate:'',
-        begdate:'',
-        saler_hrid:'',
-        salername:'',
-        itemtype:[],
-        quotedpricenotes: [
-          "1、报价为含税13%税率, 含运费 ",
-          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
-        ]
-      },
-      rules:{
-        projectname:[
-          { required: true, message: '请选择项目', trigger: 'change'},
-        ],
-        enterprisename:[
-          { required: true, message: '请选择客户', trigger: 'change'},
-        ],
-        date:[
-          { required: true, message: '请选择有效期', trigger: 'change'},
-        ],
-        itemtype:[
-          { required: true, message: '请选择产品系列', trigger: 'change'},
-        ],
-        discountrate:[
-          { required: false, validator: discountrate, trigger: 'change'},
-        ],
-        /*name:[
-          { required: true, message: '请选择联系人', trigger: 'change'},
-        ]*/
-      },
-      itemtype:[]
-    }
-  },
-  computed:{
-    ...mapGetters({
-      loading:'loading'
-    })
-  },
-  methods:{
-    onClose(){
-      this.drawer = false
-      this.$emit('addSuccess')
-    },
-    /*创建报价单,获取商品信息*/
-    onSubmit(type){
-      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.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
-        this.form.discountrate = (this.form.discountrate /100).toFixed(3)
-        const res = await this.$api.requested({
-          "id": 20221020164803,
-          "content": this.form
-        })
-        setTimeout(()=>{
-          this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type,type)
-          this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
-
-        },500)
-      })
-    },
-    /*导入创建报价单校验*/
-    onCheckFormImport(){
-      if (this.form.date.length === 0){
-        this.form.begdate = ''
-        this.form.enddate = ''
-      }else {
-        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,
-          "content": this.form
-        })
-        this.$refs.quoterPrice.quoterImport(res.data.sa_quotedpriceid,this.form.type)
-        this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
-      })
-    },
-    /*提交*/
-    getSubmit(){
-      if (this.form.date.length === 0){
-        this.form.begdate = ''
-        this.form.enddate = ''
-      }else {
-        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
-        this.$store.commit('setLoading',true)
-        this.form.discountrate = this.form.discountrate?(this.form.discountrate / 100).toFixed(4):''
-        const res = await this.$api.requested({
-          "id": 20221020164803,
-          "content": this.form
-        })
-        this.tool.showMessage(res,() => {
-          this.$store.commit('setLoading',false)
-          this.drawer = false
-          this.$emit('addSuccess')
-          this.$store.dispatch('changeDetailDrawer',true)
-          this.$router.push({path:'/quotedPriceDetail',query:{id:res.data.sa_quotedpriceid,rowindex:res.data.rowindex}})
-        })
-      })
-    },
-    /*修改后的产品数据*/
-    productDataChange(val){
-      let obj = val.map(e=>{
-        return {
-          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
-          itemid:e.itemid,
-          oldprice:e.marketprice,
-          price:e.price,
-          discountrate:(e.discountrate/100).toFixed(4),
-          qty:e.qty
-        }
-      })
-      this.productObj = obj
-    },
-    async changeData(obj){
-      const res = await this.$api.requested({
-        "id": 20221021095403,
-        "content": {
-          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
-          "items":obj
-        }
-      })
-      this.$emit('addSuccess')
-    },
-    async projectList(){
-      const res = await this.$api.requested(this.projectParam)
-      this.project.projectData = res.data
-      this.project.total = res.total
-      this.project.currentPage = res.pageNumber
-    },
-    async selectProject(){
-      this.projectParam.content.where.condition = this.form.projectname
-      this.projectList()
-    },
-    async customerList(){
-      if (this.form.sa_projectid === '0' && this.form.type === '客户报价'){
-        this.customerParam.content.where.type = 7
-      }else {
-        this.customerParam.content.where.type = 4
-        this.customerParam.content.where.sa_projectid = this.form.sa_projectid
-      }
-      const res = await this.$api.requested(this.customerParam)
-      this.customer.customerData = res.data
-      this.customer.total = res.total
-      this.customer.currentPage = res.pageNumber
-    },
-    selectCustomer(){
-      this.customerParam.content.where.condition = this.form.enterprisename
-      this.customerList()
-    },
-    /*选择合作伙伴*/
-    async distributorList(){
-      this.customerParam.content.where.sa_projectid = 0
-      this.customerParam.content.where.type = 16
-      const  res = await this.$api.requested(this.customerParam)
-      this.distributor.distributorData = res.data
-      this.distributor.total = res.total
-      this.distributor.currentPage = res.pageNumber
-    },
-    selectDistributor(){
-      this.customerParam.content.where.condition = this.form.enterprisename
-      this.distributorList()
-    },
-    async contactsList(){
-      this.contactsParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-      const res = await this.$api.requested(this.contactsParam)
-      this.contacts.contactsData = res.data
-      this.contacts.total = res.total
-      this.contacts.currentPage = res.pageNumber
-    },
-    selectContacts(){
-      this.contactsParam.content.where.condition = this.form.name
-      this.contactsList()
-    },
-    /*项目选择信息*/
-    projectData(val){
-      this.form.sa_projectid = val.sa_projectid
-      this.form.projectname = val.projectname
-      this.form.projectnum = val.projectnum
-      this.form.sys_enterpriseid = ''
-      this.form.enterprisename = ''
-      this.form.contactsid = 0
-      this.form.name = ''
-      this.form.phonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.projectShow = false
-      this.salerParam.content.type = 2
-      this.salerParam.content.sa_projectid = this.form.sa_projectid
-      this.querySalesman()
-    },
-    /*客户选择信息*/
-    customerData(val){
-      this.form.sys_enterpriseid = val.sys_enterpriseid
-      this.form.enterprisename = val.enterprisename
-      this.form.contactsid = 0
-      this.form.name = ''
-      this.form.phonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.customerShow = false
-      if (!this.isQuotedPrice){
-        this.salerParam.content.type = 1
-        this.salerParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.querySalesman()
-      }
-    },
-    /*合作伙伴选择信息*/
-    distributorData(val){
-      this.form.sys_enterpriseid = val.sys_enterpriseid
-      this.form.enterprisename = val.enterprisename
-      this.form.contactsid = 0
-      this.form.contactsname = ''
-      this.form.contactsphonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.customerShow = false
-      if (!this.isQuotedPrice){
-        this.salerParam.content.type = 1
-        this.salerParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.querySalesman()
-      }
-    },
-    /*联系人选择信息*/
-    contactsData(val){
-      this.form.contactsid = val.contactsid
-      this.form.name = val.name
-      this.form.phonenumber = val.phonenumber
-      this.form.fax = val.fax
-      this.form.telephone = val.telephone
-      this.contactsShow = false
-    },
-    /*项目分页*/
-    handleSizeChangeProject(val) {
-      // console.log(`每页 ${val} 条`);
-      this.projectParam.content.pageSize = val
-      this.projectList()
-    },
-    handleCurrentChangeProject(val) {
-      // console.log(`当前页: ${val}`);
-      this.projectParam.content.pageNumber = val
-      this.projectList()
-    },
-    /*客户分页*/
-    handleSizeChangeCustomer(val) {
-      // console.log(`每页 ${val} 条`);
-      console.log(val)
-      this.customerParam.content.pageSize = val
-      this.customerList()
-    },
-    handleCurrentChangeCustomer(val) {
-      // console.log(`当前页: ${val}`);
-      console.log(val)
-      this.customerParam.content.pageNumber = val
-      this.customerList()
-    },
-    /*合作伙伴翻页*/
-    handleSizeChangeDistributor(val) {
-      // console.log(`每页 ${val} 条`);
-      this.customerParam.content.pageSize = val
-      this.distributorList()
-    },
-    handleCurrentChangeDistributor(val) {
-      // console.log(`当前页: ${val}`);
-      this.customerParam.content.pageNumber = val
-      this.distributorList()
-    },
-    /*联系人分页*/
-    handleSizeChangeContacts(val) {
-      // console.log(`每页 ${val} 条`);
-      this.contactsParam.content.pageSize = val
-      this.contactsList()
-    },
-    handleCurrentChangeContacts(val) {
-      // console.log(`当前页: ${val}`);
-      this.contactsParam.content.pageNumber = val
-      this.contactsList()
-    },
-    /*查询产品系列*/
-    queryItemType(){
-      this.$store.dispatch('optiontypeselect','itemtype').then(res => {
-        this.itemtype = res.data
-      })
-    },
-    /*业务员*/
-    showChange(){
-      this.salesmanVisible = true
-      if (this.isQuotedPrice){
-        this.$refs.selectSalesman.param.content.type = 2
-        this.$refs.selectSalesman.param.content.sa_projectid = this.form.sa_projectid
-        this.$refs.selectSalesman.listData()
-      }else {
-        this.$refs.selectSalesman.param.content.type = 1
-        this.$refs.selectSalesman.param.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.$refs.selectSalesman.listData()
-      }
-
-    },
-    salesmanChange(data){
-      console.log(data,"业务员")
-      this.form.saler_hrid = data[0].hrid
-      this.form.salername = data[0].name
-      this.salesmanVisible = false
-
-   /*   this.form.salername = data[0].name
-      this.form.saler_hrid = data[0].hrid
-      this.salesmanVisible = false*/
-    },
-    async querySalesman(){
-      const res = await this.$api.requested(this.salerParam)
-      this.form.salername = res.data[0].name
-      this.form.saler_hrid = res.data[0].hrid
-    },
-    /*修改折扣数据*/
-    discountrateChange(){
-      this.form.discountrate = Math.round(this.form.discountrate * 100)/100
-    },
-    handleClick(tab){
-      console.log(tab.name,'tab')
-      if (tab.name === '合作伙伴'){
-        this.distributorList()
-      }else {
-        this.customerList()
-      }
-    }
-    /*isSpecial(val){
-      console.log("获取")
-      console.log(val,'是否特价')
-    }*/
-
-
-  },
-  mounted() {
-    if (this.drawerShow){this.drawer = true}
-    this.form.type = this.typeData
-    if (this.typeData === '项目报价'){
-      this.isQuotedPrice = true
-      this.title = '新建项目报价单'
-    }else {
-      this.isQuotedPrice = false
-      this.title = '新建客户报价单'
-    }
-    const date = new Date()
-    this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
-    this.form.sa_quotedpriceid = 0
-    this.queryItemType()
-  },
-  created() {
-
-  }
-}
-</script>
-
-<style scoped>
->>> .el-divider--horizontal {
-  height: 1px;
-  width: 100%;
-  margin: 0px;
-}
-/deep/.el-input__prefix {
-  display: flex;
-  align-items: center;
-}
-</style>

+ 0 - 583
src/SDrpManagement/QuotedPrice/modules/ProjectQuotationAddcopy2.vue

@@ -1,583 +0,0 @@
-<template>
-  <div>
-    <el-drawer
-        :title="title"
-        :visible.sync="drawer"
-        size="600px"
-        direction="rtl"
-        append-to-body
-        :show-close="false"
-        @close="onClose">
-      <div class="drawer__panel" style="margin-bottom: 0px">
-        <el-row style="margin-top: 10px" :gutter="10">
-          <el-form :model="form" :rules="rules" ref="form"  size="mini" label-position="right">
-            <el-col :span="24">
-              <el-form-item label="报价类型:" label-width="100px" >
-                <el-input v-model="form.type" autocomplete="off" placeholder="报价类型" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24" v-if="isQuotedPrice">
-              <el-form-item label="项目名称:" label-width="100px" prop="projectname">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="projectShow"
-                    @show="projectList">
-                  <selectTemplate type="项目" ref="projectTemplate" :param="projectParam" @selectData="projectData"></selectTemplate>
-                  <el-input slot="reference" :readonly="true"  v-model="form.projectname" autocomplete="off" placeholder="请选择项目"  ></el-input>
-                </el-popover>
-
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24" 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="24" v-if="isQuotedPrice">
-              <el-form-item label="客户名称:" label-width="100px" prop="enterprisename">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="customerShow"
-                    @show="customerList">
-                  <selectTemplate type="客户" ref="customerTemplate" :param="customerParam" @selectData="customerData"></selectTemplate>
-                  <el-input slot="reference" :readonly="true" v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户" :disabled="form.sa_projectid === ''" ></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="客户名称:" label-width="100px" prop="enterprisename" v-if="!isQuotedPrice">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="customerShow"
-                    @show="customerList">
-                  <el-tabs type="border-card" v-model="activeName"  @tab-click="handleClick">
-                    <el-tab-pane label="客户" name="客户">
-                      <selectTemplate type="客户" ref="customerTemplate" :param="customerParam" @selectData="customerData"></selectTemplate>
-                    </el-tab-pane>
-                    <el-tab-pane label="合作伙伴" name="合作伙伴">
-                      <selectTemplate type="客户" ref="distributorTemplate" :param="customerParam" @selectData="distributorData"></selectTemplate>
-                    </el-tab-pane>
-                  </el-tabs>
-                  <el-input slot="reference"  :readonly="true"  v-model="form.enterprisename" autocomplete="off" placeholder="请选择客户" ></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-
-            <el-col  :span="24">
-              <el-form-item label="联系人:" label-width="100px" prop="name">
-                <el-popover
-                    placement="bottom"
-                    width="700"
-                    trigger="click"
-                    v-model="contactsShow"
-                    @show="contactsList">
-                  <selectTemplate type="联系人" ref="contactTemplate" :param="contactsParam" @selectData="contactsData"></selectTemplate>
-                  <el-input slot="reference" :readonly="true" v-model="form.name" autocomplete="off" placeholder="请选择联系人" :disabled="form.sys_enterpriseid === ''" ></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <el-form-item label="联系人手机号:" label-width="100px" >
-                <el-input  v-model="form.phonenumber" autocomplete="off" placeholder="手机号" disabled></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <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="24">
-              <el-form-item label="报价日期:" label-width="100px">
-                <el-date-picker
-                    v-model="form.billdate"
-                    style="width: 100%"
-                    type="date"
-                    value-format="yyyy-MM-dd"
-                    placeholder="选择日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="有效期:" label-width="100px" prop="date">
-                <el-date-picker
-                    v-model="form.date"
-                    style="width: 100%"
-                    type="daterange"
-                    value-format="yyyy-MM-dd"
-                    range-separator="至"
-                    start-placeholder="开始日期"
-                    end-placeholder="结束日期"
-                    :picker-options="pickerOptions">
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24" >
-              <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="24">
-              <el-form-item label="业务员:" label-width="100px" prop="salername">
-                <el-popover
-                    placement="bottom"
-                    trigger="manual"
-                    v-model="salesmanVisible"
-                    width="500">
-                  <selectSalesman  ref="selectSalesman"  :radio="true" @onSelect="salesmanChange" @onCancel="salesmanVisible = false"></selectSalesman>
-                  <el-input readonly type="text" slot="reference" size="small" @focus="showChange" v-model="form.salername" placeholder="请选择业务员"></el-input>
-                </el-popover>
-              </el-form-item>
-            </el-col>
-            <el-col  :span="24">
-              <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>
-      <div class="fixed__btn__panel">
-        <el-button size="small" @click="onClose" class="normal-btn-width">取 消</el-button>
-        <el-button  size="small" type="primary" @click="getSubmit" :loading="loading" class="normal-btn-width">确 定</el-button>
-      </div>
-    </el-drawer>
-  </div>
-</template>
-
-<script>
-import quoted_price_product from '../components/quotedPriceProduct'
-import selectSalesman from '../components/selectSalesman'
-import {mapGetters} from "vuex";
-
-import selectTemplate from '@/template/quotation/index.vue'
-export default {
-  name: "ProjectQuotationAdd",
-  props:["drawerShow","typeData"],
-  components:{quoted_price_product,selectSalesman,selectTemplate},
-  data(){
-    var discountrate = (rule,value,callback) =>{
-      if (this.form.discountrate < 0 || this.form.discountrate > 100){
-        callback(new Error('请输入0-100%'))
-      } else {
-        callback();
-      }
-    }
-    return {
-      search:'',
-      title:'',
-      projectShow:false,
-      customerShow:false,
-      contactsShow:false,
-      salesmanVisible:false,
-      activeName:'客户',
-      projectParam:{
-        "id": 20221020143503,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 10,
-          "type":1, //  1:我负责的;2:我参与的;3:我下属负责的;4:我下属参与的
-          "where": {
-            "condition": "",
-            "startdate": "",
-            "enddate": "",
-            "status":"",//跟进中、已成交、已失败
-            "projecttype":"",
-            "stagename":"",
-            "tag":""
-          }
-        },
-      },
-      customerParam:{
-        "id": 20220920083901,
-        "content": {
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where": {
-            "condition": "",
-            "type":4,
-            "sa_projectid":""
-          }
-        }
-      },
-      contactsParam:{
-        "id": "20221022165503",
-        "version": 1,
-        "content": {
-          "sys_enterpriseid":"",
-          "pageNumber": 1,
-          "pageSize": 10,
-          "where": {
-            "condition": "",
-            "workaddress": 0//0表示人,1表示地址
-          }
-        }
-      },
-      salerParam:{
-        "id":20230306144402,
-        "content":{
-          "type":'',////type:1客户2:项目
-          "sys_enterpriseid":'',//type=1
-          "sa_projectid":'' //type=2时传
-        }
-      },
-      pickerOptions: {
-        disabledDate(time) {
-          return time.getTime() + 3600 * 1000 * 24 < Date.now() ;
-        },
-      },
-      drawer:false,
-      isQuotedPrice:false,
-      date:[],
-      productObj:{},
-      form:{
-        date:[],
-        totalPrice:'',
-        type:'',
-        projectnum:'',
-        enterprisename:'',
-        name:'',
-        phonenumber:'',
-        fax:'',
-        telephone:'',
-        specialOffer:'否',
-        sa_quotedpriceid:0,     //sat_notice_classid<=0时 为新增
-        sys_enterpriseid: "",
-        contactsid:0,
-        sa_projectid: '',
-        discountrate: '',
-        remarks: "",
-        invaliddate: "",
-        projectname: "",
-        address: "",
-        billdate:"",
-        enddate:'',
-        begdate:'',
-        saler_hrid:'',
-        salername:'',
-        itemtype:[],
-        quotedpricenotes: [
-          "1、报价为含税13%税率, 含运费 ",
-          "2、报价有限期 2023-02-02 13:16:47至2023-02-22 13:16:47",
-        ]
-      },
-      rules:{
-        projectname:[
-          { required: true, message: '请选择项目', trigger: 'change'},
-        ],
-        enterprisename:[
-          { required: true, message: '请选择客户', trigger: 'change'},
-        ],
-        date:[
-          { required: true, message: '请选择有效期', trigger: 'change'},
-        ],
-        itemtype:[
-          { required: true, message: '请选择产品系列', trigger: 'change'},
-        ],
-        discountrate:[
-          { required: false, validator: discountrate, trigger: 'change'},
-        ],
-        /*name:[
-          { required: true, message: '请选择联系人', trigger: 'change'},
-        ]*/
-      },
-      itemtype:[]
-    }
-  },
-  computed:{
-    ...mapGetters({
-      loading:'loading'
-    })
-  },
-  methods:{
-    onClose(){
-      this.drawer = false
-      this.$emit('addSuccess')
-    },
-    /*创建报价单,获取商品信息*/
-    onSubmit(type){
-
-      if (this.form.date.length === 0){
-        this.form.begdate = ''
-        this.form.enddate = ''
-        this.form.sa_quotedpriceid = 0
-      }else {
-        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
-      }
-
-
-      this.$refs.form.validate(async (valid) => {
-        if (!valid) return false
-        this.form.discountrate = (this.form.discountrate /100).toFixed(3)
-        const res = await this.$api.requested({
-          "id": 20221020164803,
-          "content": this.form
-        })
-        setTimeout(()=>{
-          this.$refs.quoterPrice.quoterPrice(res.data.sa_quotedpriceid,this.form.type,type)
-          this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
-
-        },500)
-      })
-    },
-    /*导入创建报价单校验*/
-    onCheckFormImport(){
-      if (this.form.date.length === 0){
-        this.form.begdate = ''
-        this.form.enddate = ''
-      }else {
-        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,
-          "content": this.form
-        })
-        this.$refs.quoterPrice.quoterImport(res.data.sa_quotedpriceid,this.form.type)
-        this.form.sa_quotedpriceid = res.data.sa_quotedpriceid
-      })
-    },
-    /*提交*/
-    getSubmit(){
-      if (this.form.date.length === 0){
-        this.form.begdate = ''
-        this.form.enddate = ''
-      }else {
-        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
-        this.$store.commit('setLoading',true)
-        this.form.discountrate = this.form.discountrate?(this.form.discountrate / 100).toFixed(4):''
-        const res = await this.$api.requested({
-          "id": 20221020164803,
-          "content": this.form
-        })
-        this.tool.showMessage(res,() => {
-          this.$store.commit('setLoading',false)
-          this.drawer = false
-          this.$emit('addSuccess')
-          this.$store.dispatch('changeDetailDrawer',true)
-          this.$router.push({path:'/quotedPriceDetail',query:{id:res.data.sa_quotedpriceid,rowindex:res.data.rowindex}})
-        })
-      })
-    },
-    /*修改后的产品数据*/
-    productDataChange(val){
-      let obj = val.map(e=>{
-        return {
-          sa_quotedprice_itemsid:e.sa_quotedprice_itemsid,
-          itemid:e.itemid,
-          oldprice:e.marketprice,
-          price:e.price,
-          discountrate:(e.discountrate/100).toFixed(4),
-          qty:e.qty
-        }
-      })
-      this.productObj = obj
-    },
-    async changeData(obj){
-      const res = await this.$api.requested({
-        "id": 20221021095403,
-        "content": {
-          "sa_quotedpriceid":this.form.sa_quotedpriceid,     //sat_notice_classid<=0时 为新增
-          "items":obj
-        }
-      })
-      this.$emit('addSuccess')
-    },
-    projectList(){
-      this.$refs.projectTemplate.listData()
-    },
-    /*可选客户*/
-    customerList(){
-      if (this.form.type === '客户报价'){
-        this.form.sa_projectid = 0
-        this.customerParam.content.where.sa_projectid = 0
-        this.customerParam.content.where.type = 19
-      }else {
-        this.customerParam.content.where.type = 4
-        this.customerParam.content.where.sa_projectid = this.form.sa_projectid
-      }
-      this.$refs.customerTemplate.listData()
-    },
-
-    /*可选择合作伙伴*/
-    distributorList(){
-      this.customerParam.content.where.sa_projectid = 0
-      this.customerParam.content.where.type = 20
-      this.$refs.distributorTemplate.listData()
-    },
-    /*可选联系人*/
-    contactsList(){
-      this.contactsParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-      this.$refs.contactTemplate.listData()
-    },
-
-    /*项目选择信息*/
-    projectData(val){
-      this.form.sa_projectid = val.sa_projectid
-      this.form.projectname = val.projectname
-      this.form.projectnum = val.projectnum
-      this.form.sys_enterpriseid = ''
-      this.form.enterprisename = ''
-      this.form.contactsid = 0
-      this.form.name = ''
-      this.form.phonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.projectShow = false
-      this.salerParam.content.type = 2
-      this.salerParam.content.sa_projectid = this.form.sa_projectid
-      this.querySalesman()
-    },
-    /*客户选择信息*/
-    customerData(val){
-      this.form.sys_enterpriseid = val.sys_enterpriseid
-      this.form.enterprisename = val.enterprisename
-      this.form.contactsid = 0
-      this.form.name = ''
-      this.form.phonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.customerShow = false
-      if (!this.isQuotedPrice){
-        this.salerParam.content.type = 1
-        this.salerParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.querySalesman()
-      }
-    },
-    /*合作伙伴选择信息*/
-    distributorData(val){
-      this.form.sys_enterpriseid = val.sys_enterpriseid
-      this.form.enterprisename = val.enterprisename
-      this.form.contactsid = 0
-      this.form.contactsname = ''
-      this.form.contactsphonenumber = ''
-      this.form.fax = ''
-      this.form.telephone = ''
-      this.customerShow = false
-      if (!this.isQuotedPrice){
-        this.salerParam.content.type = 1
-        this.salerParam.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.querySalesman()
-      }
-    },
-    /*联系人选择信息*/
-    contactsData(val){
-      this.form.contactsid = val.contactsid
-      this.form.name = val.name
-      this.form.phonenumber = val.phonenumber
-      this.form.fax = val.fax
-      this.form.telephone = val.telephone
-      this.contactsShow = false
-    },
-    /*查询产品系列*/
-    queryItemType(){
-      this.$store.dispatch('optiontypeselect','itemtype').then(res => {
-        this.itemtype = res.data
-      })
-    },
-    /*业务员*/
-    showChange(){
-      this.salesmanVisible = true
-      if (this.isQuotedPrice){
-        this.$refs.selectSalesman.param.content.type = 2
-        this.$refs.selectSalesman.param.content.sa_projectid = this.form.sa_projectid
-        this.$refs.selectSalesman.listData()
-      }else {
-        this.$refs.selectSalesman.param.content.type = 1
-        this.$refs.selectSalesman.param.content.sys_enterpriseid = this.form.sys_enterpriseid
-        this.$refs.selectSalesman.listData()
-      }
-
-    },
-    salesmanChange(data){
-      this.form.saler_hrid = data[0].hrid
-      this.form.salername = data[0].name
-      this.salesmanVisible = false
-    },
-    async querySalesman(){
-      const res = await this.$api.requested(this.salerParam)
-      this.form.salername = res.data[0].name
-      this.form.saler_hrid = res.data[0].hrid
-    },
-    /*修改折扣数据*/
-    discountrateChange(){
-      this.form.discountrate = Math.round(this.form.discountrate * 100)/100
-    },
-    handleClick(tab){
-      if (tab.name === '合作伙伴'){
-        this.distributorList(this.customerParam.content.pageNumber = 1)
-      }else {
-        this.customerList(this.customerParam.content.pageNumber = 1)
-      }
-    }
-
-
-
-  },
-  mounted() {
-    if (this.drawerShow){this.drawer = true}
-    this.form.type = this.typeData
-    if (this.typeData === '项目报价'){
-      this.isQuotedPrice = true
-      this.title = '新建项目报价单'
-    }else {
-      this.isQuotedPrice = false
-      this.title = '新建客户报价单'
-    }
-    const date = new Date()
-    this.form.billdate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
-    this.form.sa_quotedpriceid = 0
-    this.queryItemType()
-  },
-  created() {
-
-  }
-}
-</script>
-
-<style scoped>
->>> .el-divider--horizontal {
-  height: 1px;
-  width: 100%;
-  margin: 0px;
-}
-/deep/.el-input__prefix {
-  display: flex;
-  align-items: center;
-}
-</style>

+ 6 - 1
src/template/orderCanUseContract/index.vue

@@ -7,7 +7,7 @@
           size="small"
           :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'"
           v-model="param.content.where.condition"
-          placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+          placeholder="搜索" @keyup.enter.native="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable @change="inputChange"></el-input>
       </div>
       <el-table
       :data="tableData"
@@ -90,6 +90,7 @@ export default {
       this.tableData = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      this.$emit('inputChange')
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -103,6 +104,10 @@ export default {
     },
     rowClick (row) {
       this.$emit('rowClick',row)
+    },
+    inputChange(){
+      console.log('1111change')
+      this.$emit('inputChange')
     }
   },
   created () {

+ 140 - 0
src/template/upload/index.vue

@@ -0,0 +1,140 @@
+<template>
+  <el-upload
+      class="upload-demo"
+      action="#"
+      :on-preview="handlePreview"
+      :on-progress="handleProgress"
+      :on-remove="handleRemove"
+      :before-remove="beforeRemove"
+      :on-change="handleChange"
+      multiple
+      :auto-upload="false"
+      :file-list="listFile">
+    <el-button icon="el-icon-upload2" type="primary" size="mini"  class="inline-16">上传文件</el-button>
+  </el-upload>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:["bindData","folderid",'title'],
+  data() {
+    return {
+      listFile: [],
+      params: {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "getFileName",
+        "content": {
+          "filename": '',
+          "filetype": '',
+          "parentid": ""//归属文件夹ID
+        }
+      },
+      count:0,
+      file: {},
+      filelist: [],
+    };
+  },
+  methods: {
+    async handleRemove(file, fileList) {
+      this.$emit('uploadGet')
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "deleteFileLink",
+        "content": {
+          "linksids":[file.linksid]
+        }
+      })
+      this.$emit('onSuccess',res)
+    },
+    handleProgress(file,fileList){
+
+    },
+    handlePreview(file) {
+      /*this.fileList = fileList*/
+    },
+    beforeRemove(file, fileList) {
+      return this.$confirm(`确定移除 ${ file.name }?`);
+    },
+    handleChange (file, filelist) {
+      this.$emit('uploadGet')
+      this.count = 0
+      this.filelist = []
+      this.filelist = filelist
+      var index = file.raw.name.lastIndexOf(".");
+      var ext = file.name.substr(index + 1);
+      this.params.content.filename = file.raw.name
+      this.params.content.filetype = ext
+      this.getUploadUrl(file, ext)
+    },
+
+    // 获取华为云上传地址
+    async getUploadUrl (file, ext) {
+      this.params.content.parentid = this.folderid
+      const res = await this.$api.requested(this.params)
+      let url = res.data.uploadurl
+      let obsfilename = res.data.serialfilename
+
+      this.upoladFileToServer(url, file, ext, obsfilename)
+    },
+
+    // 上传到华为云
+    async upoladFileToServer (url, file, ext, obsfilename) {
+      console.log(file)
+      let THIS = this
+      let config = {
+        headers: ext === 'pdf' ? { 'Content-Type': 'application/pdf' } : ext === 'svg'?{ 'Content-Type': 'image/svg+xml' } : { 'Content-Type': 'application/octet-stream' },
+        onUploadProgress: function (progressEvent) {
+          let percent = progressEvent.loaded / progressEvent.total * 100
+          THIS.filelist.forEach(e => {
+            if (e.uid === file.uid) {
+              THIS.$set(e, 'type', ext.toUpperCase());
+              THIS.$set(e, 'progress', percent);
+            }
+          })
+        },
+      }
+      const res = await this.$upload.hw_upload(url, file.raw, config)
+      this.createFileRecord(obsfilename)
+    },
+
+    // 上传成功以后生成附件记录
+    async createFileRecord (obsfilename,attinfos) {
+      let obj = {
+        "serialfilename": obsfilename
+      }
+      obj = Object.assign({},obj,this.bindData)
+      let param = {
+        "classname": "system.attachment.huawei.OBS",
+        "method": "uploadSuccess",
+        "content":obj
+      }
+      const res = await this.$api.requested(param)
+      this.count++
+      if (this.count == this.filelist.length) {
+        this.$emit('onSuccess',res)
+        this.count = 0
+        console.log('触发');
+      }
+      // if (res.code ===  1) {
+      //   this.$emit('onSuccess',res)
+      // }
+    },
+    async uploadSuccess(){
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sa_quotedprice',
+          "ownerid": this.ownerid,
+          "usetype":""
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 66 - 4
src/views/message/index.vue

@@ -210,10 +210,72 @@ export default {
             })
           })
         }else {
-          if (this.message.link.listPath === '/workreport'){
-            this.$router.push({
-              path:this.message.link.listPath,
-            })
+          switch (this.message.link.listPath) {
+            case '/workreport':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+                  break
+            case '/notice_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/notice_mag_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submitedit_one':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submitedit_more':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/submit_mag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archvies_mag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_admag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_adlist':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_adclass':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_sc_list':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
+            case '/archives_scmag':
+              this.$router.push({
+                path:this.message.link.listPath,
+              })
+              break
           }
         }
       }