Procházet zdrojové kódy

调整预测模板,销售预测数据展示

qymljy před 3 roky
rodič
revize
9b4332bef1
21 změnil soubory, kde provedl 372 přidání a 69 odebrání
  1. 46 3
      src/HDrpManagement/competitor/detail/modules/addressManage/modules/add.vue
  2. 3 2
      src/HDrpManagement/competitor/detail/modules/addressManage/modules/edit.vue
  3. 2 1
      src/HDrpManagement/competitor/detail/modules/addressManage/modules/toVoid.vue
  4. 48 3
      src/HDrpManagement/competitor/detail/modules/contacts/modules/add.vue
  5. 2 2
      src/HDrpManagement/competitor/detail/modules/contacts/modules/edit.vue
  6. 0 2
      src/HDrpManagement/competitor/detail/modules/detailedData.vue
  7. 1 1
      src/HDrpManagement/projectChange/modules/detail.vue
  8. 63 9
      src/HManagement/salesForecastTemplate/modules/forecastList.vue
  9. 30 5
      src/HManagement/salesForecastTemplate/modules/modelDetail.vue
  10. 40 6
      src/HManagement/salesForecastTemplate/modules/product.vue
  11. 49 9
      src/HManagement/salesForecastTemplate/modules/project.vue
  12. 8 1
      src/SDrpManagement/QuotedPrice/components/edit/importQuotedPrice.vue
  13. 19 5
      src/SDrpManagement/QuotedPrice/components/edit/productTable.vue
  14. 16 4
      src/SDrpManagement/QuotedPrice/components/edit/productTableProject.vue
  15. 16 4
      src/SDrpManagement/QuotedPrice/components/productTable.vue
  16. 16 4
      src/SDrpManagement/QuotedPrice/components/productTableProject.vue
  17. 3 1
      src/SDrpManagement/QuotedPrice/detail/index.vue
  18. 2 2
      src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue
  19. 2 0
      src/SDrpManagement/QuotedPrice/modules/importQuotedPrice.vue
  20. 4 4
      src/SManagement/sales_forecast/modules/modelDetail.vue
  21. 2 1
      src/SManagement/sales_forecast/modules/product.vue

+ 46 - 3
src/HDrpManagement/competitor/detail/modules/addressManage/modules/add.vue

@@ -4,13 +4,14 @@
     <el-drawer
         title=" 新建客户地址"
         :visible.sync="dialogFormVisible"
-        size="25%"
+        size="600px"
         direction="rtl"
+        :show-close="false"
         append-to-body
         @close="dialogFormVisible = false">
       <div class="drawer__panel">
         <el-row :gutter="20">
-          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
+          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="75px">
             <el-col :span="24">
               <el-form-item label="省市县:" >
                 <el-cascader
@@ -36,7 +37,7 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small" :disabled="value.length === 0 && form.address === ''" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
   </div>
@@ -91,6 +92,25 @@ export default {
         this.tool.showMessage(res,() => {
           this.$emit("insertSuccess")
           this.$refs['form'].resetFields()
+          this.form = {
+            contactsid: 0,
+            sys_enterpriseid: "",
+            name: "",
+            sex: "",
+            depname: "",
+            position: "",
+            birthday: "",
+            phonenumber: "",
+            email: "",
+            province: "",
+            city: "",
+            county: "",
+            address: "",
+            remarks: "",
+            workaddress: 1,
+            isdefault: 1,
+            isprimary: 1
+          }
           this.dialogFormVisible = false
         })
       })
@@ -103,6 +123,29 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
     },
+    onCancel(){
+      this.dialogFormVisible = false
+      this.$refs['form'].resetFields()
+      this.form = {
+        contactsid: 0,
+        sys_enterpriseid: "",
+        name: "",
+        sex: "",
+        depname: "",
+        position: "",
+        birthday: "",
+        phonenumber: "",
+        email: "",
+        province: "",
+        city: "",
+        county: "",
+        address: "",
+        remarks: "",
+        workaddress: 1,
+        isdefault: 1,
+        isprimary: 1
+      }
+    }
   }
 }
 </script>

