Browse Source

开票管理

fanghuisheng 1 year ago
parent
commit
a97da60835

+ 10 - 0
src/api/common/invoicing/index.js

@@ -0,0 +1,10 @@
+import { request } from "@/utils/request";
+
+//客户发票信息表-新增
+export function crmInvoiceInfo(param) {
+    return request({
+        url: "/service-iot/crmInvoiceInfo",
+        method: "POST",
+        data: param,
+    });
+}

+ 7 - 0
src/pages.json

@@ -118,6 +118,13 @@
             "navigationBarTitleText": "",
             "navigationBarTitleText": "",
             "enablePullDownRefresh": false
             "enablePullDownRefresh": false
           }
           }
+        },
+        {
+          "path": "invoicing/index",
+          "style": {
+            "navigationBarTitleText": "续费提醒",
+            "enablePullDownRefresh": false
+          }
         }
         }
       ]
       ]
     },
     },

+ 209 - 156
src/pages/business/fireIot/facilitiesGather/index.vue

@@ -22,34 +22,34 @@
                     <u-radio v-for="se in sexList" :key="se" :activeColor="proxy.$settingStore.themeColor.color" :label="se.text" :name="se.value" style="margin-right: 15px"></u-radio>
                     <u-radio v-for="se in sexList" :key="se" :activeColor="proxy.$settingStore.themeColor.color" :label="se.text" :name="se.value" style="margin-right: 15px"></u-radio>
                   </u-radio-group>
                   </u-radio-group>
                 </u-form-item>
                 </u-form-item>
-                <u-form-item label="设施地址" prop="address" :borderBottom="true" @click="handleAction('设施地址')" required>
-                  <u-input v-model="form.address" placeholder="请选择设施地址" border="none" disabledColor="transparent" disabled>
+                <u-form-item label="设施地址" prop="address" :borderBottom="true" required>
+                  <u-input v-model="form.address" placeholder="请选择设施地址" border="none" disabledColor="transparent" disabled @click="handleAction('设施地址')">
                     <template #suffix>
                     <template #suffix>
                       <view class="iconfont ucicon-map menu-icon" style="font-size: 18px; color: #909399"> </view>
                       <view class="iconfont ucicon-map menu-icon" style="font-size: 18px; color: #909399"> </view>
                     </template>
                     </template>
                   </u-input>
                   </u-input>
                 </u-form-item>
                 </u-form-item>
                 <u-form-item label="行政区划" prop="facilityAddress" :borderBottom="true" required>
                 <u-form-item label="行政区划" prop="facilityAddress" :borderBottom="true" required>
-                  <view>
-                    <u-input v-model="form.address" placeholder="" border="none" disabledColor="transparent" disabled />
+                  <view style="width: 100%">
+                    <view style="font-size: 15px"> {{ form.address ? form.address.split(form.facilityAddress)[0] : "" }}</view>
                     <u-input v-model="form.facilityAddress" placeholder="请输入详细地址" border="none" />
                     <u-input v-model="form.facilityAddress" placeholder="请输入详细地址" border="none" />
                   </view>
                   </view>
                 </u-form-item>
                 </u-form-item>
-                <u-form-item v-if="!form.typeGuise == 1" label="类型" prop="gpsAreas" :borderBottom="true" @click="handleAction('类型')" required>
-                  <view>{{ form.typeGuise == 1 ? "点" : form.typeGuise == 2 ? "线" : form.typeGuise == 3 ? "面" : "" }}</view>
-                  <view v-if="!form.gpsAreas" style="margin: auto; color: #ff0000">未编辑</view>
-                  <view v-if="form.gpsAreas" style="margin: auto; color: #30bb00">已编辑</view>
+                <u-form-item v-if="form.typeGuise && form.typeGuise != 1" label="类型" prop="gpsAreas" :borderBottom="true" @click="handleAction('类型')" required>
+                  <view style="font-size: 15px">{{ form.typeGuise == 1 ? "点" : form.typeGuise == 2 ? "线" : form.typeGuise == 3 ? "面" : "" }}</view>
+                  <view v-if="form.gpsAreas.length <= 0" style="font-size: 15px; margin: auto; color: #ff0000">未编辑</view>
+                  <view v-if="form.gpsAreas.length > 0" style="font-size: 15px; margin: auto; color: #30bb00">已编辑</view>
                   <view class="iconfont ucicon-bianji1 menu-icon" style="font-size: 14px; color: #909399"> </view>
                   <view class="iconfont ucicon-bianji1 menu-icon" style="font-size: 14px; color: #909399"> </view>
                 </u-form-item>
                 </u-form-item>
