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

二维码加上水印;代客录单报价加上userId

lihongxiao 2 лет назад
Родитель
Сommit
9a4b043e84

+ 2 - 2
config/dev.env.js

@@ -6,12 +6,12 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG:'"dev"',
   // BASE_URL: '"https://test.baoxianzhanggui.com/web-api"',//测试服务器
-  // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
+  BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL:'"https://sxzgkj.baoxianzhanggui.com/web-api"'//正式服务器
   // BASE_URL: '"http://192.168.0.115:8080/"' //凯森
   // BASE_URL: '"http:///192.168.0.106:8080/"',//屈晨
   // BASE_URL: '"http:///192.168.0.253:8080/"',//田智
-  BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
+  // BASE_URL: '"http:///192.168.0.42:8080/"',//武鸿鹏
   // BASE_URL: '"http://192.168.1.101:8080/"',
   // BASE_URL: '"http:///192.168.0.22:8080/"',//郝宇
   // BASE_URL: '"http:///192.168.0.103:8080/"',//

+ 51 - 0
src/main.js

@@ -32,6 +32,57 @@ Vue.use(Viewer, {
     loading: false
   }
 })
+// 注册一个全局自定义指令 `v-watermark`
+Vue.directive('watermark', {
+  inserted: function (el, binding) {
+    // 获取绑定的水印文字
+    // const text = binding.value || '水印';
+    // const canvas = document.createElement('canvas');
+    // const ctx = canvas.getContext('2d');
+    // canvas.width = 250;
+    // canvas.height = 200;
+    // ctx.font = '16px Arial';
+    // ctx.fillStyle = 'rgba(0, 0, 0, 0.2)';
+    // ctx.textAlign = 'center';
+    // ctx.textBaseline = 'middle';
+    // ctx.translate(canvas.width / 2, canvas.height / 2);
+    // ctx.rotate(-30*Math.PI/180);
+    // ctx.fillText(text,0,10);
+    // const base64 = canvas.toDataURL('image/png');
+    // el.style.backgroundImage = `url('${base64}')`;
+    // el.style.backgroundColor = '#fff';
+
+
+    const watermarkText = binding.value || '默认水印';
+    const canvas = document.createElement('canvas');
+    const ctx = canvas.getContext('2d');
+    canvas.width = 300;
+    canvas.height = 250;
+    ctx.fillStyle = 'rgba(180, 180, 180, 0.3)';
+    // ctx.fillRect(0, 0, canvas.width, canvas.height);
+    ctx.font = '16px Arial';
+    ctx.fillStyle = 'rgba(0, 0, 0, 0.2)';
+    ctx.textAlign = 'center';
+    ctx.textBaseline = 'middle';
+    ctx.translate(canvas.width / 2, canvas.height / 2);
+     ctx.rotate(-30*Math.PI/180);
+    ctx.fillText(watermarkText, 0, 0);
+    const base64 = canvas.toDataURL('image/png');
+    const watermarkDiv = document.createElement('div');
+    watermarkDiv.style.position = 'absolute';
+    watermarkDiv.style.top = '0px';
+    watermarkDiv.style.left = '0px';
+    watermarkDiv.style.width = `${el.offsetWidth}px`;
+    watermarkDiv.style.height = `${el.offsetHeight}px`;
+    watermarkDiv.style.pointerEvents = 'none';
+    watermarkDiv.style.backgroundImage = `url('${base64}')`;
+    // watermarkDiv.style.backgroundSize = '100% 100%';
+    // watermarkDiv.style.backgroundColor = 'rgba(255,255,255,0.1)';
+    watermarkDiv.style.zIndex = '1000';
+    console.log(el.offsetHeight,222222222222);
+    el.appendChild(watermarkDiv);
+  }
+});
 // ElementUI.Dialog.props.lockScroll.default = false;
 Vue.config.productionTip = false;
 VueClipboard.config.autoSetContainer = true

+ 1 - 1
src/views/Core/components/quotationDialog.vue

@@ -4,7 +4,7 @@
       width="1080px"
       class="quotation_style"
     >
-        <div id="pdfContentsDiv" style="padding: 25px;">
+        <div id="pdfContentsDiv" style="padding: 25px;height: auto;" v-watermark="queryOrders.id">
             <div slot="title" class="dialog-title quotation-title">
                 <img
             :src="queryOrders.logoImg"

+ 4 - 0
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/InvoicingUnsettled.vue

@@ -74,6 +74,9 @@ export default {
                     {
                         type: 'primary',
                         label: '结算',
+                        hide:(row)=>{
+                            return !row.invoicCommissionFeevalue?true:false
+                        },
                         click: (row, index) => { return this.balanceFun(row) },
                     }
                 ]
