Просмотр исходного кода

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy 2 лет назад
Родитель
Сommit
d32c767b7d

+ 18 - 7
src/HDrpManagement/contractManage/components/productDetailList/productDetailList.vue

@@ -80,8 +80,8 @@
         </template>
       </tableLayout>
     </div>
-    <div style="height: 35px;margin-top: 20px">
-      <div style="float: left">金额(元):{{ data.signamount ? tool.formatAmount(data.signamount,2) : '0.00'}}</div>
+    <!-- <div style="height: 35px;margin-top: 20px">
+      <div v-if="$route.query.type != '框架'" style="float: left">金额(元):{{ data.signamount ? tool.formatAmount(data.signamount,2) : '0.00'}}</div>
       <div style="float: right">
         <el-pagination
             background
@@ -93,7 +93,7 @@
             layout="total,sizes, prev, pager, next, jumper"
             :total="total">
         </el-pagination>
-      </div>
+      </div> -->
 
     </div>
   </div>
@@ -131,7 +131,7 @@ export default {
           "content": {
               "sa_contractid": this.$route.query.id,
               "pageNumber": 1,
-              "pageSize": 100,
+              "pageSize": 30,
               "where": {
                   "condition": "",
               }
@@ -148,6 +148,7 @@ export default {
       tablecols:[],
       tablecolsAdd:[],
       total:0,
+      totalPage:0,
       editIndex:''
     };
   },
@@ -158,6 +159,11 @@ export default {
   created () {
     if (this.$route.query.id) this.listData()
     this.tablecols = this.tool.tabelCol(this.$route.name).productDetailTable.tablecols
+    this.$route.query.type == '框架' && this.tablecols.forEach((item,index) => {
+      if (item.columnname == 'qty' || item.columnname == 'amount') {
+        this.tablecols.splice(index,1)
+      }
+    })
     this.tablecolsAdd = this.tool.tabelCol(this.$route.name).addProductTable.tablecols
 
   },
@@ -168,12 +174,17 @@ export default {
       res.data.forEach((e,index)=>{
         res.data[index].discountrate = Math.round((e.discountrate * 100)*100)/100
       })
-      this.list = res.data
+      this.list = this.params.content.pageNumber == 1 ? res.data : this.list.concat(res.data)
+      console.log(this.list,res.data);
       this.total = res.total
-      this.$emit('priceChange')
+      this.totalPage = res.pageTotal
+      // this.$emit('priceChange')
     },
     tableLoad () {
-
+      if (this.params.content.pageNumber == this.totalPage) return
+      this.params.content.pageNumber += 1
+      this.listData()
+      console.log('触底');
     },
     qtyChange (num,index,data) {
       data.qty = num

+ 4 - 4
src/HDrpManagement/contractManage/modules/detail.vue

@@ -483,10 +483,10 @@ export default {
             label:'签约日期',
             value:this.mainData.signdate
           },
-          {
-            label:'签约金额(元)',
-            value:this.mainData.signamount?this.tool.formatAmount(this.mainData.signamount,2):0.00
-          },
+          // {
+          //   label:'签约金额(元)',
+          //   value:this.mainData.signamount?this.tool.formatAmount(this.mainData.signamount,2):0.00
+          // },
           {
             label:'业务员',
             value:this.mainData.salername

+ 2 - 2
src/HDrpManagement/invoiceapp/detail/tab/blueInvoice/components/invoiceTable.vue

@@ -53,8 +53,8 @@
         width="250">
         <template slot-scope="scope">
           <div class="inline-16" v-if="data.byhand == 0">
-            <a class="table_row_link inline-16" :href="scope.row.paperpdfurl" v-if="scope.row.paperpdfurl">纸票pdf</a>
-            <a class="table_row_link inline-16" :href="scope.row.pdfurl" v-if="scope.row.pdfurl">发票pdf</a>
+            <a class="table_row_link inline-16" target="_Blank" :href="scope.row.paperpdfurl" v-if="scope.row.paperpdfurl">纸票pdf</a>
+            <a class="table_row_link inline-16" target="_Blank" :href="scope.row.pdfurl" v-if="scope.row.pdfurl">发票pdf</a>
           </div>
           <div class="inline-16" v-else>
             <!-- <a class="table_row_link inline-16" :href="scope.row.paperpdfurl">上传发票</a> -->

+ 2 - 2
src/HDrpManagement/invoiceapp/detail/tab/redInvoice/components/invoiceTable.vue

@@ -48,8 +48,8 @@
         label="操作"
         width="190">
         <template slot-scope="scope">
-          <a class="table_row_link inline-16" v-if="scope.row.paperpdfurl" :href="scope.row.paperpdfurl">纸票pdf</a>
-          <a class="table_row_link inline-16" v-if="scope.row.pdfurl" :href="scope.row.pdfurl">发票pdf</a>
+          <a class="table_row_link inline-16" target="_Blank" v-if="scope.row.paperpdfurl" :href="scope.row.paperpdfurl">纸票pdf</a>
+          <a class="table_row_link inline-16" target="_Blank" v-if="scope.row.pdfurl" :href="scope.row.pdfurl">发票pdf</a>
           <el-button v-if="tool.checkAuth($route.name,'editRedInvioce')" @click="deleteRow(scope.row)" type="text" size="mini">删 除</el-button>
         </template>
       </el-table-column>

+ 14 - 12
src/HDrpManagement/orderManage/details/index.vue

@@ -49,33 +49,33 @@
           <el-button v-if="tool.checkAuth($route.name,'insert')"  type="primary" size="mini" @click="onCopy">复 制</el-button>
         </div>
         <template #headerBottom>
-          <div style="display:flex">
+          <div style="display:flex" v-if="Object.keys(mainData).length > 0">
             <div class="account_info">
-              <div style="margin-top:16px">
+              <div>
                 <p class="normal-title" style="margin-bottom:10px">支付信息</p>
               </div>
-              <div class="reveive__panel normal-margin inline-16">
+              <div class="reveive__panel inline-16">
                 <p class="flex-align-center"><small>结算企业:</small>&nbsp;<b>{{mainData.finance.enterprisename}}</b></p>
                 <div class="flex-align-center">
                   <p class="inline-16"><small>账户名称:&nbsp;</small>{{mainData.accountclass.accountname?mainData.accountclass.accountname:'未选择账户'}}</p>
                   <p class="inline-16"><small>账户余额:&nbsp;</small><b>¥{{tool.formatAmount(mainData.accountclass.balance?mainData.accountclass.balance:0,2)}}</b></p>
 
+                  <p><small>信用额度:&nbsp;</small>{{mainData.accountclass.creditquota ? tool.formatAmount(mainData.accountclass.creditquota,2) : mainData.accountclass.creditquota}}</p>&nbsp;
                   <p><small>本单金额:&nbsp;</small>{{mainData.rebate_used ? tool.formatAmount(mainData.defaultamount - rebateamount,2) : mainData.defaultamount}}</p>
-                  <p><small>本单金额:&nbsp;</small>{{mainData.accountclass.creditquota ? tool.formatAmount(mainData.accountclass.creditquota,2) : mainData.accountclass.creditquota}}</p>
                 </div>
                 <div v-if="(mainData.type === '标准订单' ||  mainData.type === '特殊订单') && isusedrebate === 1">
                   <div v-if="checked" class="flex-align-center">
-                    <p class="inline-16"><b>返利金余额:{{tool.formatAmount(mainData.rebatebalance,2)}}</b></p>
-                    <small>(返利金最高使用比例{{mainData.order_rebate_userate}})</small>
+                    <p class="inline-16"><small>返利金余额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebatebalance,2)}}</b></p>
+                    <p class="inline-16"><small>已使用返利金金额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebateamount,2)}}</b></p>
                   </div>
                 </div>
               </div>
             </div>
             <div class="address_info">
-              <div style="margin-top:16px">
+              <div>
                 <p class="normal-title" style="margin-bottom:10px">收货信息</p>
               </div>
-              <div class="reveive__panel normal-margin inline-16">
+              <div class="reveive__panel inline-16">
                 <div>
                   <p class="inline-16"><b>{{mainData.contactsEnterprise.enterprisename}}</b></p>
                   <p class="inline-16"><span class="inline-16"><b>{{mainData.contacts.name}}</b></span><small>{{mainData.contacts.phonenumber}}</small></p>
@@ -168,7 +168,9 @@ export default {
       selection:[],
       errorUrl:null,
       rebateamount:'',
-      isusedrebate:''
+      isusedrebate:'',
+      checked:0,
+
     }
   },
   provide () {
@@ -211,7 +213,7 @@ export default {
           }
         })
         this.mainData = res.data
-
+        this.checked = this.mainData.rebate_used
         if (this.mainData.rebateamount > this.mainData.defaultamount) {
           this.rebateamount = this.tool.formatAmount(+this.mainData.defaultamount / 2)
         } else {
@@ -377,7 +379,7 @@ export default {
         "content": {
         }
       })
-      this.isusedrebate = this.mainData.order_rebate_used
+      this.isusedrebate = res.data.order_rebate_used
     },
     /* 变更业务员 */
     salerChange (data) {
@@ -575,7 +577,7 @@ export default {
 .reveive__panel{
   font-size: 16px;
   line-height: 30px;
-  padding: 10px;
+  padding: 0 10px;
   background: #d9ecff;
   border: 1px dashed #0676e7;
 }

+ 1 - 1
src/HDrpManagement/orderManage/modules/edit.vue

@@ -586,7 +586,7 @@ export default {
           });
         }
       }else{
-        this.$message.error(res.msg);
+        this.$message.success(res.msg);
       }
     },
     // 查询站点是否使用返利金