-                <u-form-item label="联系人" prop="contact" :borderBottom="true" required>
+                <u-form-item label="联系人" prop="contact" :borderBottom="true">
                   <u-input v-model="form.contact" placeholder="请输入联系人" border="none" />
                   <u-input v-model="form.contact" placeholder="请输入联系人" border="none" />
                 </u-form-item>
                 </u-form-item>
-                <u-form-item label="联系电话" prop="contactPhone" required :borderBottom="true">
+                <u-form-item label="联系电话" prop="contactPhone" :borderBottom="true">
                   <u-input v-model="form.contactPhone" placeholder="请输入联系电话" border="none" maxlength="11" />
                   <u-input v-model="form.contactPhone" placeholder="请输入联系电话" border="none" maxlength="11" />
                 </u-form-item>
                 </u-form-item>
-                <u-form-item label="设备图片" prop="imagesUrl" required :borderBottom="true">
+                <u-form-item label="设备图片" prop="imagesUrl" :borderBottom="true">
                   <view class="flex flex-wrap">
                   <view class="flex flex-wrap">
-                    <view class="uploadView" style="width: 110px; margin-bottom: 0px" v-if="form.imagesUrl">
+                    <view class="uploadView" style="width: 80px; height: 80px; margin-bottom: 0px" v-if="form.imagesUrl">
                       <view class="uploadUimage">
                       <view class="uploadUimage">
                         <u-image width="100%" height="100%" :src="form.imagesUrl"></u-image>
                         <u-image width="100%" height="100%" :src="form.imagesUrl"></u-image>
                       </view>
                       </view>
@@ -58,12 +58,12 @@
                         <u-icon name="close" color="#ffffff" size="12"></u-icon>
                         <u-icon name="close" color="#ffffff" size="12"></u-icon>
                       </view>
                       </view>
                     </view>
                     </view>
-                    <view :class="'uploadView upload-buttom'" style="width: 110px; margin-bottom: 0px" v-if="!form.imagesUrl" @click="uploadClick">
-                      <u-icon style="margin: auto" name="plus" color="#909399" size="28"></u-icon>
+                    <view :class="'uploadView upload-buttom'" style="width: 80px; height: 80px; margin-bottom: 0px" v-if="!form.imagesUrl" @click="uploadClick">
+                      <u-icon style="margin: auto" name="plus" color="#909399" size="20"></u-icon>
                     </view>
                     </view>
                   </view>
                   </view>
                 </u-form-item>
                 </u-form-item>
-                <u-form-item label="备注" prop="facilityDesc" required :borderBottom="true">
+                <u-form-item label="备注" prop="facilityDesc" :borderBottom="true">
                   <u-textarea v-model="form.facilityDesc" placeholder="请输入" border="none" maxlength="30" style="padding: 0px"></u-textarea>
                   <u-textarea v-model="form.facilityDesc" placeholder="请输入" border="none" maxlength="30" style="padding: 0px"></u-textarea>
                 </u-form-item>
                 </u-form-item>
 
 
@@ -81,14 +81,24 @@
                     ></u-radio>
                     ></u-radio>
                   </u-radio-group>
                   </u-radio-group>
 
 
-                  <uni-data-select v-if="fo.type === 'XLK'" v-model="fo.value" :placeholder="'请选择' + fo.name" :localdata="fo.list"></uni-data-select>
+                  <u-input
+                    v-if="fo.type === 'XLK'"
+                    v-model="fo.valueName"
+                    :placeholder="'请选择' + fo.name"
+                    suffixIcon="arrow-right"
+                    suffixIconStyle="color: #909399"
+                    border="none"
+                    disabledColor="transparent"
+                    disabled
+                    @click="handleAction('属性', fo)"
+                  />
                 </u-form-item>
                 </u-form-item>
               </view>
               </view>
             </view>
             </view>
           </view>
           </view>
         </u--form>
         </u--form>
 
 
-        <view style="padding-bottom: 140px"> </view>
+        <view style="padding-bottom: 100px"> </view>
 
 
         <view class="app-button-fixed">
         <view class="app-button-fixed">
           <view class="app-flex">
           <view class="app-flex">
@@ -156,29 +166,7 @@ const dataList = reactive({
     },
     },
   ],
   ],
 
 