@@ -141,6 +144,7 @@ export default {
                 .batchBxBalance({ids:row.ids})
                 .then(res => {
                     if (res.code==200) {
+                        this.findPage()
                         this.$message({
                             message: res.msg ||'操作成功',
                             type: 'success'

+ 5 - 2
src/views/Letter/Orderlist.vue

@@ -223,7 +223,7 @@
     </div>
     <!--第一种 二维码 -->
     <el-dialog :visible.sync="codedialogVisible" width="430px" top="10vh" class="saomazhifucodeClass">
-      <div class="ORcodebody">
+      <div class="ORcodebody" v-watermark="qrCodeId">
         <div slot="title" class="dialog-title">
           <span>扫码付款</span>
         </div>
@@ -415,6 +415,7 @@ export default {
     return {
       qrcodeWidth: '180',
       qrcodeHeight: '180',
+      qrCodeId:'',
       ddgjdialogVisible: false,
       trajectoryTable: [],
       queryOrders: {
@@ -932,6 +933,7 @@ export default {
     },
     //二维码
     carcode(row, item) {
+      this.qrCodeId=item.id
       this.$api.letter.getQrCode(item.id).then((res) => {
         if (res.code == "200") {
           this.inscompany = res.data.inscompany; //保险公司
@@ -2138,7 +2140,8 @@ export default {
 
 .ORcodebody {
   height: auto;
-  background: url(../../assets/image/group.png) #fff;
+  background-color: #fff;
+  //background: url(../../assets/image/group.png) #fff;
   padding: 16px;
 }
 

+ 5 - 0
src/views/PeopleManage/Agent/AgentManage.vue

@@ -536,6 +536,11 @@ export default {
             label: "角色",
             type: "text",
           },
+          {
+          prop: "managementSource",
+          label: "来源",
+          sortable: false,
+        },
           {
             prop: "status",
             label: "状态",

+ 5 - 0
src/views/PeopleManage/Player/PlayerManage.vue

@@ -308,6 +308,11 @@ export default {
             label: "角色",
             type: "text",
           },
+          {
+          prop: "managementSource",
+          label: "来源",
+          sortable: false,
+        },
           {
             prop: "status",
             label: "状态",

+ 5 - 0
src/views/PeopleManage/Player/PlayerManageteam.vue

@@ -498,6 +498,11 @@ export default {
             label: "角色",
             type: "text",
           },
+          {
+          prop: "managementSource",
+          label: "来源",
+          sortable: false,
+        },
           {
             prop: "status",
             label: "状态",

+ 5 - 0
src/views/PeopleManage/TeamLeader/TeamLeaderManage.vue

@@ -557,6 +557,11 @@ export default {
           minWidth: 80,
           sortable: false,
         },
+        {
+          prop: "managementSource",
+          label: "来源",
+          sortable: false,
+        },
         {
           prop: "status",
           label: "状态",

+ 4 - 4
src/views/Task/DaikeLetter.vue

@@ -73,22 +73,22 @@
         <el-row :gutter="20">
           <el-col :span="12">
             <el-form-item label="业务员">
-              <el-input v-model="salespersonForm.name" placeholder="业务员" ></el-input>
+              <el-input v-model="salespersonForm.name" placeholder="业务员" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="工号">
-              <el-input v-model="salespersonForm.userId" placeholder="工号" ></el-input>
+              <el-input v-model="salespersonForm.userId" placeholder="工号" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="12">
             <el-form-item label="手机号">
-              <el-input v-model="salespersonForm.mobile" placeholder="手机号" ></el-input>
+              <el-input v-model="salespersonForm.mobile" placeholder="手机号" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="9">
             <el-form-item label="身份证号">
-              <el-input v-model="salespersonForm.identity" placeholder="身份证号" ></el-input>
+              <el-input v-model="salespersonForm.identity" placeholder="身份证号" clearable></el-input>
             </el-form-item>
           </el-col>
           <el-col :span="2">

+ 5 - 2
src/views/Task/daikeComponents/KtOrder.vue

@@ -356,7 +356,7 @@
       top="10vh"
       class="saomazhifucodeClass"
     >
-      <div class="ORcodebody">
+      <div class="ORcodebody"  v-watermark="qrCodeId">
         <div slot="title" class="dialog-title">
           <span>扫码付款</span>
         </div>
@@ -609,6 +609,7 @@ export default {
       orderLoaing:false,
       qrcodeWidth: "180",
       qrcodeHeight: "180",
+      qrCodeId:'',
       ddgjdialogVisible: false,
       trajectoryTable: [],
       queryOrders: {
@@ -1094,6 +1095,7 @@ export default {
     },
     //二维码
     carcode(row, item) {
+      this.qrCodeId=item.id
       this.$api.letter.getQrCode(item.id).then(res => {
         if (res.code == "200") {
           this.inscompany = res.data.inscompany; //保险公司
@@ -2237,8 +2239,9 @@ export default {
 }
 .ORcodebody {
   height: auto;
-  background: url(../../../assets/image/group.png) #fff;
+  // background: url(../../../assets/image/group.png) #fff;
   padding: 16px;
+  background-color: #fff;
 }
 .ORcode {
   width: 100%;