发票登记插入,查询修改

ywj_dev
anthonywj 2 years ago
parent ea783fe42b
commit 06e75285fd

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

Loading…
Cancel
Save