+ 3 - 2
src/HDrpManagement/competitor/detail/modules/addressManage/modules/edit.vue

@@ -4,13 +4,14 @@
     <el-drawer
         title="编辑客户地址"
         :visible.sync="dialogFormVisible"
-        size="25%"
+        size="600px"
+        :show-close="false"
         direction="rtl"
         append-to-body
         @close="dialogFormVisible = false">
       <div class="drawer__panel">
         <el-row :gutter="20">
-          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
+          <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="75px">
             <el-col :span="24">
               <el-form-item label="省市县:" >
                 <el-cascader

+ 2 - 1
src/HDrpManagement/competitor/detail/modules/addressManage/modules/toVoid.vue

@@ -7,7 +7,8 @@
     </el-popconfirm>
     <el-dialog
         :visible.sync="dialogToVoidVisible"
-        width="900px"
+        width="600px"
+        append-to-body
         @close="dialogToVoidVisible = false"
     >
       <div slot="title" style="font-size: 15px">

+ 48 - 3
src/HDrpManagement/competitor/detail/modules/contacts/modules/add.vue

@@ -4,10 +4,11 @@
     <el-drawer
         title=" 新建联系人"
         :visible.sync="dialogFormVisible"
-        size="25%"
+        size="600px"
         direction="rtl"
         append-to-body
-        @close="dialogFormVisible = false">
+        :show-close="false"
+        @close="onCancel">
       <div class="drawer__panel">
         <el-row :gutter="20">
           <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
@@ -70,7 +71,7 @@
         </el-row>
       </div>
       <div class="fixed__btn__panel">
-        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" @click="onCancel" class="normal-btn-width">取 消</el-button>
         <el-button size="small" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
@@ -149,10 +150,54 @@ export default {
         this.tool.showMessage(res,()=>{
           this.$emit("insertSuccess")
           this.$refs['form'].resetFields()
+          this.form = {
+            contactsid: 0,
+            sys_enterpriseid: "",
+            name: "",
+            sex: "",
+            depname: "",
+            position: "",
+            birthday: "",
+            phonenumber: "",
+            email: "",
+            address: "",
+            remarks: "",
+            enterprisename:'',
+            province: "",
+            city: "",
+            county: "",
+            workaddress: 0,
+            isdefault: 1,
+            isprimary: 1
+          }
           this.dialogFormVisible = false
         })
       })
     },
+    onCancel(){
+      this.$refs['form'].resetFields()
+      this.dialogFormVisible = false
+      this.form = {
+        contactsid: 0,
+        sys_enterpriseid: "",
+        name: "",
+        sex: "",
+        depname: "",
+        position: "",
+        birthday: "",
+        phonenumber: "",
+        email: "",
+        address: "",
+        remarks: "",
+        enterprisename:'',
+        province: "",
+        city: "",
+        county: "",
+        workaddress: 0,
+        isdefault: 1,
+        isprimary: 1
+      }
+    }
   }
 }
 </script>

+ 2 - 2
src/HDrpManagement/competitor/detail/modules/contacts/modules/edit.vue

@@ -4,8 +4,9 @@
     <el-drawer
         title="编辑联系人"
         :visible.sync="dialogFormVisible"
-        size="25%"
+        size="600px"
         direction="rtl"
+        :show-close="false"
         append-to-body
         @close="dialogFormVisible = false">
       <div class="drawer__panel">