+ 67 - 4
src/SDrpManagement/agentOrder/details/index.vue

@@ -38,7 +38,44 @@
             class="inline-16"
             v-if="mainData.status == '新建' && mainData.type != '特殊订单' && tool.checkAuth($route.name,'delete')"
           />
-      </div>
+        </div>
+        <template #headerBottom>
+          <div style="display:flex" v-if="Object.keys(mainData).length > 0">
+            <div class="account_info">
+              <div>
+                <p class="normal-title" style="margin-bottom:10px">支付信息</p>
+              </div>
+              <div class="reveive__panel inline-16">
+                <p class="flex-align-center"><small>结算企业:</small>&nbsp;<b>{{mainData.finance.enterprisename}}</b></p>
+                <div class="flex-align-center">
+                  <p class="inline-16"><small>账户名称:&nbsp;</small>{{mainData.accountclass.accountname?mainData.accountclass.accountname:'未选择账户'}}</p>
+                  <p class="inline-16"><small>账户余额:&nbsp;</small><b>¥{{tool.formatAmount(mainData.accountclass.balance?mainData.accountclass.balance:0,2)}}</b></p>
+
+                  <p><small>信用额度:&nbsp;</small>{{mainData.accountclass.creditquota ? tool.formatAmount(mainData.accountclass.creditquota,2) : mainData.accountclass.creditquota}}</p>&nbsp;
+                  <p><small>本单金额:&nbsp;</small>{{mainData.rebate_used ? tool.formatAmount(mainData.defaultamount - rebateamount,2) : mainData.defaultamount}}</p>
+                </div>
+                <div v-if="(mainData.type === '标准订单' ||  mainData.type === '特殊订单') && isusedrebate === 1">
+                  <div v-if="checked" class="flex-align-center">
+                    <p class="inline-16"><small>返利金余额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebatebalance,2)}}</b></p>
+                    <p class="inline-16"><small>已使用返利金金额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebateamount,2)}}</b></p>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="address_info">
+              <div>
+                <p class="normal-title" style="margin-bottom:10px">收货信息</p>
+              </div>
+              <div class="reveive__panel inline-16">
+                <div>
+                  <p class="inline-16"><b>{{mainData.contactsEnterprise.enterprisename}}</b></p>
+                  <p class="inline-16"><span class="inline-16"><b>{{mainData.contacts.name}}</b></span><small>{{mainData.contacts.phonenumber}}</small></p>
+                </div>
+                <small>{{mainData.contacts.province?mainData.contacts.province:'--'}}{{mainData.contacts.city}}{{mainData.contacts.county}}{{mainData.contacts.address?mainData.contacts.address:''}}</small>
+              </div>
+            </div>
+          </div>
+        </template>
       <div slot="slot1">
         <default-info :mainData="mainData"></default-info>
       </div>
