发票登记插入,查询修改

ywj_dev
anthonywj 2 years ago
parent ea783fe42b
commit 06e75285fd

@ -186,7 +186,8 @@
<el-tab-pane> <el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-单据详情</span> <span slot="label">单据 {{ currentRow.billNo }}-单据详情</span>
<el-table v-loading="bizDetailLoading" :data="codeDetailList" style="width: 100%" border <el-table v-loading="bizDetailLoading" :data="codeDetailList" style="width: 100%" border
row-key="id" @row-click="BizDetail" highlight-current-row @current-change="BizDetail"
row-key="id" highlight-current-row
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
@ -272,101 +273,100 @@
</el-tabs> </el-tabs>
<el-tabs type="border-card" style="margin: 15px"> <el-tabs type="border-card" style="margin: 15px">
<!--单据业务详情--> <!--单据业务详情-->
<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="bizDetailLoading" :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>
<el-table-column <el-table-column
label="规格型号" label="规格型号"
prop="ggxh" prop="ggxh"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="物资名称" label="物资名称"
prop="cpmctymc" prop="cpmctymc"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="批次号" label="批次号"
prop="batchNo" prop="batchNo"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="机器编码" label="机器编码"
prop="machineNo" prop="machineNo"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票代码" label="发票代码"
prop="invoiceCode" prop="invoiceCode"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票编码" label="发票编码"
prop="invoiceEncode" prop="invoiceEncode"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="开票日期" label="开票日期"
prop="invoiceDate" prop="invoiceDate"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="发票价格" label="发票价格"
prop="price" prop="price"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="生产日期" label="生产日期"
prop="productDate" prop="productDate"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="失效日期" label="失效日期"
prop="expireDate" prop="expireDate"
></el-table-column> ></el-table-column>
<el-table-column
label="备注"
prop="remark"
show-overflow-tooltip
></el-table-column>
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<el-button <el-table-column
type="text" label="备注"
size="small" prop="remark"
@click.native.stop="printOrder(scope.row)" show-overflow-tooltip
>编辑 ></el-table-column>
</el-button <el-table-column label="操作" width="160">
> <template slot-scope="scope">
<el-button
type="text" <el-button
size="small" type="text"
@click.native.stop="deleteInvoice(scope.row.id)" size="small"
>删除 @click.native.stop="printOrder(scope.row)"
</el-button >编辑
> </el-button
<el-button >
type="text" <el-button
size="small" type="text"
:disabled="!scope.row.licenseUrl" size="small"
@click.native.stop="showImgViewer(scope.row)" @click.native.stop="deleteInvoice(scope.row.id)"
>预览 >删除
</el-button </el-button
> >
<el-button
type="text"
size="small"
:disabled="!scope.row.licenseUrl"
@click.native.stop="showImgViewer(scope.row)"
>预览
</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="bizTotal>0" v-show="bizTotal>0"
:total="bizTotal" :total="bizTotal"
:page.sync="bizQuery.page" :page.sync="bizQuery.page"
:limit.sync="bizQuery.limit" :limit.sync="bizQuery.limit"
@pagination="getBizDetailList" @pagination="getBizDetailList"
/> />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/> <el-image-viewer v-if="imgViewerVisible" style="z-index:9999" :on-close="closeImgViewer" :url-list="imgList"/>
@ -426,7 +426,7 @@ import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse"; import {getInvListByUser} from "@/api/system/invWarehouse";
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig"; import {selectSysParamByKey} from "@/api/param/systemParamConfig";
import {filterListInvoice, getBizDetailList, deleteById,insertInvoice} from '@/api/inout/orderDetailBiz' import {filterListInvoice, getBizDetailList, deleteById, insertInvoice} from '@/api/inout/orderDetailBiz'
import {getCodeList} from "@/api/inout/code"; import {getCodeList} from "@/api/inout/code";
import AcceptOrder from "@/views/inout/DialogReviewOrder"; import AcceptOrder from "@/views/inout/DialogReviewOrder";
import DialogInvoice from "@/views/inout/DialogInvoice"; import DialogInvoice from "@/views/inout/DialogInvoice";
@ -435,12 +435,10 @@ import InvoiceRegister from "@/views/inout/InvoiceRegister";
import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint" import {inspectionOrderPDFFromTemplateFile, orderPDFFromTemplateFile} from "@/api/itextpdf/orderPrint"
import {getDeptListByUser} from "@/api/auth/authDept"; import {getDeptListByUser} from "@/api/auth/authDept";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import { previewImage } from '@/api/purchase/supCompany' import {previewImage} from '@/api/purchase/supCompany'
import ElImageViewer from "element-ui/packages/image/src/image-viewer"; import ElImageViewer from "element-ui/packages/image/src/image-viewer";
const formJson = { const formJson = {
site_id: "", site_id: "",
site_name: "", site_name: "",
@ -452,8 +450,8 @@ export default {
name: "IoCheckSuccessOrder", name: "IoCheckSuccessOrder",
data() { data() {
return { return {
imgList:[], imgList: [],
imgViewerVisible:false, imgViewerVisible: false,
BASE_URL: process.env.VUE_APP_BASE_API, BASE_URL: process.env.VUE_APP_BASE_API,
showSearch: true, showSearch: true,
filterQuery: { filterQuery: {
@ -530,7 +528,7 @@ export default {
billNo: "" billNo: ""
}, },
actDateRange: [], actDateRange: [],
auditDateRange:[], auditDateRange: [],
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: [
{ {
@ -592,7 +590,7 @@ export default {
acceptOrderVisible: false, acceptOrderVisible: false,
}; };
}, },
components: {AcceptOrder, DialogInvoice, InvoiceRegister,ElImageViewer}, components: {AcceptOrder, DialogInvoice, InvoiceRegister, ElImageViewer},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
@ -613,17 +611,17 @@ export default {
this.getList(); this.getList();
}, },
InvoiceRegister(row) { InvoiceRegister(row) {
insertInvoice(row) insertInvoice(row)
.then(response => { .then(response => {
if (response.code === 20000) { if (response.code === 20000) {
this.closeInvoice(); this.closeInvoice(row);
} else { } else {
this.$message.error(response.message);
}
})
.catch(() => {
this.$message.error(response.message); this.$message.error(response.message);
}); }
})
.catch((response) => {
this.$message.error(response.message);
});
}, },
onSubmit() { onSubmit() {
this.loading = true; this.loading = true;
@ -649,24 +647,28 @@ export default {
hideSearch() { hideSearch() {
this.showSearch = !this.showSearch; this.showSearch = !this.showSearch;
}, },
showImgViewer(row){ showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
this.imgList=[]; this.imgList = [];
previewImage({imageUrl:row.licenseUrl,certFileUrl:this.certFileUrl}).then(response => { previewImage({imageUrl: row.licenseUrl, certFileUrl: this.certFileUrl}).then(response => {
if (response.code === 20000) { if (response.code === 20000) {
this.imgList=response.data; this.imgList = response.data;
} }
console.log(this.imgList) console.log(this.imgList)
this.imgViewerVisible = true; this.imgViewerVisible = true;
}); });
const m = (e) => { e.preventDefault() }; const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'hidden'; document.body.style.overflow = 'hidden';
document.addEventListener("touchmove", m, false); // document.addEventListener("touchmove", m, false); //
}, },
closeImgViewer(){ closeImgViewer() {
this.imgViewerVisible = false; this.imgViewerVisible = false;
const m = (e) => { e.preventDefault() }; const m = (e) => {
e.preventDefault()
};
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
document.removeEventListener("touchmove", m, true); document.removeEventListener("touchmove", m, true);
}, },
@ -725,7 +727,7 @@ export default {
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.currentRow.billNo=val.billNo; this.currentRow.billNo = val.billNo;
this.getOrderDetails(); this.getOrderDetails();
}, },
// //
@ -899,13 +901,14 @@ export default {
this.bizQuery.page = 1; this.bizQuery.page = 1;
this.getBizDetailList(); this.getBizDetailList();
}, },
getBizDetailList() { getBizDetailList(row) {
if (isBlank(this.currentRow.billNo)) { if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!") this.$message.error("请先选择需要查询的单据!")
return; return;
} }
this.bizDetailLoading = true; this.bizDetailLoading = true;
this.bizQuery.orderIdFk = this.currentRow.billNo; this.bizQuery.orderIdFk = this.currentRow.billNo;
this.bizQuery.bizIdFk = row.id;
filterListInvoice(this.bizQuery).then((res) => { filterListInvoice(this.bizQuery).then((res) => {
this.bizDetailLoading = false; this.bizDetailLoading = false;
if (res.code === 20000) { if (res.code === 20000) {
@ -923,9 +926,9 @@ export default {
this.bizTotal = 0; this.bizTotal = 0;
}) })
}, },
BizDetail(){ BizDetail(row) {
this.bizQuery.page=1; this.bizQuery.page = 1;
this.getBizDetailList(); this.getBizDetailList(row);
}, },
@ -956,9 +959,9 @@ export default {
this.getBizDetailList(); this.getBizDetailList();
}, },
closeInvoice() { closeInvoice(row) {
this.InvoiceRegisterv = false; this.InvoiceRegisterv = false;
this.getBizDetailList(); this.getBizDetailList(row);
}, },
// //

Loading…
Cancel
Save