@@ -136,7 +137,6 @@ export default {
 
     },
     onSubmit(){
-
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({

+ 0 - 2
src/HDrpManagement/competitor/detail/modules/detailedData.vue

@@ -17,8 +17,6 @@
         <div slot="title" class="my-label__title">系统信息</div>
         <el-descriptions-item label-class-name="my-label" label="创建人">{{ basic.createby?basic.createby:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="创建时间">{{ basic.createdate?basic.createdate:"--" }}</el-descriptions-item>
-        <el-descriptions-item label-class-name="my-label" label="跟进人">{{ basic.followby?basic.followby:"--" }}</el-descriptions-item>
-        <el-descriptions-item label-class-name="my-label" label="跟进时间">{{ basic.followdate?basic.followdate:"--" }}</el-descriptions-item>
 <!--        <el-descriptions-item label="锁定状态" v-if="system.datastatus === 0">未锁定</el-descriptions-item>
         <el-descriptions-item label="锁定状态" v-else-if="system.datastatus === 2">已锁定</el-descriptions-item>-->
         <el-descriptions-item label-class-name="my-label"  label="编辑人">{{ basic.changeby?basic.changeby:"--" }}</el-descriptions-item>

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

@@ -417,7 +417,7 @@ export default {
         },
         {
           label:'预计签约金额(元)',
-          value: this.totalPrice
+          value: this.signamount_due
         },
       ]
     },

+ 63 - 9
src/HManagement/salesForecastTemplate/modules/forecastList.vue

@@ -2,21 +2,50 @@
   <div>
     <!-- 表格搜索 -->
     <div class="flex-align-center  search-panel normal-margin">
-      <el-input style="width:200px" size="small" placeholder="单号" @keyup.native.enter="listData(null,1)" @clear="listData(null,1)" v-model="params.content.where.condition" prefix-icon="el-icon-search" clearable></el-input>
+      <label class="search__label">提报时间:</label>
+      <el-date-picker
+          size="small"
+          v-model="date"
+          style="margin-right: 24px !important;"
+          value-format="yyyy-MM-dd"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @change="selectChange">
+      </el-date-picker>
+      <el-input class="inline-16" style="width:200px" size="small" placeholder="单号 / 提报人" @keyup.native.enter="listData(null,1)" @clear="listData(null,1)" v-model="params.content.where.condition" prefix-icon="el-icon-search" clearable></el-input>
     </div>
     <!-- 表格主题 -->
     <tableLayout :layout="tablecols" :data="list" :opwidth="200" :custom="true" :fixedName="'operation'" height="300px" @rowClick="rowClick">
       <template v-slot:customcol="scope">
-        <div v-if="scope.column.columnname === 'baseonproject'">
+<!--        <div v-if="scope.column.columnname === 'baseonproject'">
           <span>{{scope.column.data.baseonproject === 1?'按项目预测':'无'}}</span>
         </div>
         <div v-else-if="scope.column.columnname === 'taskdays'">
           <span>提前{{scope.column.data.taskdays}}天</span>
-        </div>
-        <div v-else-if="scope.column.columnname === 'periodpoint'">
-          <span v-for="i in scope.column.data.periodpointchange" :key="i.index">
+        </div>-->
+        <div v-if="scope.column.columnname === 'periodpoint'">
+<!--          <span v-for="i in scope.column.data.periodpointchange" :key="i.index">
             {{scope.column.data.periodtype === '周'?'周'+ `${i===7?'日':i}`:i+'日'}},
-          </span>
+          </span>-->
+          <div>
+            <span v-for="(i,index) in scope.column.data.taskdayschange" :key="index">
+              <span v-if="index === scope.column.data.taskdayschange.length -1">
+                {{ i + '天' }}
+              </span>
+              <span v-else>
+                {{ i + '天,' }}
+              </span>
+
+            </span>
+          </div>
+<!--          <div v-else>
+            <span v-for="i in scope.column.data.periodpointchange" :key="i.index">
+              {{scope.column.data.periodtype === '周'?'周'+ `${i===7?'日':i}`:i+'日'}},
+            </span>
+          </div>-->
+
         </div>
         <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
       </template>
@@ -24,7 +53,7 @@
         <slot name="detail" :data="scope.data"></slot>
       </template>
     </tableLayout>
-    <div style="margin-top:16px;text-align:right">
+<!--    <div style="margin-top:16px;text-align:right">
       <el-pagination
         background
         small
@@ -35,6 +64,23 @@
         layout="total, prev, pager, next, jumper"
         :total="total">
       </el-pagination>
+    </div>-->
+    <div style="height: 35px;margin-top: 20px">
+      <div style="float: left;margin-left: 15px">提报人数:{{ total }}</div>
+      <div style="float: right">
+        <el-pagination
+            background
+            small
+            style="text-align: right;"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="params.content.pageSize"
+            layout="total, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
+
     </div>
   </div>
 </template>
@@ -48,13 +94,14 @@ export default {
     return {
       params:{
         "id": 20220906150403,
-        "version":1,
         "content": {
           "pageNumber":1,
           "pageSize":10,
           "sa_salesforecastmodelid":0,
           "where":{
-            "condition":""
+            "condition":"",
+            'begindate':"",
+            'enddate':""
           }
         }
       },
@@ -62,6 +109,7 @@ export default {
       list:[],
       total:0,
       currentPage:0,
+      date:[]
     }
   },
   methods:{
@@ -84,6 +132,12 @@ export default {
     rowClick (row) {
       this.$emit('tableRowClick',row)
     },
+    selectChange(val){
+      console.log(val)
+      this.params.content.where.begindate = val[0]
+      this.params.content.where.enddate = val[1]
+      this.listData()
+    }
   },
   mounted () {
     this.tablecols = this.tool.tabelCol(this.$route.name)['forecastTable'].tablecols

+ 30 - 5
src/HManagement/salesForecastTemplate/modules/modelDetail.vue

@@ -73,6 +73,7 @@ export default {
     },
     changeDataStructure() {
       let that = this
+      /*月度提报周期*/
       function test (){
         let val = ''
         that.mainData.taskdayschange.forEach((e,index) => {
@@ -85,16 +86,40 @@ export default {
         })
         return val
       }
+      /*月度提报开始时间*/
+      function startTime (){
+        let val = ''
+        that.mainData.periodpointchange.forEach((e,index) => {
+          if (index === that.mainData.periodpointchange.length -1){
+            val += `每月${e}日`
+          }else {
+            val += `每月${e}日,`
+          }
+
+        })
+        return val
+      }
+      /*发布范围*/
+      function translate () {
+        let val = ''
+        that.mainData.roles.forEach((e,index) => {
+          if (index === that.mainData.roles.length -1){
+            val += `${e.rolename}`
+          }else {
+            val += `${e.rolename},`
+          }
+        })
+        return val
+      }
       this.mainAreaData = [
         {label:'提报要求',value:this.mainData.remarks},
         {label:'提报类型',value:this.mainData.isrepeat == 1 ?'月度提报':'单次提报'},
-        {label:'提报开始时间',value:this.mainData.begdate},
+        {label:'提报开始时间',value:this.mainData.isrepeat === 0?this.mainData.begdate:startTime()},
         {label:'提报周期',value:this.mainData.isrepeat === 0?this.mainData.taskdayschange[0]+'天':test()},
-        /*{label:'有效期',value:this.mainData.remarks},
-        {label:'发布范围',value:''},*/
+        {label:'发布范围',value:translate()},
 
-        {label:'预测金额',value:this.mainData.outamountsum},
-        {label:'负责人',value:this.mainData.createby},
+        /*{label:'预测金额',value:this.mainData.outamountsum},
+        {label:'负责人',value:this.mainData.createby},*/
         {
           label:'状态',
           value:this.mainData.status,

+ 40 - 6
src/HManagement/salesForecastTemplate/modules/product.vue

@@ -1,12 +1,37 @@
 <template>
   <div>
-    <el-button size="small" type="text" @click="drawer = true">产品清单</el-button>
+    <el-button size="small" type="text" @click="onshow">产品清单</el-button>
     <el-drawer
-      title="添加产品"
+      title="产品清单"
       :visible.sync="drawer"
       append-to-body
       direction="rtl"
+      :show-close="false"
       size="80%">
+      <div style="border-top:1px solid #eeeeee; padding:20px 16px; margin-bottom:0px">
+        <el-row :gutter="10">
+          <el-col :span="3">
+            <span class="search__label">项目编号:</span>
+            <span class="topTile">{{data.projectnum}}</span>
+          </el-col>
+          <el-col :span="3">
+            <span class="search__label">项目名称:</span>
+            <span class="topTile">{{data.projectname}}</span>
+          </el-col>
+          <el-col :span="3">
+            <span class="search__label">项目类型:</span>
+            <span class="topTile">{{data.projecttype}}</span>
+          </el-col>
+          <el-col :span="3">
+            <span class="search__label">项目地址:</span>
+            <span class="topTile">{{data.address}}</span>
+          </el-col>
+          <el-col :span="3">
+            <span class="search__label">预测金额(元):</span>
+            <span class="topTile">{{data.sumprojectamount}}</span>
+          </el-col>
+        </el-row>
+      </div>
       <div class="drawer__panel">
         <el-input class="mt-10" style="width:200px" suffix-icon="el-icon-search" size="small" placeholder="搜索" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
         <el-table
@@ -98,7 +123,8 @@
         </el-table-column>
         </el-table>
         <div class="container normal-panel flex-align-center flex-between">
-          <p v-if="list[0]">金额合计:{{list[0].sumamount}}</p>
+          <p v-if="list[0]" class="topTile">金额合计(元):{{list[0].sumamount}}</p>
+          <p v-else class="topTile">金额合计(元):0</p>
           <el-pagination
             background
             @size-change="handleSizeChange"
@@ -117,7 +143,7 @@
 <script>
 import previewImage from '@/components/previewImage/index.vue'
 export default {
-  props:['id','sa_salesforecastbillid'],
+  props:['id','sa_salesforecastbillid','data'],
   components:{
     previewImage
   },
@@ -126,7 +152,6 @@ export default {
       drawer:false,
       param:{
         "id": 20220906154703,
-        "version":1,
         "content": {
           "sa_salesforecastbillid":'',
           "where":{
@@ -141,6 +166,12 @@ export default {
     }
   },
   methods:{
+    onshow(){
+      this.drawer = true
+      console.log("接收数据")
+      console.log(this.id,this.sa_salesforecastbillid,this.data)
+      this.listData(this.id)
+    },
     async listData (sa_projectid) {
       this.param.content.sa_salesforecastbillid = this.sa_salesforecastbillid
       this.param.content.where.sa_projectid = sa_projectid
@@ -206,10 +237,13 @@ export default {
     }
   },
   mounted () {
-    
   }
 }
 
 </script>
 <style>
+  .topTile{
+    font-size: 14px;
+    color: #666666
+  }
 </style>

+ 49 - 9
src/HManagement/salesForecastTemplate/modules/project.vue

@@ -1,7 +1,16 @@
 <template>
   <div>
-    <div class="flex-align-center flex-between mt-10">
-      <el-input style="width:200px" suffix-icon="el-icon-search" size="small" placeholder="搜索" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" clearable></el-input>
+    <div class="mt-10">
+      <label class="search__label">项目类型:</label>
+      <el-select v-model="type" placeholder="请选择" class="inline-24" size="small" @change="search" clearable>
+        <el-option
+            v-for="item in typeList"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value">
+        </el-option>
+      </el-select>
+      <el-input style="width:200px" suffix-icon="el-icon-search" size="small" placeholder="项目编号 / 项目名称" v-model="param.content.where.condition" @keyup.native.enter="search" @clear="search" clearable></el-input>
     </div>
     <el-table
       :data="list"
@@ -17,23 +26,29 @@
         prop="projectname"
         label="项目名称">
       </el-table-column>
+      <el-table-column
+          prop="projecttype"
+          label="项目类型">
+      </el-table-column>
       <el-table-column
         prop="address"
-        label="地址">
+        label="项目地址">
       </el-table-column>
       <el-table-column
         prop="sumprojectamount"
-        label="金额">
+        label="预测金额(元)">
       </el-table-column>
       <el-table-column
-        label="操作">
+        label="操作"
+        width="100">
         <template slot-scope="scope">
-          <product class="inline-16" :id="scope.row.sa_projectid" :sa_salesforecastbillid="param.content.sa_salesforecastbillid"></product>
+          <product class="inline-16" :id="scope.row.sa_projectid" :sa_salesforecastbillid="param.content.sa_salesforecastbillid" :data="scope.row"></product>
         </template>
       </el-table-column>
     </el-table>
     <div class="container normal-panel flex-align-center flex-between">
-      <p v-if="list[0]">金额合计:{{list[0].sumamount}}</p>
+      <p v-if="list[0]">预测金额(元):{{list[0].sumamount}}</p>
+      <p v-else>预测金额(元): 0</p>
       <el-pagination
         background
         @size-change="handleSizeChange"
@@ -63,17 +78,26 @@ export default {
           "pageSize":20,
           "sa_salesforecastbillid":'',
           "where":{
-            "condition":""
+            "condition":"",
+            "projecttype":""
           }
         }
       },
       list:[],
       currentPage:0,
-      total:0
+      total:0,
+      type:'',
+      typeList:[]
     }
   },
   methods:{
+    async search () {
+      this.param.content.pageNumber = 1
+      this.param.content.where.projecttype = this.type
+      this.listData(this.param.content.sa_salesforecastbillid)
+    },
     async listData (id) {
+      this.queryType()
       this.param.content.sa_salesforecastbillid = id
       const res = await this.$api.requested(this.param)
       this.list = res.data
@@ -92,9 +116,25 @@ export default {
     },
     rowClick (row) {
       this.$emit('queryProduct',row.sa_projectid)
+    },
+    async queryType(){
+      let param = {
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 90,
+          "typename": "projecttype",
+          "parameter": {
+          }
+        }
+      }
+      const res = await this.$api.requested(param)
+      this.typeList = res.data
     }
   },
   mounted () {
+    this.queryType()
   }
 }
 

+ 8 - 1
src/SDrpManagement/QuotedPrice/components/edit/importQuotedPrice.vue

@@ -40,6 +40,8 @@
         <slot name="errorFile"></slot>
         <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a :href="modelurl">《Excel标准模板》</a></p>
         <p class="tips">• 文件中数据不能超过5000行</p>
+        <p v-if="error">错误数据</p>
+        <p v-if="error">{{errorFile}}</p>
         <div class="dialog-footer">
           <el-button size="small" @click="dialogUploadVisible = false" class="normal-btn-width">取 消</el-button>
           <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">确 定</el-button>
@@ -77,7 +79,9 @@ export default {
       CampaignList:[],
       activeName:'first',
       modelurl:'',
-      campaignid:''
+      campaignid:'',
+      error:false,
+      errorFile:''
 
     }
   },
@@ -154,6 +158,9 @@ export default {
           "attachmentid": id
         }
       })
+      console.log(res,"导入结果")
+     /* this.error = true
+      this.errorFile = res.data*/
       this.tool.showMessage(res,()=>{
         this.$emit('onSuccess')
         this.clearFiles()

+ 19 - 5
src/SDrpManagement/QuotedPrice/components/edit/productTable.vue

@@ -16,7 +16,7 @@
             <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
           </div>
           <div style="margin-top:-10px;margin-bottom: 10px;float: right">
-            <el-button style="float: right" type="primary" size="mini" @click="onSubmit" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
+            <el-button style="float: right" :type="tableSelectData.length === 0?'':'primary'" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
         <div class="produtMag-panel">
@@ -178,7 +178,8 @@ export default {
           }
 
         }
-      }
+      },
+      timer:0
     }
   },
   methods:{
@@ -188,6 +189,7 @@ export default {
     },
     onColes(){
       this.dialogProductVisible = false
+      this.selectData = []
     },
     async onSubmit(){
       const res = await this.$api.requested({
@@ -202,8 +204,12 @@ export default {
         this.$emit('productAdd')
         this.queryProduct()
         this.selectListData()
+        this.selectData = []
       })
     },
+    batchSelect(){
+      this.debounce(this.onSubmit,500)()
+    },
     onSelect(val){
       console.log(val,"选择的商品")
       this.tableSelectData = []
@@ -220,9 +226,17 @@ export default {
         }
       })
       this.selectData = obj
-      this.$nextTick(()=>{
-        this.onSubmit()
-      })
+      // this.$nextTick(()=>{
+      //   this.onSubmit()
+      // })
+      this.debounce(this.onSubmit,500)()
+    },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
     },
     /*获取产品信息*/
     queryProduct(){

+ 16 - 4
src/SDrpManagement/QuotedPrice/components/edit/productTableProject.vue

@@ -16,7 +16,7 @@
             <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
           </div>
           <div style="margin-top:-10px;margin-bottom: 10px;float: right">
-            <el-button style="float: right" type="primary" size="mini" @click="onSubmit" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
+            <el-button style="float: right" :type="tableSelectData.length === 0?'':'primary'" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
         <div class="produtMag-panel">
@@ -178,7 +178,8 @@ export default {
           }
 
         }
-      }
+      },
+      timer:0
     }
   },
   methods:{
@@ -204,6 +205,9 @@ export default {
         this.selectListData()
       })
     },