-  form: {
-    department: "", //所属部门
-    facilityType: "", //设施类型
-    facilityTypeName: "", //设施类型名称
-    facilityName: "", //设施名称
-    status: "0", //设施状态
-    address: "", //设施地址
-    longitude: "", //经度
-    latitude: "", //纬度
-    province: "", //省
-    city: "", //市
-    area: "", //区(县)
-    facilityAddress: "", //详细地址
-    streetTown: null, //所属街镇
-    gpsAreas: "", //经纬度集合
-    contact: "", //联系人
-    contactPhone: "", //联系方式
-    imagesUrl: "", //图⽚地址URL
-    facilityDesc: "", //备注
-    extendData: [], //扩展属性
-    recordPictureList: [],
-    typeGuise: undefined, //点线面类型
-  },
+  form: publicStore.$state.facilitiesGatherArray,
 
 
   rules: {
   rules: {
     department: [
     department: [
@@ -223,42 +211,42 @@ const dataList = reactive({
         trigger: ["blur", "change"],
         trigger: ["blur", "change"],
       },
       },
     ],
     ],
-    contact: [
-      {
-        required: true,
-        message: "请输入联系人",
-        trigger: ["blur", "change"],
-      },
-    ],
-    contactPhone: [
-      {
-        required: true,
-        message: "请输入联系人电话",
-        trigger: ["blur", "change"],
-      },
-      {
-        type: "string",
-        min: 11,
-        required: true,
-        message: "请输入正确11位联系人电话",
-        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-        trigger: ["blur", "change"],
-      },
-    ],
-    imagesUrl: [
-      {
-        required: true,
-        message: "请选择图片",
-        trigger: ["blur", "change"],
-      },
-    ],
-    facilityDesc: [
-      {
-        required: true,
-        message: "请输入备注",
-        trigger: ["blur", "change"],
-      },
-    ],
+    // contact: [
+    //   {
+    //     required: true,
+    //     message: "请输入联系人",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // contactPhone: [
+    //   {
+    //     required: true,
+    //     message: "请输入联系人电话",
+    //     trigger: ["blur", "change"],
+    //   },
+    //   {
+    //     type: "string",
+    //     min: 11,
+    //     required: true,
+    //     message: "请输入正确11位联系人电话",
+    //     pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // imagesUrl: [
+    //   {
+    //     required: true,
+    //     message: "请选择图片",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
+    // facilityDesc: [
+    //   {
+    //     required: true,
+    //     message: "请输入备注",
+    //     trigger: ["blur", "change"],
+    //   },
+    // ],
   },
   },
 
 
   actionIndex: 0,
   actionIndex: 0,
@@ -274,6 +262,110 @@ const { sexList, form, rules, actionIndex, actionIndex1, actionTitle, actionShow
 const uForm = ref(null);
 const uForm = ref(null);
 const successBool = ref(false);
 const successBool = ref(false);
 
 
+/**
+ * @初始化
+ */
+function init() {
+  typeSelect({ id: "" }).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      requset.data.forEach((el) => {
+        typeSelectList.value[0].push({ name: el.typeName, value: el.id, typeGuise: el.typeGuise, dataField: el.dataField ? JSON.parse(el.dataField) : [] });
+      });
+    }
+  });
+
+  treeselect({}).then((requset) => {
+    if (requset.status === "SUCCESS") {
+      requset.data.forEach((el) => {
+        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
+      });
+
+      var data = [
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it",
+              children: [
+                {
+                  id: 126,
+                  label: "二组",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it1",
+              children: [
+                {
+                  id: 126,
+                  label: "1组",
+                },
+              ],
+            },
+          ],
+        },
+        {
+          id: 124,
+          label: "公司",
+          children: [
+            {
+              id: 125,
+              label: "it2",
+              children: [
+                {
+                  id: 126,
+                  label: "3组",
+                },
+              ],
+            },
+          ],
+        },
+      ];
+
+      data.forEach((el) => {
+        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
+      });
+    }
+  });
+}
+
+/**
+ * @清空数据
+ */
+function wipeData() {
+  form.value.department = ""; //所属部门
+  form.value.facilityType = ""; //设施类型
+  form.value.facilityTypeName = ""; //设施类型名称
+  form.value.facilityName = ""; //设施名称
+  form.value.status = "0"; //设施状态
+  form.value.address = ""; //设施地址
+  form.value.longitude = ""; //经度
+  form.value.latitude = ""; //纬度
+  form.value.province = ""; //省
+  form.value.city = ""; //市
+  form.value.area = ""; //区(县)
+  form.value.facilityAddress = ""; //详细地址
+  form.value.streetTown = null; //所属街镇
+  form.value.gpsAreas = []; //经纬度集合
+  form.value.contact = ""; //联系人
+  form.value.contactPhone = ""; //联系方式
+  form.value.imagesUrl = ""; //图⽚地址URL
+  form.value.facilityDesc = ""; //备注
+  form.value.extendData = []; //扩展属性
+  form.value.recordPictureList = [];
+  form.value.typeGuise = ""; //点线面类型
+  form.value.gpsAreas = [];
+}
+
 /**
 /**
  * @api提交
  * @api提交
  */
  */