@@ -98,7 +135,10 @@ export default {
       mainAreaData:{},
       backreason:'',
       dialogVisible:false,
-      errorUrl:null
+      errorUrl:null,
+      isusedrebate:'',
+      checked:0,
+      rebateamount:'',
     }
   },
   provide() {
@@ -129,9 +169,14 @@ export default {
           }
         })
         this.mainData = res.data
-        console.log(this.mainData);
-        
+        this.checked = this.mainData.rebate_used
+        if (this.mainData.rebateamount > this.mainData.defaultamount) {
+          this.rebateamount = this.tool.formatAmount(+this.mainData.defaultamount / 2)
+        } else {
+          this.rebateamount = this.mainData.rebateamount
+        }
         this.changeDataStructure()
+        this.queryUsedrebate()
         re()
       })
       
@@ -267,6 +312,17 @@ export default {
         });          
       });
     },
+    // 查询站点是否使用返利金
+    async queryUsedrebate () {
+      const res = await this.$api.requested({
+         "classname": "webmanage.site.site",
+        "method": "querySite_Parameter",
+        "content": {
+        }
+      })
+      this.isusedrebate = res.data.order_rebate_used
+      console.log(this.isusedrebate);
+    },
     // 反审核订单
     onReturnCheck () {
       this.$confirm(`是否反审核该订单`, '提示', {
@@ -393,4 +449,11 @@ export default {
 </script>
 
 <style scoped>
+.reveive__panel{
+  font-size: 16px;
+  line-height: 30px;
+  padding: 0 10px;
+  background: #d9ecff;
+  border: 1px dashed #0676e7;
+}
 </style>

+ 1 - 1
src/SDrpManagement/agentOrder/modules/edit.vue

@@ -556,7 +556,7 @@ export default {
           });
         }
       }else{
-        this.$message.error(res.msg);
+        this.$message.success(res.msg);
       }
 
     },

+ 2 - 2
src/SDrpManagement/invoiceapp_saler/detail/tab/blueInvoice/components/invoiceTable.vue

@@ -53,8 +53,8 @@
         width="250">
         <template slot-scope="scope">
           <div class="inline-16" v-if="data.byhand == 0">
-            <a class="table_row_link inline-16" :href="scope.row.paperpdfurl" v-if="scope.row.paperpdfurl">纸票pdf</a>
-            <a class="table_row_link inline-16" :href="scope.row.pdfurl" v-if="scope.row.pdfurl">发票pdf</a>
+            <a class="table_row_link inline-16" target="_Blank" :href="scope.row.paperpdfurl" v-if="scope.row.paperpdfurl">纸票pdf</a>
+            <a class="table_row_link inline-16" target="_Blank" :href="scope.row.pdfurl" v-if="scope.row.pdfurl">发票pdf</a>
           </div>
           <div class="inline-16" v-else>
             <!-- <a class="table_row_link inline-16" :href="scope.row.paperpdfurl">上传发票</a> -->

+ 2 - 2
src/SDrpManagement/invoiceapp_saler/detail/tab/redInvoice/components/invoiceTable.vue

