|
@@ -5,7 +5,7 @@
|
|
|
|
|
|
<scroll-view class="invoicing-container scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
|
|
<scroll-view class="invoicing-container scroll-height" :scroll-y="true" :data-theme="'theme-' + proxy.$settingStore.themeColor.name">
|
|
<view v-show="tabsCurrent == 0">
|
|
<view v-show="tabsCurrent == 0">
|
|
- <u-notice-bar text="注:查询到您近期有开票记录,请勿重复开票" :duration="9000" color="#FF0000" bgColor="#FFFFFF"></u-notice-bar>
|
|
|
|
|
|
+ <u-notice-bar v-if="promptStatus" text="注:查询到您近期有开票记录,请勿重复开票" :duration="9000" color="#FF0000" bgColor="#FFFFFF"></u-notice-bar>
|
|
|
|
|
|
<view class="menu-list" style="font-size: 15px; line-height: 30px">
|
|
<view class="menu-list" style="font-size: 15px; line-height: 30px">
|
|
<view class="list-cell">
|
|
<view class="list-cell">
|
|
@@ -81,20 +81,7 @@
|
|
<u-input v-model="form.sendAddress" placeholder="请填写邮寄地址" border="none" />
|
|
<u-input v-model="form.sendAddress" placeholder="请填写邮寄地址" border="none" />
|
|
</u-form-item>
|
|
</u-form-item>
|
|
<u-form-item label="付款回执" prop="paymentReceipt" :borderBottom="true">
|
|
<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>
|
|
|
|
|
|
+ <oa-upload :uploadCount="1" :uploadImage="form.paymentReceipt" @uploadSuccessChange="uploadSuccessChange" @uploadDeleteChange="uploadDeleteChange"></oa-upload>
|
|
<view style="color: #666666">图片支持png、jpg</view>
|
|
<view style="color: #666666">图片支持png、jpg</view>
|
|
|
|
|
|
<!-- <view>
|
|
<!-- <view>
|
|
@@ -174,9 +161,10 @@ import { onLoad, onShow, onReady, onHide, onLaunch, onNavigationBarButtonTap, on
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
|
|
import { publicStores, useStores } from "@/store/modules/index";
|
|
import { publicStores, useStores } from "@/store/modules/index";
|
|
|
|
|
|
-import { crmInvoiceInfo } from "@/api/common/invoicing/index";
|
|
|
|
|
|
+import { crmInvoiceInfo, page } from "@/api/common/invoicing/index";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
+const publicStore = publicStores();
|
|
|
|
|
|
const uForm = ref(null);
|
|
const uForm = ref(null);
|
|
const data = reactive({
|
|
const data = reactive({
|
|
@@ -292,74 +280,67 @@ const data = reactive({
|
|
},
|
|
},
|
|
],
|
|
],
|
|
},
|
|
},
|
|
-});
|
|
|
|
|
|
|
|
-const { tabsList, tabsCurrent, form, rules } = toRefs(data);
|
|
|
|
-
|
|
|
|
-function handleSubmit(value) {
|
|
|
|
- if (value === "提交") {
|
|
|
|
- uForm.value
|
|
|
|
- .validate()
|
|
|
|
- .then((res) => {
|
|
|
|
- uni.$u.toast("校验通过");
|
|
|
|
|
|
+ promptStatus: false,
|
|
|
|
+});
|
|
|
|
|
|
- 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 === "复制汇款信息") {
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
+const { tabsList, tabsCurrent, form, rules, promptStatus } = toRefs(data);
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @upload图片上传
|
|
|
|
- * @点击事件
|
|
|
|
|
|
+ * @提交
|
|
*/
|
|
*/
|
|
-function uploadClick() {
|
|
|
|
- uni.chooseImage({
|
|
|
|
- count: 1, //默认9
|
|
|
|
- sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
- sourceType: ["album", "camera"], //从相册选择、摄像头
|
|
|
|
- success: function (res) {
|
|
|
|
- uploadApi(res);
|
|
|
|
- },
|
|
|
|
- });
|
|
|
|
|
|
+function handleSubmit(value) {
|
|
|
|
+ uForm.value
|
|
|
|
+ .validate()
|
|
|
|
+ .then((res) => {
|
|
|
|
+ uni.$u.toast("校验通过");
|
|
|
|
+
|
|
|
|
+ crmInvoiceInfo({
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ invoiceTitle: form.value.invoiceTitle,
|
|
|
|
+ startTime: publicStore.formatterDateTime(new Date()),
|
|
|
|
+ endTime: publicStore.getYearLast(new Date()),
|
|
|
|
+ }).then((requset) => {
|
|
|
|
+ if (requset.status === "SUCCESS") {
|
|
|
|
+ if (requset.data.records.length > 0) {
|
|
|
|
+ promptStatus.value = true;
|
|
|
|
+ } else {
|
|
|
|
+ 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("校验失败");
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @upload图片上传
|
|
|
|
- * @api接口请求
|
|
|
|
|
|
+ * @图片上传成功回调
|
|
*/
|
|
*/
|
|
-function uploadApi(res) {
|
|
|
|
- let data = { name: "file", filePath: res.tempFilePaths[0] };
|
|
|
|
-
|
|
|
|
- uploadAvatar(data).then((response) => {
|
|
|
|
- form.value.paymentReceipt = response.data.url;
|
|
|
|
- });
|
|
|
|
|
|
+function uploadSuccessChange(e) {
|
|
|
|
+ form.value.paymentReceipt = e.url;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @upload图片上传
|
|
|
|
- * @点击事件
|
|
|
|
- * @删除事件
|
|
|
|
|
|
+ * @图片删除回调
|
|
*/
|
|
*/
|
|
-function uploadViewClose(el) {
|
|
|
|
- form.value.paymentReceipt = "";
|
|
|
|
|
|
+function uploadDeleteChange(e) {
|
|
|
|
+ form.value.paymentReceipt = e;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|