@@ -315,13 +407,14 @@ function handleSubmit(type) {
       });
       });
   } else {
   } else {
     proxy.$tab.navigateBack();
     proxy.$tab.navigateBack();
+    wipeData();
   }
   }
 }
 }
 
 
 /**
 /**
  * @action弹出框点击事件
  * @action弹出框点击事件
  */
  */
-function handleAction(value, index, index1) {
+function handleAction(value, array) {
   actionsList.value = [[]];
   actionsList.value = [[]];
 
 
   if (value == "所属部门") {
   if (value == "所属部门") {
@@ -347,14 +440,33 @@ function handleAction(value, index, index1) {
   }
   }
 
 
   if (value == "设施地址") {
   if (value == "设施地址") {
+    publicStore.$state.facilitiesGatherType = "点";
     proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
     proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
     return;
     return;
   }
   }
 
 
   if (value == "类型") {
   if (value == "类型") {
+    if (form.value.typeGuise === 2) {
+      publicStore.$state.facilitiesGatherType = "线";
+    } else if (form.value.typeGuise === 3) {
+      publicStore.$state.facilitiesGatherType = "面";
+    }
+    proxy.$tab.navigateTo("/pages/business/fireIot/facilitiesGather/mapGather");
+
     return;
     return;
   }
   }
 
 
+  if (value == "属性") {
+    actionTitle.value = array.name;
+    actionsList.value = [array.list];
+
+    array.list.forEach((el, ind) => {
+      if (el.value === array.value) {
+        actionDefaultIndex.value = ind;
+      }
+    });
+  }
+
   actionShow.value = true;
   actionShow.value = true;
 }
 }
 
 
@@ -365,6 +477,8 @@ function selectAction(e) {
   console.log(e);
   console.log(e);
 
 
   if (actionTitle.value == "设施类型") {
   if (actionTitle.value == "设施类型") {
+    wipeData();
+
     form.value.facilityType = e.value[0].value;
     form.value.facilityType = e.value[0].value;
     form.value.facilityTypeName = e.value[0].name;
     form.value.facilityTypeName = e.value[0].name;
     form.value.typeGuise = e.value[0].typeGuise;
     form.value.typeGuise = e.value[0].typeGuise;
@@ -373,11 +487,12 @@ function selectAction(e) {
       form.value.extendData = e.value[0].dataField;
       form.value.extendData = e.value[0].dataField;
 
 
       form.value.extendData.forEach((el) => {
       form.value.extendData.forEach((el) => {
+        el.valueName = "";
         if (el.type === "XLK") {
         if (el.type === "XLK") {
           if (el.list) {
           if (el.list) {
             el.list.forEach((e) => {
             el.list.forEach((e) => {
+              e.name = e.attributeValue;
               e.value = e.attributeCode;
               e.value = e.attributeCode;
-              e.text = e.attributeValue;
             });
             });
           }
           }
         }
         }
@@ -387,6 +502,15 @@ function selectAction(e) {
     }
     }
   }
   }
 
 
+  if (actionTitle.value.indexOf("属性") != -1) {
+    form.value.extendData.forEach((el) => {
+      if (el.type === "XLK") {
+        el.valueName = e.value[0].name;
+        el.value = e.value[0].value;
+      }
+    });
+  }
+
   // if (actionTitle.value == "灭火器") {
   // if (actionTitle.value == "灭火器") {
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishType = e.value[0].name;
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishType = e.value[0].name;
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishTypeValue = e.value[0].value;
   //   form.value.baseBuildList[actionIndex.value].baseBuildExtinguishList[actionIndex1.value].extinguishTypeValue = e.value[0].value;
@@ -410,11 +534,13 @@ function changeHandler(e) {
   } = e;
   } = e;
   // 当第一列值发生变化时,变化第二列(后一列)对应的选项
   // 当第一列值发生变化时,变化第二列(后一列)对应的选项
 
 
-  console.log(columnIndex, index);
+  if (actionTitle.value == "所属部门") {
+    console.log(columnIndex, index);
 
 
-  if (columnIndex === 0) {
-    // picker为选择器this实例,变化第二列对应的选项
-    picker.setColumnValues(1, columnData[index]);
+    if (columnIndex === 0) {
+      // picker为选择器this实例,变化第二列对应的选项
+      picker.setColumnValues(1, columnData[index]);
+    }
   }
   }
 }
 }
 
 
@@ -455,80 +581,7 @@ function uploadViewClose(el) {
 }
 }
 
 
 onLoad((options) => {
 onLoad((options) => {
-  form.value.baseBuildList = [];
-  rules.value.baseBuildList = [];
-
-  typeSelect({ id: "" }).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      requset.data.forEach((el) => {
-        typeSelectList.value[0].push({ name: el.typeName, value: el.id, typeGuise: el.typeGuise, dataField: el.dataField ? JSON.parse(el.dataField) : [] });
-      });
-    }
-  });
-
-  treeselect({}).then((requset) => {
-    if (requset.status === "SUCCESS") {
-      console.log(requset.data);
-      requset.data.forEach((el) => {
-        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
-      });
-
-      var data = [
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it",
-              children: [
-                {
-                  id: 126,
-                  label: "二组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it1",
-              children: [
-                {
-                  id: 126,
-                  label: "1组",
-                },
-              ],
-            },
-          ],
-        },
-        {
-          id: 124,
-          label: "公司",
-          children: [
-            {
-              id: 125,
-              label: "it2",
-              children: [
-                {
-                  id: 126,
-                  label: "3组",
-                },
-              ],
-            },
-          ],
-        },
-      ];
-
-      data.forEach((el) => {
-        treeselectList.value[0].push({ name: el.label, value: el.id, children: el.children });
-      });
-    }
-  });
+  init();
 });
 });
 
 
 onShow(() => {
 onShow(() => {

+ 424 - 0
src/pages/common/invoicing/index.vue

@@ -0,0 +1,424 @@
+<template>
+  <u-sticky class="shadow-default" bgColor="#fff" style="top: 0">
+    <u-tabs :list="tabsList" :current="tabsCurrent" @click="tabsClick" lineColor="#333" :activeStyle="{ color: '#333' }" :inactiveStyle="{ color: '#909399' }" :scrollable="false"></u-tabs>
+  </u-sticky>
+
+  <scroll-view class="invoicing-container scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
+    <view v-show="tabsCurrent == 0">
+      <u-notice-bar text="注:查询到您近期有开票记录,请勿重复开票" :duration="9000" color="#FF0000" bgColor="#FFFFFF"></u-notice-bar>
+
+      <view class="menu-list" style="font-size: 15px; line-height: 30px">
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view>
+              您的物联网服务
+              <span style="color: red">即将到期</span>
+              ,如需续费请联系您的专职销售顾问,如已付费可直接填写开票信息。
+            </view>
+          </view>
+        </view>
+        <view class="list-cell" style="color: #666666">
+          <view class="menu-item-box">
+            <view> 客户经理:李鹏 </view>
+          </view>
+          <view class="menu-item-box">
+            <view> 联系方式:18621761642(同微信) </view>
+            <view class="iconfont ucicon-a-copy menu-icon" style="font-size: 14px; color: #909399" @click="copy('18621761642')"> </view>
+          </view>
+          <view class="menu-item-box">
+            <view style="margin-right: 10px"> 邮箱:seven.li@chinausky.com </view>
+            <view class="iconfont ucicon-a-copy menu-icon" style="font-size: 14px; color: #909399" @click="copy('seven.li@chinausky.com')"> </view>
+          </view>
+          <view class="menu-item-box">
+            <view> 客服电话:021-65376655</view>
+          </view>
+          <view class="menu-item-box">
+            <view> 公司邮箱:admin@chinausky.com</view>
+          </view>
+        </view>
+      </view>
+
+      <view class="menu-list" style="font-size: 15px">
+        <view class="list-cell" style="color: #666666">
+          <view class="menu-item-box">
+            <view>开票信息</view>
+          </view>
+
+          <u--form :model="form" ref="uForm" :rules="rules" labelWidth="80">
+            <view style="padding: 10px 0 10px 0; background: #ffffff">
+              <view style="padding-left: 9px">
+                <u-form-item label="发票抬头" prop="invoiceTitle" :borderBottom="true" required>
+                  <u-input v-model="form.invoiceTitle" placeholder="请填写发票抬头" border="none" />
+                </u-form-item>
+                <u-form-item label="税号" prop="dutyId" :borderBottom="true" required>
+                  <u-input v-model="form.dutyId" placeholder="请填写税号" border="none" maxlength="18" />
+                </u-form-item>
+                <u-form-item label="电子邮箱" prop="email" :borderBottom="true" required>
+                  <u-input v-model="form.email" placeholder="请填写电子邮箱" border="none" />
+                </u-form-item>
+                <u-form-item label="申请人" prop="applicant" :borderBottom="true" required>
+                  <u-input v-model="form.applicant" placeholder="请填写申请人" border="none" maxlength="10" />
+                </u-form-item>
+                <u-form-item label="手机号" prop="phone" :borderBottom="true" required>
+                  <u-input v-model="form.phone" placeholder="请填写手机号" border="none" maxlength="11" />
+                </u-form-item>
+                <u-form-item label="金额" prop="amount" :borderBottom="true" required>
+                  <u-input type="number" v-model="form.amount" placeholder="请填写金额" border="none" />
+                </u-form-item>
+                <u-form-item label="发票类型" prop="invoiceType" :borderBottom="true" required>
+                  <u-radio-group v-model="form.invoiceType" placement="row">
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="1" label="普票" style="margin-right: 15px"></u-radio>
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="2" label="专票"></u-radio>
+                  </u-radio-group>
+                </u-form-item>
+                <u-form-item label="发票性质" prop="invoiceAttribute" :borderBottom="true" required>
+                  <u-radio-group v-model="form.invoiceAttribute" placement="row">
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="1" label="电子发票" style="margin-right: 15px"></u-radio>
+                    <u-radio :activeColor="proxy.$settingStore.themeColor.color" name="2" label="纸质发票"></u-radio>
+                  </u-radio-group>
+                </u-form-item>
+                <u-form-item v-if="form.invoiceAttribute == 2" label="邮寄地址" prop="sendAddress" :borderBottom="true" required>
+                  <u-input v-model="form.sendAddress" placeholder="请填写邮寄地址" border="none" />
+                </u-form-item>
+                <u-form-item label="付款回执" prop="paymentReceipt" :borderBottom="true">
+                  <view class="flex flex-wrap">
+                    <view class="uploadView" style="width: 80px; height: 80px; margin-bottom: 0px" v-if="form.paymentReceipt">
+                      <view class="uploadUimage">
+                        <u-image width="100%" height="100%" :src="form.paymentReceipt"></u-image>
+                      </view>
+
+                      <view class="uploadViewClose" @click="uploadViewClose()">
+                        <u-icon name="close" color="#ffffff" size="12"></u-icon>
+                      </view>
+                    </view>
+                    <view :class="'uploadView upload-buttom'" style="width: 80px; height: 80px; margin-bottom: 0px" v-if="!form.paymentReceipt" @click="uploadClick">
+                      <u-icon style="margin: auto" name="plus" color="#909399" size="20"></u-icon>
+                    </view>
+                  </view>
+                  <view style="color: #666666">图片支持png、jpg</view>
+
+                  <!-- <view>
+                    <u-input placeholder="点击上传" border="none" maxlength="10" disabledColor="transparent" disabled>
+                      <template #prefix>
+                        <view
+                          class="iconfont ucicon-a-shangchuan menu-icon"
+                          :style="{
+                            fontSize: '14px',
+                            color: proxy.$settingStore.themeColor.color,
+                          }"
+                        >
+                        </view>
+                      </template>
+                    </u-input>
+
+                    <view style="color: #666666">请上传付款回执图片,支持png、jpg</view>
+                  </view> -->
+                </u-form-item>
+              </view>
+            </view>
+          </u--form>
+        </view>
+      </view>
+
+      <view style="padding-bottom: 105px"> </view>
+
+      <view class="app-button-fixed">
+        <u-button class="app-buttom" type="primary" @click="handleSubmit('提交')" shape="circle"> 提交 </u-button>
+      </view>
+    </view>
+
+    <view v-show="tabsCurrent == 1">
+      <view class="menu-list margin-t-0 margin-lr-0" style="padding: 0.625rem">
+        <view class="list-cell">
+          <view class="menu-item-box" style="justify-content: center; margin-bottom: 15px; font-size: 15px">
+            <view>对公转账</view>
+          </view>
+          <view class="menu-item-box">
+            <view style="width: 90px">企业全称</view>
+            <view style="color: #666666">上海永天科技股份有限公司</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">银行账户</view>
+            <view style="color: #666666">16523652265865685</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">开户行</view>
+            <view style="color: #666666">上海银行徐家汇支行</view>
+          </view>
+        </view>
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <view style="width: 90px">转账备注</view>
+            <view style="color: #666666">打款时请备注付款公司名称等信息</view>
+          </view>
+        </view>
+
+        <view class="list-cell">
+          <view class="menu-item-box">
+            <u-button style="width: auto" @click="copy(`上海永天科技股份有限公司\n16523652265865685\n上海银行徐家汇支行`)" shape="circle"> 复制汇款信息 </u-button>
+          </view>
+        </view>
+      </view>
+    </view>
+  </scroll-view>
+</template>
+
+<script setup>
+import config from "@/config";
+import storage from "@/utils/storage";
+import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { publicStores, useStores } from "@/store/modules/index";
+
+import { crmInvoiceInfo } from "@/api/common/invoicing/index";
+
+const { proxy } = getCurrentInstance();
+
+const uForm = ref(null);
+const data = reactive({
+  tabsList: [
+    {
+      name: "开票申请",
+    },
+    {
+      name: "汇款信息",
+    },
+  ],
+  tabsCurrent: 0,
+
+  form: {
+    customId: "", //客户管理id
+    invoiceTitle: "", //发票抬头
+    dutyId: "", //税号
+    email: "", //电子邮箱
+    applicant: "", //申请人
+    phone: "", //手机号码
+    amount: "", //金额
+    invoiceType: "1", //发票类型;1:普票,2:专票
+    invoiceAttribute: "1", //发票性质;1:电子发票,2:纸质发票
+    sendAddress: "", //邮寄地址
+    paymentReceipt: "", //付款回执
+  },
+
+  rules: {
+    invoiceTitle: [
+      {
+        required: true,
+        message: "请填写发票抬头",
+        trigger: ["blur", "change"],
+      },
+    ],
+    dutyId: [
+      {
+        required: true,
+        message: "请填写税号",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 18,
+        required: true,
+        message: "请填写18位税号",
+        trigger: ["change"],
+      },
+    ],
+    email: [
+      {
+        required: true,
+        message: "请填写电子邮箱",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 11,
+        required: true,
+        message: "请填写正确的邮箱格式",
+        pattern: /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/,
+        trigger: ["blur", "change"],
+      },
+    ],
+    applicant: [
+      {
+        required: true,
+        message: "请填写申请人",
+        trigger: ["blur", "change"],
+      },
+    ],
+    phone: [
+      {
+        required: true,
+        message: "请填写手机号",
+        trigger: ["blur", "change"],
+      },
+      {
+        type: "string",
+        min: 11,
+        required: true,
+        message: "请填写正确11位手机号",
+        pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+        trigger: ["blur", "change"],
+      },
+    ],
+    amount: [
+      {
+        required: true,
+        message: "请填写金额",
+        trigger: ["blur", "change"],
+      },
+    ],
+    invoiceType: [
+      {
+        required: true,
+        message: "请选择发票类型",
+        trigger: ["blur", "change"],
+      },
+    ],
+    invoiceAttribute: [
+      {
+        required: true,
+        message: "请选择发票性质",
+        trigger: ["blur", "change"],
+      },
+    ],
+    sendAddress: [
+      {
+        required: true,
+        message: "请填写邮寄地址",
+        trigger: ["blur", "change"],
+      },
+    ],
+  },
+});
+
+const { tabsList, tabsCurrent, form, rules } = toRefs(data);
+
+function handleSubmit(value) {
+  if (value === "提交") {
+    uForm.value
+      .validate()
+      .then((res) => {
+        uni.$u.toast("校验通过");
+
+        var param = {
+          customId: parseInt(form.value.customId), //客户管理id
+          invoiceTitle: form.value.invoiceTitle, //发票抬头
+          dutyId: form.value.dutyId, //税号
+          email: form.value.email, //电子邮箱
+          applicant: form.value.applicant, //申请人
+          phone: form.value.phone, //手机号码
+          amount: parseFloat(form.value.amount), //金额
+          invoiceType: parseInt(form.value.invoiceType), //发票类型;1:普票,2:专票
+          invoiceAttribute: parseInt(form.value.invoiceAttribute), //发票性质;1:电子发票,2:纸质发票
+          sendAddress: form.value.sendAddress, //邮寄地址
+          paymentReceipt: form.value.paymentReceipt, //付款回执
+        };
+
+        crmInvoiceInfo(param).then((requset) => {});
+      })
+      .catch((errors) => {
+        uni.$u.toast("校验失败");
+      });
+  } else if (value === "复制汇款信息") {
+  }
+}
+
+/**
+ * @upload图片上传
+ * @点击事件
+ */
+function uploadClick() {
+  uni.chooseImage({
+    count: 1, //默认9
+    sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
+    sourceType: ["album", "camera"], //从相册选择、摄像头
+    success: function (res) {
+      uploadApi(res);
+    },
+  });
+}
+
+/**
+ * @upload图片上传
+ * @api接口请求
+ */
+function uploadApi(res) {
+  let data = { name: "file", filePath: res.tempFilePaths[0] };
+
+  uploadAvatar(data).then((response) => {
+    form.value.paymentReceipt = response.data.url;
+  });
+}
+
+/**
+ * @upload图片上传
+ * @点击事件
+ * @删除事件
+ */
+function uploadViewClose(el) {
+  form.value.paymentReceipt = "";
+}
+
+/**
+ * @复制粘贴板
+ */
+function copy(value) {
+  // 触发方法
+  proxy.$common.uniCopy({
+    content: value,
+    success: (res) => {
+      uni.showToast({
+        title: res,
+        icon: "none",
+      });
+    },
+    error: (e) => {
+      uni.showToast({
+        title: e,
+        icon: "none",
+        duration: 3000,
+      });
+    },
+  });
+}
+
+/**
+ * @tabs点击事件
+ */
+function tabsClick(e) {
+  tabsCurrent.value = e.index;
+}
+
+onLoad((options) => {
+  if ("customId" in options) {
+    form.value.customId = options.customId;
+  }
+});
+
+onReady(() => {
+  //   form.value.setRules(rules.value);
+});
+
+onShow(() => {
+  //调用系统主题颜色
+  proxy.$settingStore.systemThemeColor([1]);
+});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  if (e.float == "right") {
+  }
+});
+</script>
+
+<style lang="scss" scoped>
+:deep(.uni-page-head__title) {
+  opacity: 1 !important;
+}
+
+.invoicing-container {
+}
+</style>

+ 44 - 0
src/plugins/common.plugins.js

@@ -24,4 +24,48 @@ export default {
     }
     }
     return result;
     return result;
   },
   },