@@ -48,8 +48,8 @@
         label="操作"
         width="190">
         <template slot-scope="scope">
-          <a class="table_row_link inline-16" :href="scope.row.paperpdfurl">纸票pdf</a>
-          <a class="table_row_link inline-16" :href="scope.row.pdfurl">发票pdf</a>
+          <a class="table_row_link inline-16" target="_Blank" :href="scope.row.paperpdfurl">纸票pdf</a>
+          <a class="table_row_link inline-16" target="_Blank" :href="scope.row.pdfurl">发票pdf</a>
           <el-button v-if="tool.checkAuth($route.name,'editRedInvioce')" @click="deleteRow(scope.row)" type="text" size="mini">删 除</el-button>
         </template>
       </el-table-column>

+ 67 - 4
src/SDrpManagement/salerOrder/details/index.vue

@@ -38,7 +38,44 @@
             class="inline-16"
             v-if="mainData.status == '新建' && mainData.type != '特殊订单' && tool.checkAuth($route.name,'delete')"
           />
-      </div>
+        </div>
+        <template #headerBottom>
+          <div style="display:flex" v-if="Object.keys(mainData).length > 0">
+            <div class="account_info">
+              <div>
+                <p class="normal-title" style="margin-bottom:10px">支付信息</p>
+              </div>
+              <div class="reveive__panel inline-16">
+                <p class="flex-align-center"><small>结算企业:</small>&nbsp;<b>{{mainData.finance.enterprisename}}</b></p>
+                <div class="flex-align-center">
+                  <p class="inline-16"><small>账户名称:&nbsp;</small>{{mainData.accountclass.accountname?mainData.accountclass.accountname:'未选择账户'}}</p>
+                  <p class="inline-16"><small>账户余额:&nbsp;</small><b>¥{{tool.formatAmount(mainData.accountclass.balance?mainData.accountclass.balance:0,2)}}</b></p>
+
+                  <p><small>信用额度:&nbsp;</small>{{mainData.accountclass.creditquota ? tool.formatAmount(mainData.accountclass.creditquota,2) : mainData.accountclass.creditquota}}</p>&nbsp;
+                  <p><small>本单金额:&nbsp;</small>{{mainData.rebate_used ? tool.formatAmount(mainData.defaultamount - rebateamount,2) : mainData.defaultamount}}</p>
+                </div>
+                <div v-if="(mainData.type === '标准订单' ||  mainData.type === '特殊订单') && isusedrebate === 1">
+                  <div v-if="checked" class="flex-align-center">
+                    <p class="inline-16"><small>返利金余额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebatebalance,2)}}</b></p>
+                    <p class="inline-16"><small>已使用返利金金额:&nbsp;</small><b>{{tool.formatAmount(mainData.rebateamount,2)}}</b></p>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <div class="address_info">
+              <div>
+                <p class="normal-title" style="margin-bottom:10px">收货信息</p>
+              </div>
+              <div class="reveive__panel inline-16">
+                <div>
+                  <p class="inline-16"><b>{{mainData.contactsEnterprise.enterprisename}}</b></p>
+                  <p class="inline-16"><span class="inline-16"><b>{{mainData.contacts.name}}</b></span><small>{{mainData.contacts.phonenumber}}</small></p>
+                </div>
+                <small>{{mainData.contacts.province?mainData.contacts.province:'--'}}{{mainData.contacts.city}}{{mainData.contacts.county}}{{mainData.contacts.address?mainData.contacts.address:''}}</small>
+              </div>
+            </div>
+          </div>
+        </template>
       <div slot="slot1">
         <default-info :mainData="mainData"></default-info>
       </div>
@@ -102,7 +139,10 @@ export default {
       mainAreaData:{},
       backreason:'',
       dialogVisible:false,
-      errorUrl:null
+      errorUrl:null,
+      isusedrebate:'',
+      checked:0,
+      rebateamount:'',
     }
   },
   provide () {
@@ -134,7 +174,15 @@ export default {
           }
         })
         this.mainData = res.data