+    batchSelect(){
+      this.debounce(this.onSubmit,500)()
+    },
     onSelect(val){
       console.log(val,"选择的商品")
       this.tableSelectData = []
@@ -220,9 +224,17 @@ export default {
         }
       })
       this.selectData = obj
-      this.$nextTick(()=>{
+     /* this.$nextTick(()=>{
         this.onSubmit()
-      })
+      })*/
+      this.debounce(this.onSubmit,500)()
+    },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
     },
     /*获取产品信息*/
     queryProduct(){

+ 16 - 4
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -16,7 +16,7 @@
             <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
           </div>
           <div style="margin-top:-10px;margin-bottom: 10px;float: right">
-            <el-button style="float: right" type="primary" size="mini" @click="onSubmit" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
+            <el-button style="float: right" type="primary" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
         <div class="produtMag-panel">
@@ -178,7 +178,8 @@ export default {
           }
 
         }
-      }
+      },
+      timer:0
     }
   },
   methods:{
@@ -224,9 +225,20 @@ export default {
         }
       })
       this.selectData = obj
-      this.$nextTick(()=>{
+      /*this.$nextTick(()=>{
         this.onSubmit()
-      })
+      })*/
+      this.debounce(this.onSubmit,500)()
+    },
+    batchSelect(){
+      this.debounce(this.onSubmit,500)()
+    },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
     },
     /*获取产品信息*/
     queryProduct(id,type){

+ 16 - 4
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -16,7 +16,7 @@
             <el-input size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="productData(params.content.pageNumber = 1)" @clear="productData(params.content.pageNumber = 1)" clearable></el-input>&nbsp;
           </div>
           <div style="margin-top:-10px;margin-bottom: 10px;float: right">
-            <el-button style="float: right" type="primary" size="mini" @click="onSubmit" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
+            <el-button style="float: right" type="primary" size="mini" @click="batchSelect" :disabled="tableSelectData.length === 0 ">批量添加</el-button>
           </div>
         </div>
         <div class="produtMag-panel">
@@ -179,7 +179,8 @@ export default {
           }
 
         }
-      }
+      },
+      timer:0
     }
   },
   methods:{
@@ -207,6 +208,9 @@ export default {
         this.selectListData()
       })
     },
+    batchSelect(){
+      this.debounce(this.onSubmit,500)()
+    },
     onSelect(val){
       console.log(val,"选择的商品")
       this.tableSelectData = []
@@ -223,9 +227,17 @@ export default {
         }
       })
       this.selectData = obj
-      this.$nextTick(()=>{
+      /*this.$nextTick(()=>{
         this.onSubmit()
-      })
+      })*/
+      this.debounce(this.onSubmit,500)()
+    },
+    debounce (fn, wait) {
+      let that = this
+      return function () {
+        if (that.timer !== null) clearTimeout(that.timer)
+        that.timer = setTimeout(fn, wait)
+      }
     },
     /*获取产品信息*/
     queryProduct(id,type){

+ 3 - 1
src/SDrpManagement/QuotedPrice/detail/index.vue

@@ -106,11 +106,13 @@ export default {
         }
       })
       this.mainData = res.data
+      console.log(this.mainData)
+      this.productList()
       /*this.$refs.productList.productData()*/
       this.$nextTick(()=>{
         this.$refs.productList.productData()
       })
-      this.productList()
+
 
      /* this.changeDataStructure()*/
      /* this.$refs.detailed.detailedList(this.mainData)*/

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