+
+
+  uniCopy({ content, success, error }) {
+    if (!content) return error('复制的内容不能为空 !')
+    content = typeof content === 'string' ? content : content.toString() // 复制内容,必须字符串,数字需要转换为字符串
+    /**
+     * 小程序端 和 app端的复制逻辑
+     */
+    //#ifndef H5 || APP-PLUS || MP-WEIXIN
+    uni.setClipboardData({
+      data: content,
+      success: function () {
+        success("复制成功~")
+        console.log('success');
+      },
+      fail: function () {
+        success("复制失败~")
+      }
+    });
+    //#endif
+
+    /**
+     * H5端的复制逻辑
+     */
+    // #ifdef H5
+    if (!document.queryCommandSupported('copy')) { //为了兼容有些浏览器 queryCommandSupported 的判断
+      // 不支持
+      error('浏览器不支持')
+    }
+    let textarea = document.createElement("textarea")
+    textarea.value = content
+    textarea.readOnly = "readOnly"
+    document.body.appendChild(textarea)
+    textarea.select() // 选择对象
+    textarea.setSelectionRange(0, content.length) //核心
+    let result = document.execCommand("copy") // 执行浏览器复制命令
+    if (result) {
+      success("复制成功~")
+    } else {
+      error("复制失败,请检查h5中调用该方法的方式,是不是用户点击的方式调用的,如果不是请改为用户点击的方式触发该方法,因为h5中安全性,不能js直接调用!")
+    }
+    textarea.remove()
+    // #endif
+  }
 };
 };

