发票相关问题修改

pro
anthonywj 2 years ago
parent 58eb5b87fa
commit 48280be827

@ -8,7 +8,7 @@ ENV = 'production'
#林纪裕cd #林纪裕cd
# VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:5003/UDI_WMS_MC/' VUE_APP_BASE_API = 'http://r.jiyuudims.cloud:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
@ -25,7 +25,7 @@ ENV = 'production'
# VUE_APP_BASE_API = 'http://192.168.0.54:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://192.168.0.54:9150/UDI_WMS_MC/'
# 平潭正式 # 平潭正式
VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://55.55.0.62:9150/UDI_WMS_MC/'
# 吴总测试服务器 # 吴总测试服务器
# VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/' # VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/'

@ -484,18 +484,10 @@ export default {
components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer}, components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer},
methods: { methods: {
onSubmit() { onSubmit() {
if (this.invoiceRow == null || this.invoiceRow.length==0) { if (this.invoiceRow == null) {
this.$message.error("请选择要登记的物资! "); this.$message.error("请选择要登记的物资! ");
return false; return false;
} }
// if (this.$isBlank(this.inputQuery.machineNo)) {
// this.$message.error("");
// return;
// }
// if (this.$isBlank(this.inputQuery.invoiceCode)) {
// this.$message.error("");
// return;
// }
if (this.$isBlank(this.inputQuery.invoiceEncode)) { if (this.$isBlank(this.inputQuery.invoiceEncode)) {
this.$message.error("发票编码不能为空!"); this.$message.error("发票编码不能为空!");
return; return;
@ -509,17 +501,34 @@ export default {
return; return;
} }
this.inputQuery.list = this.invoiceRow; this.inputQuery.list = this.invoiceRow;
let mount=0; let mount = 0;
for(var i=0;i<this.invoiceRow.length;i++){ for (var i = 0; i < this.invoiceRow.length; i++) {
mount+=this.invoiceRow[i].amount mount += this.invoiceRow[i].amount
} }
if(mount != this.inputQuery.price){ if (mount != this.inputQuery.price) {
this.$message.error("价格不匹配!"); this.$confirm("价格不匹配,是否确定提交?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.postInvoice();
})
.catch(() => {
});
return; return;
} else {
this.postInvoice();
} }
},
postInvoice() {
insertInvoice(this.inputQuery) insertInvoice(this.inputQuery)
.then((response) => { .then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog();
this.statusCode = response.code; this.statusCode = response.code;
this.getOrderDetails(); this.getOrderDetails();
} else { } else {
@ -530,12 +539,13 @@ export default {
this.$message.error(response.message); this.$message.error(response.message);
}); });
// // //
updateorderBiz(this.inputQuery.list).then((res) => { // updateorderBiz(this.inputQuery.list).then((res) => {
this.closeDialog(); // this.closeDialog();
}); // });
}, },
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
}, },

@ -151,15 +151,15 @@
:default-sort="defaultSort" :default-sort="defaultSort"
@sort-change="handleSortChange"> @sort-change="handleSortChange">
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="登记状态" prop="checkStatus" width="100"> <el-table-column label="登记状态" prop="invoiceStatus" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="danger" v-if="scope.row.allCout==0"> <el-tag type="danger" v-if="scope.row.invoiceStatus==0">
未登记 未登记
</el-tag> </el-tag>
<el-tag type="warning" v-if="scope.row.partCount>0 && scope.row.allCout>0"> <el-tag type="warning" v-if="scope.row.invoiceStatus==1 ">
未全部登记 未全部登记
</el-tag> </el-tag>
<el-tag type="success" v-if="scope.row.partCount == 0 && scope.row.allCout>0"> <el-tag type="success" v-if="scope.row.invoiceStatus == 2 ">
全部登记 全部登记
</el-tag> </el-tag>
</template> </template>
@ -354,7 +354,7 @@
<!--单据业务详情--> <!--单据业务详情-->
<el-tab-pane> <el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-发票信息</span> <span slot="label">单据 {{ currentRow.billNo }}-发票信息</span>
<el-table v-loading="bizDetailLoading" :data="bizDetailList" style="width: 100%" border <el-table v-loading="invoiceLoading" :data="bizDetailList" style="width: 100%" border
row-key="id" row-key="id"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
@ -705,6 +705,7 @@ export default {
bizTotal: 0, bizTotal: 0,
invTotal: 0, invTotal: 0,
bizDetailLoading: false, bizDetailLoading: false,
invoiceLoading:false,
bizDetailList: [], bizDetailList: [],
codeQuery: { codeQuery: {
orderIdFk: null, orderIdFk: null,
@ -1074,7 +1075,7 @@ export default {
this.$message.error("请先选择需要查询的单据!") this.$message.error("请先选择需要查询的单据!")
return; return;
} }
this.bizDetailLoading = true; this.invoiceLoading = true;
if (row != null) { if (row != null) {
this.bizQuery.orderIdFk = row.orderIdFk; this.bizQuery.orderIdFk = row.orderIdFk;
this.bizQuery.batchNo = row.batchNo; this.bizQuery.batchNo = row.batchNo;
@ -1082,7 +1083,7 @@ export default {
// this.bizQuery.bizIdFk = row.id; // this.bizQuery.bizIdFk = row.id;
} }
filterListInvoice(this.bizQuery).then((res) => { filterListInvoice(this.bizQuery).then((res) => {
this.bizDetailLoading = false; this.invoiceLoading = false;
if (res.code === 20000) { if (res.code === 20000) {
this.bizDetailList = res.data.list || []; this.bizDetailList = res.data.list || [];
this.invTotal = res.data.total || 0; this.invTotal = res.data.total || 0;
@ -1092,7 +1093,7 @@ export default {
this.invTotal = 0; this.invTotal = 0;
} }
}).catch((error) => { }).catch((error) => {
this.bizDetailLoading = false; this.invoiceLoading = false;
this.$message.error(error.message); this.$message.error(error.message);
this.bizDetailList = []; this.bizDetailList = [];
this.invTotal = 0; this.invTotal = 0;

Loading…
Cancel
Save