+        this.checked = this.mainData.rebate_used
+        if (this.mainData.rebateamount > this.mainData.defaultamount) {
+          this.rebateamount = this.tool.formatAmount(+this.mainData.defaultamount / 2)
+        } else {
+          this.rebateamount = this.mainData.rebateamount
+        }
         this.changeDataStructure()
+        this.queryUsedrebate()
+
         re()
       })
       
@@ -304,9 +352,18 @@ export default {
       this.$router.replace({path:'/saler_orderDetails',query:{id:id,rowindex:rowindex}})
       this.queryMainData(id)
     },
+    // 查询站点是否使用返利金
+    async queryUsedrebate () {
+      const res = await this.$api.requested({
+         "classname": "webmanage.site.site",
+        "method": "querySite_Parameter",
+        "content": {
+        }
+      })
+      this.isusedrebate = res.data.order_rebate_used
+    },
     // 提交审核订单 saletype
     onSubmit (type) {
-      
       let siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
       console.log(siteid,this.mainData.saletype)
       if (siteid == 'HY' && this.mainData.saletype == '') return this.$message({
@@ -455,5 +512,11 @@ export default {
 </script>
 
 <style scoped>
-
+.reveive__panel{
+  font-size: 16px;
+  line-height: 30px;
+  padding: 0 10px;
+  background: #d9ecff;
+  border: 1px dashed #0676e7;
+}
 </style>

+ 1 - 1
src/SDrpManagement/salerOrder/modules/edit.vue

@@ -563,7 +563,7 @@ export default {
           });
         }
       }else{
-        this.$message.error(res.msg);
+        this.$message.success(res.msg);
       }
     },
     // 查询站点是否使用返利金

+ 4 - 0
src/components/socketMessage/index.vue

@@ -84,6 +84,10 @@
           this.panelIsShow = true
           this.list = [JSON.parse(msg.data).message]
           this.getMessageList()
+          console.log(JSON.parse(msg.data),JSON.parse(msg.data).title,JSON.parse(msg.data).title == 'refresh')
+          if (JSON.parse(msg.data).message.title == 'refresh') {
+            this.$router.go(0)
+          }
         }
       },
       send: function (type,val,timsubjectid) {

+ 13 - 9
src/main.js

@@ -70,15 +70,19 @@ ElementUI.Drawer.props.showClose.default = false;
 /* table懒加载 */
 Vue.directive('tableLoad',{
   bind (el,binding) {
-    setTimeout(() => {
-    let tableWarp = document.querySelector('.el-table__body-wrapper')
-    console.log(tableWarp);
-
-      tableWarp.addEventListener('scroll',(e) => {
-        console.log(e);
-      })
-    },10000)
-    
+    let tableWarp = el.querySelector('.el-table__body-wrapper')
+    function handleFun (e) {
+      if (tableWarp.scrollTop + tableWarp.clientHeight >= tableWarp.scrollHeight) {
+        binding.value()
+      }
+    }
+    tableWarp.addEventListener('scroll',handleFun)
+    el.tableWarp = tableWarp
+    el.handleFun = handleFun
+  },
+  unbind (el,binding) {
+    /* 解绑 */
+    el.tableWarp.removeEventListener('scroll',el.handleFun)
   }
 })
 

+ 2 - 2
vue.config.js

@@ -15,8 +15,8 @@ module.exports = {
       proxy: {
         '/apis': {
           // target: 'http://61.164.207.46:8000',  // target host*/
-          target: 'http://192.168.3.9:8090',  // target host*!
-          // target: 'https://oms.idcgroup.com.cn:8079/',  // target host
+          // target: 'http://192.168.3.9:8090',  // target host*!
+          target: 'https://oms.idcgroup.com.cn:8079/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets 
           changeOrigin: true,  // needed for virtual hosted sites