@@ -265,9 +265,9 @@ export default {
         this.list[i].mindiscountrate = Math.round((res.data[i].mindiscountrate * 100) * 100)/100
         this.list[i].price = Math.round(res.data[i].price * 100)/100
         this.list[i].discountDifferenceAmount = Math.round(res.data[i].discountDifferenceAmount * 100)/100
-        this.totalPrice = this.totalPrice + res.data[i].qty * res.data[i].price
+       /* this.totalPrice = this.totalPrice + res.data[i].qty * res.data[i].price*/
       }
-      this.totalPrice = Math.round(this.totalPrice * 100)/100
+      this.totalPrice = Math.round(res.data[0].rowstotal[0].sumamount * 100)/100
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);

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

@@ -155,7 +155,9 @@ export default {
           "attachmentid": id
         }
       })
+      console.log(res,"导入结果输出")
       this.tool.showMessage(res,()=>{
+        console.log(res,"导入结果")
         this.$emit('onSuccess')
         this.clearFiles()
       })

+ 4 - 4
src/SManagement/sales_forecast/modules/modelDetail.vue

@@ -77,10 +77,10 @@ export default {
       this.mainAreaData = [
         {label:'提报要求',value:this.mainData.remarks},
         {label:'提报类型',value:this.mainData.isrepeat == 1 ?'月度提报':'单次提报'},
-        {label:'提报时间',value:this.mainData.reportingperiod},
-        {label:'截止日期',value:this.mainData.periodend},
-        {label:'预测金额',value:this.mainData.sumamount},
-        {label:'负责人',value:this.mainData.createby},
+        {label:'提报开始时间',value:this.mainData.reportingperiod},
+        {label:'截止时间',value:this.mainData.periodend},
+        {label:'预测金额(元)',value:this.mainData.sumamount},
+        {label:'提报人',value:this.mainData.createby},
         {
           label:'状态',
           value:this.mainData.status,

+ 2 - 1
src/SManagement/sales_forecast/modules/product.vue

@@ -98,7 +98,8 @@
     </el-table-column>
     </el-table>
     <div class="container normal-panel flex-align-center flex-between">
-      <p v-if="list[0]">金额合计:{{list[0].sumamount}}</p>
+      <p v-if="list[0]">金额合计(元): {{list[0].sumamount}}</p>
+      <p v-else>金额合计(元): 0</p>
       <el-pagination
         background
         @size-change="handleSizeChange"