|
|
@@ -10,7 +10,7 @@
|
|
|
<el-button size="small" :disabled="!form.id" @click="previewreportfun">预 览 </el-button>
|
|
|
<el-button size="small" v-if="roleName.indexOf('admin') != -1" :disabled="!form.id" @click="DesignreportDialog = true">报表设计 </el-button>
|
|
|
<el-button type="success" size="small" :disabled="!form.id" plain @click="newbill">新建发票申请 </el-button>
|
|
|
- <el-button size="small" type="danger" plain :disabled="!form.id || editPower" v-if="form.status !=0" @click="allClick('撤销')"
|
|
|
+ <el-button size="small" type="danger" plain :disabled="!form.id || editPower" v-if="form.status != 0" @click="allClick('撤销')"
|
|
|
>撤销
|
|
|
</el-button>
|
|
|
<el-button size="small" type="success" plain :disabled="!form.id || editPower" v-else @click="allClick('提交')">提交 </el-button>
|
|
|
@@ -419,7 +419,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- invoiceReview:false,
|
|
|
+ invoiceReview: false,
|
|
|
checkId: "", // 审核需要的id
|
|
|
batchNo: "",
|
|
|
checkScheduleDialog: false, // 审核弹窗
|
|
|
@@ -1018,7 +1018,7 @@ export default {
|
|
|
this.form.corpEnName = this.$route.query.corpEnName;
|
|
|
this.form.corpArgreementNo = this.$route.query.corpEnName;
|
|
|
}
|
|
|
- isProcurement({ param: "whether.open.Invoice.review" }).then(res => {
|
|
|
+ isProcurement({ param: "whether.open.Invoice.review" }).then(res => {
|
|
|
if (res.data.data == 1) {
|
|
|
this.invoiceReview = true;
|
|
|
}
|
|
|
@@ -1030,7 +1030,7 @@ export default {
|
|
|
methods: {
|
|
|
inEdit() {
|
|
|
this.editButton = false;
|
|
|
- if (this.form.status !=0) return;
|
|
|
+ if (this.form.status != 0) return;
|
|
|
this.editDisabled = false;
|
|
|
this.optionForm.disabled = false;
|
|
|
},
|
|
|
@@ -1247,34 +1247,64 @@ export default {
|
|
|
this.$refs.form.validate((valid, done) => {
|
|
|
done();
|
|
|
if (!valid) return;
|
|
|
+
|
|
|
+ let currencyList = [];
|
|
|
+ for (let item of this.form.finInvoicesItemsList) {
|
|
|
+ currencyList.push(item.curCode);
|
|
|
+ }
|
|
|
this.form.billNoFormat = "FPSQ";
|
|
|
this.form.businessTypeCode = "FPSQ";
|
|
|
let obj = {
|
|
|
...this.form,
|
|
|
- url:'/iosBasicData/financialManagement/fininvoicesApplyfor/index',
|
|
|
- pageLabel:'发票申请(N)',
|
|
|
- pageStatus:'',
|
|
|
+ url: "/iosBasicData/financialManagement/fininvoicesApplyfor/index",
|
|
|
+ pageLabel: "发票申请(N)",
|
|
|
+ pageStatus: ""
|
|
|
};
|
|
|
- fininvoicesSubmit(obj);
|
|
|
- this.$confirm("是否提交?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning"
|
|
|
- }).then(() => {
|
|
|
- const loading = this.$loading({
|
|
|
- lock: true,
|
|
|
- text: "加载中",
|
|
|
- spinner: "el-icon-loading",
|
|
|
- background: "rgba(255,255,255,0.7)"
|
|
|
+ if ([...new Set(currencyList)].length >= 2) {
|
|
|
+ fininvoicesSubmit(obj).then(res => {
|
|
|
+ this.$confirm("申请中存在两种及以上的币别, 是否提交?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ finInvoicesApproveV1(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.getDetail(res.data.data.id);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
+ });
|
|
|
});
|
|
|
- finInvoicesApproveV1(obj)
|
|
|
- .then(res => {
|
|
|
- this.getDetail(res.data.data.id);
|
|
|
- })
|
|
|
- .finally(() => {
|
|
|
- loading.close();
|
|
|
+ } else {
|
|
|
+ fininvoicesSubmit(obj).then(res => {
|
|
|
+ this.$confirm("是否提交?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: "加载中",
|
|
|
+ spinner: "el-icon-loading",
|
|
|
+ background: "rgba(255,255,255,0.7)"
|
|
|
+ });
|
|
|
+ finInvoicesApproveV1(obj)
|
|
|
+ .then(res => {
|
|
|
+ this.getDetail(res.data.data.id);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.close();
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
if (name == "撤销") {
|
|
|
@@ -1455,7 +1485,7 @@ export default {
|
|
|
});
|
|
|
fininvoicesDetail(id)
|
|
|
.then(res => {
|
|
|
- if (res.data.data.status !=0) {
|
|
|
+ if (res.data.data.status != 0) {
|
|
|
this.editButton = true;
|
|
|
this.editDisabled = true;
|
|
|
this.optionForm.disabled = true;
|