+ 18 - 9
src/static/iconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
 @font-face {
   font-family: "iconfont"; /* Project id 3620854 */
   font-family: "iconfont"; /* Project id 3620854 */
-  src: url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.woff2?t=1686283411818') format('woff2'),
-       url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.woff?t=1686283411818') format('woff'),
-       url('https://at.alicdn.com/t/c/font_3620854_kea20ky3fh.ttf?t=1686283411818') format('truetype');
+  src: url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.woff2?t=1688110591021') format('woff2'),
+       url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.woff?t=1688110591021') format('woff'),
+       url('https://at.alicdn.com/t/c/font_3620854_wi2cj933ahr.ttf?t=1688110591021') format('truetype');
 }
 }
 
 
 .iconfont {
 .iconfont {
@@ -13,10 +13,22 @@
   -moz-osx-font-smoothing: grayscale;
   -moz-osx-font-smoothing: grayscale;
 }
 }
 
 
-.ucicon-bianji1:before{
+.ucicon-a-shangchuan:before {
+  content: "\e605";
+}
+
+.ucicon-a-copy:before {
+  content: "\e604";
+}
+
+.ucicon-bianji1:before {
   content: "\e602";
   content: "\e602";
 }
 }
 
 
+.ucicon-user:before {
+  content: "\e632";
+}
+
 .ucicon-people:before {
 .ucicon-people:before {
   content: "\e736";
   content: "\e736";
 }
 }
@@ -29,10 +41,6 @@
   content: "\e6f7";
   content: "\e6f7";
 }
 }
 
 
-.ucicon-user:before {
-  content: "\e632";
-}
-
 .ucicon-password:before {
 .ucicon-password:before {
   content: "\e65d";
   content: "\e65d";
 }
 }
@@ -175,4 +183,5 @@
 
 
 .ucicon-eye-close:before {
 .ucicon-eye-close:before {
   content: "\e8ff";
   content: "\e8ff";
-}
+}
+

BIN
src/static/iconfont/iconfont.ttf