Commit 14c3378e authored by Administrator's avatar Administrator

Merge branch 'master' of https://gitlab.geexek.com/micro_app/gk

parents f14aeb7d 79038612
...@@ -342,6 +342,9 @@ ...@@ -342,6 +342,9 @@
<span class="lh-1.2"> <span class="lh-1.2">
收货地址:{{item.receiverAddress}} 收货地址:{{item.receiverAddress}}
</span> </span>
<span class="lh-1.2">
发票下载地址:{{item.invoiceUrl}}
</span>
</div> </div>
</td> </td>
<td class="name" style="text-align: left;"> <td class="name" style="text-align: left;">
...@@ -350,7 +353,8 @@ ...@@ -350,7 +353,8 @@
发票金额:{{item.invoiceMoney}} 发票金额:{{item.invoiceMoney}}
</span> </span>
<span class="lh-1.2"> <span class="lh-1.2">
发票类型:{{invoiceEnum[item.invoiceType]}} 发票类型:{{invoiceEnum[item.invoiceType]}} |
{{paperEnum[item.paperInvoice]}}
</span> </span>
<span class="lh-1.2"> <span class="lh-1.2">
开票方式:{{isCompanyEnum[item.isCompany]}} 开票方式:{{isCompanyEnum[item.isCompany]}}
...@@ -361,9 +365,6 @@ ...@@ -361,9 +365,6 @@
<span class="lh-1.2"> <span class="lh-1.2">
发票内容:{{item.invoiceContent}} 发票内容:{{item.invoiceContent}}
</span> </span>
<span class="lh-1.2">
开票方式:{{paperEnum[item.invoicePaper]}}
</span>
</div> </div>
</td> </td>
<td style="text-align: left;"> <td style="text-align: left;">
...@@ -436,12 +437,13 @@ ...@@ -436,12 +437,13 @@
</div> </div>
<div class="dialog" v-show="dialog" style="width:40vw;height: 80vh; z-index: 99;display: flex;flex-direction: column;left: 50%; <div class="dialog box-border flex flex-col" v-show="dialog" style="width:60vw;height: 80vh; z-index: 99;left: 50%;
transform: translateX(-50%);margin-left:0;"> transform: translateX(-50%);margin-left:0;">
<div> <div>
<span class="title" style="margin-bottom: 10px; color: #CE3939">{{title}}</span> <span class="title" style="margin-bottom: 10px; color: #CE3939">{{title}}</span>
</div> </div>
<div style="display: flex;flex-direction: column;flex:1;overflow-y: auto;"> <div class="flex flex-col overflow-y-auto"
style="display: flex;flex-direction: column;flex:1;overflow-y: auto;">
<!-- 发票类型 --> <!-- 发票类型 -->
<div class="form-item"> <div class="form-item">
<span class="form-label">发票类型</span> <span class="form-label">发票类型</span>
...@@ -479,6 +481,37 @@ ...@@ -479,6 +481,37 @@
</label> </label>
</div> </div>
</div> </div>
<!-- 开票状态 -->
<div class="form-item">
<span class="form-label">开票状态</span>
<div class="label-box">
<label v-for="item in statusOptions.slice(1,statusOptions.length)"
:key="item.value">
<input type="radio" v-model="invoice.status" :value="item.value">
{{item.name}}
</label>
</div>
</div>
<div class="form-item">
<div>
<span class="form-label">下载地址</span>
</div>
<div>
<input class="input" type="text" v-model="invoice.invoiceUrl"
placeholder="请输入发票下载地址或者上传">
</div>
</div>
<div class="form-item">
<span class="form-label">上传发票</span>
<div>
<label for="icon">
<div class="cover">
<span class="icon-cover"></span>
</div>
</label>
<input id="icon" type="file" style="display: none" @change="uploadFile">
</div>
</div>
<!-- 开票金额 --> <!-- 开票金额 -->
<div class="form-item"> <div class="form-item">
...@@ -665,6 +698,7 @@ ...@@ -665,6 +698,7 @@
statusEnum: { statusEnum: {
1: "提交", 1: "提交",
2: "待处理", 2: "待处理",
3: "已开票",
}, },
invoiceEnum: { invoiceEnum: {
1: "普通发票", 1: "普通发票",
...@@ -700,6 +734,9 @@ ...@@ -700,6 +734,9 @@
1: '开启' 1: '开启'
} }
}, },
mounted() {
this.fetchData()
},
methods: { methods: {
changeStatus(index) { changeStatus(index) {
this.page = 1 this.page = 1
...@@ -837,9 +874,42 @@ ...@@ -837,9 +874,42 @@
} }
}) })
}, },
//文件上传处理
uploadFile(obj) {
file = obj.target.files[0];
var reads = new FileReader();
reads.readAsDataURL(file);
reads.onload = () => {
//将处理完的图片文件上传到阿里云服务器
//上传LOGO图片
var formData = new FormData();
formData.append("file", file);
$.ajax({
url: uploadUrl, /*接口域名地址*/
type: 'post',
data: formData,
contentType: false,
processData: false,
success: (res) => {
if (res.code == 200) {
this.invoice.invoiceUrl = res.content;
layer.msg('上传成功', { icon: 1, time: 1500 });
this.invoice.status = 3;
this.$forceUpdate();
}
},
beforeSend: () => {
layer.load()
},
complete: () => {
layer.closeAll()
},
})
};
}
} }
}); });
app.fetchData();
</script> </script>
</body> </body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment