parent
505d144e62
commit
2d26a75dcd
@ -1,329 +1,508 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="JNPF-common-layout">
|
<div class="JNPF-common-layout">
|
||||||
|
<div class="JNPF-common-layout-center">
|
||||||
<div class="JNPF-common-layout-center">
|
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
<el-form @submit.native.prevent>
|
||||||
<el-form @submit.native.prevent>
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<el-form-item label="单据编号">
|
||||||
<el-form-item label="单据编号">
|
<el-input
|
||||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
|
v-model="query.documentNo"
|
||||||
</el-form-item>
|
placeholder="请输入"
|
||||||
</el-col>
|
clearable
|
||||||
<template v-if="showAll">
|
>
|
||||||
<el-col :span="6">
|
</el-input>
|
||||||
<el-form-item label="来源单号">
|
</el-form-item>
|
||||||
<el-input v-model="query.sourceOrderNo" placeholder="请输入" clearable> </el-input>
|
</el-col>
|
||||||
</el-form-item>
|
<template v-if="showAll">
|
||||||
</el-col>
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<el-form-item label="来源单号">
|
||||||
<el-form-item label="合同名称">
|
<el-input
|
||||||
<el-input v-model="query.contractNm" placeholder="请输入" clearable> </el-input>
|
v-model="query.sourceOrderNo"
|
||||||
</el-form-item>
|
placeholder="请输入"
|
||||||
</el-col>
|
clearable
|
||||||
<el-col :span="6">
|
>
|
||||||
<el-form-item label="客户">
|
</el-input>
|
||||||
<el-input v-model="query.customerNm" placeholder="请输入" clearable> </el-input>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="6">
|
||||||
<el-col :span="6">
|
<el-form-item label="合同名称">
|
||||||
<el-form-item label="业务日期">
|
<el-input
|
||||||
<el-date-picker v-model="query.businessDate" type="daterange"
|
v-model="query.contractNm"
|
||||||
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
|
placeholder="请输入"
|
||||||
end-placeholder="结束日期" >
|
clearable
|
||||||
</el-date-picker>
|
>
|
||||||
</el-form-item>
|
</el-input>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</template>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item label="客户">
|
||||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
<el-input
|
||||||
<el-button icon="el-icon-refresh-right" @click="resetAll()">重置</el-button>
|
v-model="query.customerNm"
|
||||||
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
|
placeholder="请输入"
|
||||||
v-if="!showAll">展开</el-button>
|
clearable
|
||||||
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
|
>
|
||||||
收起</el-button>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
<el-col :span="6">
|
||||||
</el-row>
|
<el-form-item label="业务日期">
|
||||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
<el-date-picker
|
||||||
<div class="JNPF-common-head">
|
v-model="query.businessDate"
|
||||||
<div>
|
type="daterange"
|
||||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增-->
|
value-format="timestamp"
|
||||||
<!-- </el-button>-->
|
format="yyyy-MM-dd"
|
||||||
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
|
start-placeholder="开始日期"
|
||||||
</el-button>
|
end-placeholder="结束日期"
|
||||||
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="search()"
|
||||||
|
>查询</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh-right" @click="resetAll()"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-down"
|
||||||
|
@click="showAll = true"
|
||||||
|
v-if="!showAll"
|
||||||
|
>展开</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-up"
|
||||||
|
@click="showAll = false"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
|
收起</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||||
|
<div class="JNPF-common-head">
|
||||||
|
<div>
|
||||||
|
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<el-button type="text" icon="el-icon-download" @click="exportData()"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="JNPF-common-head-right">
|
<div class="JNPF-common-head-right">
|
||||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
<el-link
|
||||||
@click="reset()"/>
|
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
|
||||||
</el-tooltip>
|
:underline="false"
|
||||||
<screenfull isContainer/>
|
@click="reset()"
|
||||||
</div>
|
/>
|
||||||
</div>
|
</el-tooltip>
|
||||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange" custom-column border>
|
<screenfull isContainer />
|
||||||
<el-table-column prop="businessDate" label="业务日期" sortable width="150" align="center"
|
</div>
|
||||||
/>
|
|
||||||
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="customerNm" label="客户" sortable width="200" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="amount" label="金额" sortable width="150" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="quantity" label="数量" sortable width="150" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column label="币别 " width="150" prop="currency" algin="center" sortable
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="invoiceAmount" label="发票金额" sortable width="150" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="invoiceQuantity" label="发票数量" sortable width="150" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="sourceOrderNo" label="来源单号" sortable width="200" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="contractNm" label="合同名称" sortable width="200" align="center"
|
|
||||||
/>
|
|
||||||
<!-- <el-table-column label="单据状态 " width="150" prop="status" algin="center"-->
|
|
||||||
<!-->-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column prop="status" label="单据状态" sortable width="150" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag type="success" v-if="scope.row.status==0">已保存</el-tag>
|
|
||||||
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag>
|
|
||||||
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="remark" label="备注" sortable width="150" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" fixed="right" width="150" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="text"
|
|
||||||
@click="addOrUpdateHandle(scope.row.id)" v-has="'btn_edit'">编辑
|
|
||||||
</el-button>
|
|
||||||
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
|
||||||
</el-button> -->
|
|
||||||
<el-button type="text"
|
|
||||||
@click="goDetail(scope.row.id)"v-has="'btn_detail'">详情
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</JNPF-table>
|
|
||||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
<JNPF-table
|
||||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
v-loading="listLoading"
|
||||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
:data="list"
|
||||||
|
@sort-change="sortChange"
|
||||||
|
has-c
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
custom-column
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column type="index" fixed="left" width="1" />
|
||||||
|
<el-table-column
|
||||||
|
prop="businessDate"
|
||||||
|
label="业务日期"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="documentNo"
|
||||||
|
label="单据编号"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="customerNm"
|
||||||
|
label="客户"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="amount"
|
||||||
|
label="金额"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="quantity"
|
||||||
|
label="数量"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="币别 "
|
||||||
|
width="150"
|
||||||
|
prop="currency"
|
||||||
|
algin="center"
|
||||||
|
sortable
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="invoiceAmount"
|
||||||
|
label="发票金额"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="invoiceQuantity"
|
||||||
|
label="发票数量"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="sourceOrderNo"
|
||||||
|
label="来源单号"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="contractNm"
|
||||||
|
label="合同名称"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="单据状态 " width="150" prop="status" algin="center"-->
|
||||||
|
<!-->-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="单据状态"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.status == 0"
|
||||||
|
>已保存</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="info" v-else-if="scope.row.status == 1"
|
||||||
|
>审批中</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="warning" v-else-if="scope.row.status == 2"
|
||||||
|
>已审批</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remark"
|
||||||
|
label="备注"
|
||||||
|
sortable
|
||||||
|
width="150"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="addOrUpdateHandle(scope.row.id)"
|
||||||
|
v-has="'btn_edit'"
|
||||||
|
>编辑
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||||
|
</el-button> -->
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="goDetail(scope.row.id)"
|
||||||
|
v-has="'btn_detail'"
|
||||||
|
>详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</JNPF-table>
|
||||||
|
<pagination
|
||||||
|
:total="total"
|
||||||
|
:page.sync="listQuery.currentPage"
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
@pagination="initData"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||||
|
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||||
|
<Detail
|
||||||
|
v-if="detailVisible"
|
||||||
|
ref="Detail"
|
||||||
|
@refresh="detailVisible = false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '@/utils/request'
|
import request from "@/utils/request";
|
||||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
|
||||||
import JNPFForm from './Form'
|
import JNPFForm from "./Form";
|
||||||
import ExportBox from './ExportBox'
|
import ExportBox from "./ExportBox";
|
||||||
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
|
||||||
import Detail from './Detail'
|
import Detail from "./Detail";
|
||||||
|
|
||||||
export default {
|
|
||||||
components: {JNPFForm, ExportBox,Detail},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
showAll: false,
|
|
||||||
detailVisible: false,
|
|
||||||
query: {
|
|
||||||
documentNo:undefined,
|
|
||||||
businessDate:undefined,
|
|
||||||
},
|
|
||||||
treeProps: {
|
|
||||||
children: 'children',
|
|
||||||
label: 'fullName',
|
|
||||||
value: 'id'
|
|
||||||
},
|
|
||||||
list: [],
|
|
||||||
listLoading: true,
|
|
||||||
multipleSelection: [], total: 0,
|
|
||||||
listQuery: {
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
sort: "desc",
|
|
||||||
sidx: "",
|
|
||||||
},
|
|
||||||
formVisible: false,
|
|
||||||
exportBoxVisible: false,
|
|
||||||
columnList: [
|
|
||||||
{prop: 'businessDate', label: '业务日期'},
|
|
||||||
{prop: 'documentNo', label: '单据编号'},
|
|
||||||
{prop: 'customerNm', label: '客户'},
|
|
||||||
{prop: 'amount', label: '金额'},
|
|
||||||
{prop: 'quantity', label: '数量'},
|
|
||||||
{prop: 'currency', label: '币别 '},
|
|
||||||
{prop: 'invoiceAmount', label: '发票金额'},
|
|
||||||
{prop: 'invoiceQuantity', label: '发票数量'},
|
|
||||||
{prop: 'sourceOrderNo', label: '销售订单号'},
|
|
||||||
{prop: 'contractNm', label: '合同名称'},
|
|
||||||
{prop: 'status', label: '单据状态 '},
|
|
||||||
{prop: 'remark', label: '备注'},
|
|
||||||
],
|
|
||||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
|
||||||
currencyProps:{"label":"fullName","value":"id"},
|
|
||||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
|
||||||
statusProps:{"label":"fullName","value":"id"},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
menuId() {
|
|
||||||
return this.$route.meta.modelId || ''
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
goDetail(id){
|
|
||||||
this.detailVisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.Detail.init(id)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
sortChange({column, prop, order}) {
|
|
||||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
|
||||||
this.listQuery.sidx = !order ? '' : prop
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
initData() {
|
|
||||||
this.listLoading = true;
|
|
||||||
let _query = {
|
|
||||||
...this.listQuery,
|
|
||||||
...this.query,
|
|
||||||
menuId:this.menuId
|
|
||||||
};
|
|
||||||
request({
|
|
||||||
url: `/api/arinvoices/Arinvoices/getList`,
|
|
||||||
method: 'post',
|
|
||||||
data: _query
|
|
||||||
}).then(res => {
|
|
||||||
var _list =[];
|
|
||||||
for(let i=0;i<res.data.list.length;i++){
|
|
||||||
let _data = res.data.list[i];
|
|
||||||
_list.push(_data)
|
|
||||||
}
|
|
||||||
this.list = _list
|
|
||||||
this.total = res.data.pagination.total
|
|
||||||
|
|
||||||
this.listLoading = false
|
export default {
|
||||||
})
|
components: { JNPFForm, ExportBox, Detail },
|
||||||
},
|
data() {
|
||||||
handleDel(id) {
|
return {
|
||||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
showAll: false,
|
||||||
type: 'warning'
|
detailVisible: false,
|
||||||
}).then(() => {
|
query: {
|
||||||
request({
|
documentNo: undefined,
|
||||||
url: `/api/arinvoices/Arinvoices/${id}`,
|
businessDate: undefined,
|
||||||
method: 'DELETE'
|
},
|
||||||
}).then(res => {
|
treeProps: {
|
||||||
this.$message({
|
children: "children",
|
||||||
type: 'success',
|
label: "fullName",
|
||||||
message: res.msg,
|
value: "id",
|
||||||
onClose: () => {
|
},
|
||||||
this.initData()
|
list: [],
|
||||||
}
|
listLoading: true,
|
||||||
});
|
multipleSelection: [],
|
||||||
})
|
total: 0,
|
||||||
}).catch(() => {
|
listQuery: {
|
||||||
});
|
currentPage: 1,
|
||||||
},
|
pageSize: 20,
|
||||||
handleSelectionChange(val) {
|
sort: "desc",
|
||||||
const res = val.map(item => item.id)
|
sidx: "",
|
||||||
this.multipleSelection = res
|
},
|
||||||
},
|
formVisible: false,
|
||||||
handleBatchRemoveDel() {
|
exportBoxVisible: false,
|
||||||
if (!this.multipleSelection.length) {
|
columnList: [
|
||||||
this.$message({
|
{ prop: "businessDate", label: "业务日期" },
|
||||||
type: 'error',
|
{ prop: "documentNo", label: "单据编号" },
|
||||||
message: '请选择一条数据',
|
{ prop: "customerNm", label: "客户" },
|
||||||
duration: 2500,
|
{ prop: "amount", label: "金额" },
|
||||||
})
|
{ prop: "quantity", label: "数量" },
|
||||||
return
|
{ prop: "currency", label: "币别 " },
|
||||||
}
|
{ prop: "invoiceAmount", label: "发票金额" },
|
||||||
const ids = this.multipleSelection.join()
|
{ prop: "invoiceQuantity", label: "发票数量" },
|
||||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
{ prop: "sourceOrderNo", label: "销售订单号" },
|
||||||
type: 'warning'
|
{ prop: "contractNm", label: "合同名称" },
|
||||||
}).then(() => {
|
{ prop: "status", label: "单据状态 " },
|
||||||
request({
|
{ prop: "remark", label: "备注" },
|
||||||
url: `/api/arinvoices/Arinvoices/batchRemove/${ids}`,
|
],
|
||||||
method: 'DELETE'
|
currencyOptions: [
|
||||||
}).then(res => {
|
{ fullName: "人民币", id: "0" },
|
||||||
this.$message({
|
{ fullName: "美元", id: "1" },
|
||||||
type: 'success',
|
{ fullName: "英镑", id: "2" },
|
||||||
message: res.msg,
|
],
|
||||||
onClose: () => {
|
currencyProps: { label: "fullName", value: "id" },
|
||||||
this.initData()
|
statusOptions: [
|
||||||
}
|
{ fullName: "已保存", id: "0" },
|
||||||
});
|
{ fullName: "审批中", id: "1" },
|
||||||
})
|
{ fullName: "已审批", id: "2" },
|
||||||
}).catch(() => {
|
],
|
||||||
})
|
statusProps: { label: "fullName", value: "id" },
|
||||||
},
|
};
|
||||||
addOrUpdateHandle(id, isDetail) {
|
},
|
||||||
this.formVisible = true
|
computed: {
|
||||||
this.$nextTick(() => {
|
menuId() {
|
||||||
this.$refs.JNPFForm.init(id, isDetail)
|
return this.$route.meta.modelId || "";
|
||||||
})
|
},
|
||||||
},
|
},
|
||||||
exportData() {
|
created() {
|
||||||
this.exportBoxVisible = true
|
if (
|
||||||
this.$nextTick(() => {
|
sessionStorage.getItem("scm-basicInformation-arinvoices-pageSize") !==
|
||||||
this.$refs.ExportBox.init(this.columnList)
|
null
|
||||||
})
|
) {
|
||||||
},
|
this.listQuery.pageSize = parseInt(
|
||||||
download(data) {
|
sessionStorage.getItem("scm-basicInformation-arinvoices-pageSize")
|
||||||
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
|
);
|
||||||
request({
|
}
|
||||||
url: `/api/arinvoices/Arinvoices/Actions/Export`,
|
if (
|
||||||
method: 'GET',
|
sessionStorage.getItem("scm-basicInformation-arinvoices-query") !== null
|
||||||
data: query
|
) {
|
||||||
}).then(res => {
|
let json_query = sessionStorage.getItem(
|
||||||
if (!res.data.url) return
|
"scm-basicInformation-arinvoices-query"
|
||||||
this.jnpf.downloadFile(res.data.url)
|
);
|
||||||
this.$refs.ExportBox.visible = false
|
let obj_query = JSON.parse(json_query);
|
||||||
this.exportBoxVisible = false
|
this.query = obj_query;
|
||||||
})
|
|
||||||
},
|
|
||||||
search() {
|
|
||||||
this.listQuery = {
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 20,
|
|
||||||
sort: "desc",
|
|
||||||
sidx: "",
|
|
||||||
}
|
|
||||||
this.initData()
|
|
||||||
},
|
|
||||||
refresh(isrRefresh) {
|
|
||||||
this.formVisible = false
|
|
||||||
if (isrRefresh) this.reset()
|
|
||||||
},
|
|
||||||
reset() {
|
|
||||||
// for (let key in this.query) {
|
|
||||||
// this.query[key] = undefined
|
|
||||||
// }
|
|
||||||
this.search()
|
|
||||||
},
|
|
||||||
resetAll() {
|
|
||||||
for (let key in this.query) {
|
|
||||||
this.query[key] = undefined
|
|
||||||
}
|
|
||||||
this.search()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"scm-basicInformation-arinvoices-pageSize",
|
||||||
|
this.listQuery.pageSize
|
||||||
|
);
|
||||||
|
let json_query = JSON.stringify(this.query);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"scm-basicInformation-arinvoices-query",
|
||||||
|
json_query
|
||||||
|
);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goDetail(id) {
|
||||||
|
this.detailVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.Detail.init(id);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sortChange({ column, prop, order }) {
|
||||||
|
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
|
||||||
|
this.listQuery.sidx = !order ? "" : prop;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
initData() {
|
||||||
|
this.listLoading = true;
|
||||||
|
let _query = {
|
||||||
|
...this.listQuery,
|
||||||
|
...this.query,
|
||||||
|
menuId: this.menuId,
|
||||||
|
};
|
||||||
|
request({
|
||||||
|
url: `/api/arinvoices/Arinvoices/getList`,
|
||||||
|
method: "post",
|
||||||
|
data: _query,
|
||||||
|
}).then((res) => {
|
||||||
|
var _list = [];
|
||||||
|
for (let i = 0; i < res.data.list.length; i++) {
|
||||||
|
let _data = res.data.list[i];
|
||||||
|
_list.push(_data);
|
||||||
|
}
|
||||||
|
this.list = _list;
|
||||||
|
this.total = res.data.pagination.total;
|
||||||
|
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleDel(id) {
|
||||||
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
request({
|
||||||
|
url: `/api/arinvoices/Arinvoices/${id}`,
|
||||||
|
method: "DELETE",
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: res.msg,
|
||||||
|
onClose: () => {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
const res = val.map((item) => item.id);
|
||||||
|
this.multipleSelection = res;
|
||||||
|
},
|
||||||
|
handleBatchRemoveDel() {
|
||||||
|
if (!this.multipleSelection.length) {
|
||||||
|
this.$message({
|
||||||
|
type: "error",
|
||||||
|
message: "请选择一条数据",
|
||||||
|
duration: 2500,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const ids = this.multipleSelection.join();
|
||||||
|
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
request({
|
||||||
|
url: `/api/arinvoices/Arinvoices/batchRemove/${ids}`,
|
||||||
|
method: "DELETE",
|
||||||
|
}).then((res) => {
|
||||||
|
this.$message({
|
||||||
|
type: "success",
|
||||||
|
message: res.msg,
|
||||||
|
onClose: () => {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
addOrUpdateHandle(id, isDetail) {
|
||||||
|
this.formVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.JNPFForm.init(id, isDetail);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
exportData() {
|
||||||
|
this.exportBoxVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.ExportBox.init(this.columnList);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
download(data) {
|
||||||
|
let query = {
|
||||||
|
...data,
|
||||||
|
...this.listQuery,
|
||||||
|
...this.query,
|
||||||
|
menuId: this.menuId,
|
||||||
|
};
|
||||||
|
request({
|
||||||
|
url: `/api/arinvoices/Arinvoices/Actions/Export`,
|
||||||
|
method: "GET",
|
||||||
|
data: query,
|
||||||
|
}).then((res) => {
|
||||||
|
if (!res.data.url) return;
|
||||||
|
this.jnpf.downloadFile(res.data.url);
|
||||||
|
this.$refs.ExportBox.visible = false;
|
||||||
|
this.exportBoxVisible = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.listQuery.currentPage = 1;
|
||||||
|
// this.listQuery = {
|
||||||
|
// currentPage: 1,
|
||||||
|
// pageSize: 20,
|
||||||
|
// sort: "desc",
|
||||||
|
// sidx: "",
|
||||||
|
// }
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
refresh(isrRefresh) {
|
||||||
|
this.formVisible = false;
|
||||||
|
if (isrRefresh) this.reset();
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
// for (let key in this.query) {
|
||||||
|
// this.query[key] = undefined
|
||||||
|
// }
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
|
resetAll() {
|
||||||
|
for (let key in this.query) {
|
||||||
|
this.query[key] = undefined;
|
||||||
|
}
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,345 +1,527 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="JNPF-common-layout">
|
<div class="JNPF-common-layout">
|
||||||
<!-- 测试-->
|
<!-- 测试-->
|
||||||
<div class="JNPF-common-layout-center">
|
<div class="JNPF-common-layout-center">
|
||||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||||
<el-form @submit.native.prevent>
|
<el-form @submit.native.prevent>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="单据编号">
|
<el-form-item label="单据编号">
|
||||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable></el-input>
|
<el-input
|
||||||
</el-form-item>
|
v-model="query.documentNo"
|
||||||
</el-col>
|
placeholder="请输入"
|
||||||
<template v-if="showAll">
|
clearable
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<template v-if="showAll">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="来源单号">
|
<el-form-item label="来源单号">
|
||||||
<el-input v-model="query.sourceOrderNo" placeholder="请输入" clearable></el-input>
|
<el-input
|
||||||
|
v-model="query.sourceOrderNo"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="客户名称">
|
<el-form-item label="客户名称">
|
||||||
<el-input v-model="query.customerNm" placeholder="请输入" clearable></el-input>
|
<el-input
|
||||||
|
v-model="query.customerNm"
|
||||||
|
placeholder="请输入"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="业务类型">
|
<el-form-item label="业务类型">
|
||||||
<el-select v-model="query.type" placeholder="请选择"
|
<el-select v-model="query.type" placeholder="请选择" clearable>
|
||||||
clearable>
|
<el-option
|
||||||
<el-option v-for="(item, index) in typeOptions" :key="index"
|
v-for="(item, index) in typeOptions"
|
||||||
:label="item.fullName" :value="item.id"
|
:key="index"
|
||||||
:disabled="item.disabled"></el-option>
|
:label="item.fullName"
|
||||||
|
:value="item.id"
|
||||||
|
:disabled="item.disabled"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="制单日期">
|
<el-form-item label="制单日期">
|
||||||
<el-date-picker v-model="query.creatorTime" type="daterange"
|
<el-date-picker
|
||||||
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
|
v-model="query.creatorTime"
|
||||||
end-placeholder="结束日期" >
|
type="daterange"
|
||||||
</el-date-picker>
|
value-format="timestamp"
|
||||||
</el-form-item>
|
format="yyyy-MM-dd"
|
||||||
</el-col>
|
start-placeholder="开始日期"
|
||||||
</template>
|
end-placeholder="结束日期"
|
||||||
<el-col :span="6">
|
>
|
||||||
<el-form-item>
|
</el-date-picker>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
|
||||||
<el-button icon="el-icon-refresh-right" @click="resetAll()">重置</el-button>
|
|
||||||
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true"
|
|
||||||
v-if="!showAll">展开</el-button>
|
|
||||||
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else>
|
|
||||||
收起</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-form>
|
</template>
|
||||||
</el-row>
|
<el-col :span="6">
|
||||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
<el-form-item>
|
||||||
<div class="JNPF-common-head">
|
<el-button type="primary" icon="el-icon-search" @click="search()"
|
||||||
<div>
|
>查询</el-button
|
||||||
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增-->
|
>
|
||||||
<!-- </el-button>-->
|
<el-button icon="el-icon-refresh-right" @click="resetAll()"
|
||||||
<el-button type="text" icon="el-icon-download" @click="exportData()" v-has="'btn_download'">导出
|
>重置</el-button
|
||||||
</el-button>
|
>
|
||||||
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-down"
|
||||||
|
@click="showAll = true"
|
||||||
|
v-if="!showAll"
|
||||||
|
>展开</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-arrow-up"
|
||||||
|
@click="showAll = false"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
|
收起</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||||
|
<div class="JNPF-common-head">
|
||||||
|
<div>
|
||||||
|
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增-->
|
||||||
|
<!-- </el-button>-->
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-download"
|
||||||
|
@click="exportData()"
|
||||||
|
v-has="'btn_download'"
|
||||||
|
>导出
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
</div>
|
|
||||||
<div class="JNPF-common-head-right">
|
|
||||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
|
||||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
|
||||||
@click="reset()"/>
|
|
||||||
</el-tooltip>
|
|
||||||
<screenfull isContainer/>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
|
<div class="JNPF-common-head-right">
|
||||||
@selection-change="handleSelectionChange" custom-column border>
|
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||||
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center"
|
<el-link
|
||||||
/>
|
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
|
||||||
<el-table-column prop="customerNm" label="客户名称" sortable width="200" align="center"
|
:underline="false"
|
||||||
/>
|
@click="reset()"
|
||||||
<el-table-column prop="amount" label="出库金额" sortable width="120" align="center"
|
/>
|
||||||
/>
|
</el-tooltip>
|
||||||
<el-table-column prop="num" label="出库数量" sortable width="120" align="center"
|
<screenfull isContainer />
|
||||||
/>
|
</div>
|
||||||
<el-table-column label="币别" prop="currency" sortable width="120" align="center"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="issueDate" label="出库日期" width="120" align="center"
|
|
||||||
sortable="custom"/>
|
|
||||||
<el-table-column prop="sourceOrderNo" label="来源单号" sortable width="200" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column label="业务类型" prop="type" sortable width="120" align="center"
|
|
||||||
>
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{ scope.row.type | dynamicText(typeOptions) }}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="remark" label="备注" sortable width="120" align="center"
|
|
||||||
/>
|
|
||||||
<!-- <el-table-column label="单据状态" width="0" prop="status" algin="left"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<el-table-column prop="status" label="单据状态" sortable width="120" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag type="success" v-if="scope.row.status==0">已保存</el-tag>
|
|
||||||
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag>
|
|
||||||
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="creatorTime" label="创建时间" sortable width="120" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column prop="creatorUserName" label="创建人名称" sortable width="120" align="center"
|
|
||||||
/>
|
|
||||||
<el-table-column label="操作" fixed="right"
|
|
||||||
width="150">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)"v-has="'btn_edit'">编辑
|
|
||||||
</el-button>
|
|
||||||
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
|
||||||
</el-button> -->
|
|
||||||
<el-button type="text" @click="goDetail(scope.row.id)"v-has="'btn_detail'">详情
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</JNPF-table>
|
|
||||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
|
||||||
@pagination="initData"/>
|
|
||||||
</div>
|
</div>
|
||||||
|
<JNPF-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
:data="list"
|
||||||
|
@sort-change="sortChange"
|
||||||
|
has-c
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
custom-column
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<el-table-column type="index" fixed="left" width="1" />
|
||||||
|
<el-table-column
|
||||||
|
prop="documentNo"
|
||||||
|
label="单据编号"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="customerNm"
|
||||||
|
label="客户名称"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="amount"
|
||||||
|
label="出库金额"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="num"
|
||||||
|
label="出库数量"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="币别"
|
||||||
|
prop="currency"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="issueDate"
|
||||||
|
label="出库日期"
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="sourceOrderNo"
|
||||||
|
label="来源单号"
|
||||||
|
sortable
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="业务类型"
|
||||||
|
prop="type"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.type | dynamicText(typeOptions) }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="remark"
|
||||||
|
label="备注"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column label="单据状态" width="0" prop="status" algin="left"-->
|
||||||
|
<!-- >-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column
|
||||||
|
prop="status"
|
||||||
|
label="单据状态"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag type="success" v-if="scope.row.status == 0"
|
||||||
|
>已保存</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="info" v-else-if="scope.row.status == 1"
|
||||||
|
>审批中</el-tag
|
||||||
|
>
|
||||||
|
<el-tag type="warning" v-else-if="scope.row.status == 2"
|
||||||
|
>已审批</el-tag
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="creatorTime"
|
||||||
|
label="创建时间"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="creatorUserName"
|
||||||
|
label="创建人名称"
|
||||||
|
sortable
|
||||||
|
width="120"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<el-table-column label="操作" fixed="right" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="addOrUpdateHandle(scope.row.id)"
|
||||||
|
v-has="'btn_edit'"
|
||||||
|
>编辑
|
||||||
|
</el-button>
|
||||||
|
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||||
|
</el-button> -->
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="goDetail(scope.row.id)"
|
||||||
|
v-has="'btn_detail'"
|
||||||
|
>详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</JNPF-table>
|
||||||
|
<pagination
|
||||||
|
:total="total"
|
||||||
|
:page.sync="listQuery.currentPage"
|
||||||
|
:limit.sync="listQuery.pageSize"
|
||||||
|
@pagination="initData"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
|
||||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
|
||||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||||
|
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||||
|
<Detail
|
||||||
|
v-if="detailVisible"
|
||||||
|
ref="Detail"
|
||||||
|
@refresh="detailVisible = false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import request from '@/utils/request'
|
import request from "@/utils/request";
|
||||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
|
||||||
import JNPFForm from './Form'
|
import JNPFForm from "./Form";
|
||||||
import ExportBox from './ExportBox'
|
import ExportBox from "./ExportBox";
|
||||||
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
|
||||||
import Detail from './Detail'
|
import Detail from "./Detail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {JNPFForm, ExportBox, Detail},
|
components: { JNPFForm, ExportBox, Detail },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showAll: false,
|
showAll: false,
|
||||||
detailVisible: false,
|
detailVisible: false,
|
||||||
query: {
|
query: {
|
||||||
documentNo: undefined,
|
documentNo: undefined,
|
||||||
type: undefined,
|
type: undefined,
|
||||||
},
|
},
|
||||||
treeProps: {
|
treeProps: {
|
||||||
children: 'children',
|
children: "children",
|
||||||
label: 'fullName',
|
label: "fullName",
|
||||||
value: 'id'
|
value: "id",
|
||||||
},
|
},
|
||||||
list: [],
|
list: [],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
multipleSelection: [], total: 0,
|
multipleSelection: [],
|
||||||
listQuery: {
|
total: 0,
|
||||||
currentPage: 1,
|
listQuery: {
|
||||||
pageSize: 20,
|
currentPage: 1,
|
||||||
sort: "desc",
|
pageSize: 20,
|
||||||
sidx: "",
|
sort: "desc",
|
||||||
},
|
sidx: "",
|
||||||
formVisible: false,
|
},
|
||||||
exportBoxVisible: false,
|
formVisible: false,
|
||||||
columnList: [
|
exportBoxVisible: false,
|
||||||
{prop: 'documentNo', label: '单据编号'},
|
columnList: [
|
||||||
{prop: 'customerNm', label: '客户名称'},
|
{ prop: "documentNo", label: "单据编号" },
|
||||||
{prop: 'amount', label: '出库金额'},
|
{ prop: "customerNm", label: "客户名称" },
|
||||||
{prop: 'num', label: '出库数量'},
|
{ prop: "amount", label: "出库金额" },
|
||||||
{prop: 'currency', label: '币别'},
|
{ prop: "num", label: "出库数量" },
|
||||||
{prop: 'issueDate', label: '出库日期'},
|
{ prop: "currency", label: "币别" },
|
||||||
{prop: 'sourceOrderNo', label: '来源单号'},
|
{ prop: "issueDate", label: "出库日期" },
|
||||||
{prop: 'type', label: '业务类型'},
|
{ prop: "sourceOrderNo", label: "来源单号" },
|
||||||
{prop: 'remark', label: '备注'},
|
{ prop: "type", label: "业务类型" },
|
||||||
{prop: 'status', label: '单据状态'},
|
{ prop: "remark", label: "备注" },
|
||||||
{prop: 'creatorTime', label: '创建时间'},
|
{ prop: "status", label: "单据状态" },
|
||||||
{prop: 'creatorUserName', label: '创建人名称'},
|
{ prop: "creatorTime", label: "创建时间" },
|
||||||
],
|
{ prop: "creatorUserName", label: "创建人名称" },
|
||||||
typeOptions: [{"fullName": "销售出库", "id": "0"}, {"fullName": "购销出库", "id": "1"}],
|
],
|
||||||
typeProps: {"label": "fullName", "value": "id"},
|
typeOptions: [
|
||||||
currencyOptions: [{"fullName": "人民币", "id": "0"}, {"fullName": "美元", "id": "1"}, {"fullName": "英镑", "id": "2"}],
|
{ fullName: "销售出库", id: "0" },
|
||||||
currencyProps: {"label": "fullName", "value": "id"},
|
{ fullName: "购销出库", id: "1" },
|
||||||
statusOptions: [{"fullName": "已保存", "id": "0"}, {"fullName": "审批中", "id": "1"}, {"fullName": "已审批", "id": "2"}],
|
],
|
||||||
statusProps: {"label": "fullName", "value": "id"},
|
typeProps: { label: "fullName", value: "id" },
|
||||||
}
|
currencyOptions: [
|
||||||
|
{ fullName: "人民币", id: "0" },
|
||||||
|
{ fullName: "美元", id: "1" },
|
||||||
|
{ fullName: "英镑", id: "2" },
|
||||||
|
],
|
||||||
|
currencyProps: { label: "fullName", value: "id" },
|
||||||
|
statusOptions: [
|
||||||
|
{ fullName: "已保存", id: "0" },
|
||||||
|
{ fullName: "审批中", id: "1" },
|
||||||
|
{ fullName: "已审批", id: "2" },
|
||||||
|
],
|
||||||
|
statusProps: { label: "fullName", value: "id" },
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
menuId() {
|
||||||
|
return this.$route.meta.modelId || "";
|
||||||
},
|
},
|
||||||
computed: {
|
},
|
||||||
menuId() {
|
created() {
|
||||||
return this.$route.meta.modelId || ''
|
if (
|
||||||
}
|
sessionStorage.getItem("scm-basicInformation-receiptout-pageSize") !== null
|
||||||
|
) {
|
||||||
|
this.listQuery.pageSize = parseInt(
|
||||||
|
sessionStorage.getItem("scm-basicInformation-receiptout-pageSize")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
sessionStorage.getItem("scm-basicInformation-receiptout-query") !== null
|
||||||
|
) {
|
||||||
|
let json_query = sessionStorage.getItem(
|
||||||
|
"scm-basicInformation-receiptout-query"
|
||||||
|
);
|
||||||
|
let obj_query = JSON.parse(json_query);
|
||||||
|
this.query = obj_query;
|
||||||
|
}
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
sessionStorage.setItem(
|
||||||
|
"scm-basicInformation-receiptout-pageSize",
|
||||||
|
this.listQuery.pageSize
|
||||||
|
);
|
||||||
|
let json_query = JSON.stringify(this.query);
|
||||||
|
sessionStorage.setItem("scm-basicInformation-receiptout-query", json_query);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goDetail(id) {
|
||||||
|
this.detailVisible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.Detail.init(id);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
created() {
|
sortChange({ column, prop, order }) {
|
||||||
this.initData()
|
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
|
||||||
|
this.listQuery.sidx = !order ? "" : prop;
|
||||||
|
this.initData();
|
||||||
},
|
},
|
||||||
methods: {
|
initData() {
|
||||||
goDetail(id) {
|
this.listLoading = true;
|
||||||
this.detailVisible = true
|
let _query = {
|
||||||
this.$nextTick(() => {
|
...this.listQuery,
|
||||||
this.$refs.Detail.init(id)
|
...this.query,
|
||||||
})
|
menuId: this.menuId,
|
||||||
},
|
};
|
||||||
sortChange({column, prop, order}) {
|
request({
|
||||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
url: `/api/receipout/Receiptout/getList`,
|
||||||
this.listQuery.sidx = !order ? '' : prop
|
method: "post",
|
||||||
this.initData()
|
data: _query,
|
||||||
},
|
}).then((res) => {
|
||||||
initData() {
|
var _list = [];
|
||||||
this.listLoading = true;
|
for (let i = 0; i < res.data.list.length; i++) {
|
||||||
let _query = {
|
let _data = res.data.list[i];
|
||||||
...this.listQuery,
|
let format = "YYYY-MM-DD";
|
||||||
...this.query,
|
_data.creatorTime = this.jnpf.dateFormat(
|
||||||
menuId: this.menuId
|
res.data.list[i].creatorTime,
|
||||||
};
|
format
|
||||||
request({
|
);
|
||||||
url: `/api/receipout/Receiptout/getList`,
|
_data.issueDate = this.jnpf.dateFormat(
|
||||||
method: 'post',
|
res.data.list[i].issueDate,
|
||||||
data: _query
|
format
|
||||||
}).then(res => {
|
);
|
||||||
var _list = [];
|
_list.push(_data);
|
||||||
for (let i = 0; i < res.data.list.length; i++) {
|
}
|
||||||
let _data = res.data.list[i];
|
this.list = _list;
|
||||||
let format = "YYYY-MM-DD"
|
this.total = res.data.pagination.total;
|
||||||
_data.creatorTime = this.jnpf.dateFormat(res.data.list[i].creatorTime,format)
|
|
||||||
_data.issueDate = this.jnpf.dateFormat(res.data.list[i].issueDate,format)
|
|
||||||
_list.push(_data)
|
|
||||||
}
|
|
||||||
this.list = _list
|
|
||||||
this.total = res.data.pagination.total
|
|
||||||
|
|
||||||
this.listLoading = false
|
this.listLoading = false;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleDel(id) {
|
handleDel(id) {
|
||||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
||||||
type: 'warning'
|
type: "warning",
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
request({
|
request({
|
||||||
url: `/api/receipout/Receiptout/${id}`,
|
url: `/api/receipout/Receiptout/${id}`,
|
||||||
method: 'DELETE'
|
method: "DELETE",
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: "success",
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.initData()
|
this.initData();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}).catch(() => {
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
const res = val.map((item) => item.id);
|
||||||
|
this.multipleSelection = res;
|
||||||
|
},
|
||||||
|
handleBatchRemoveDel() {
|
||||||
|
if (!this.multipleSelection.length) {
|
||||||
|
this.$message({
|
||||||
|
type: "error",
|
||||||
|
message: "请选择一条数据",
|
||||||
|
duration: 2500,
|
||||||
});
|
});
|
||||||
},
|
return;
|
||||||
handleSelectionChange(val) {
|
}
|
||||||
const res = val.map(item => item.id)
|
const ids = this.multipleSelection.join();
|
||||||
this.multipleSelection = res
|
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
|
||||||
},
|
type: "warning",
|
||||||
handleBatchRemoveDel() {
|
})
|
||||||
if (!this.multipleSelection.length) {
|
.then(() => {
|
||||||
this.$message({
|
|
||||||
type: 'error',
|
|
||||||
message: '请选择一条数据',
|
|
||||||
duration: 2500,
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const ids = this.multipleSelection.join()
|
|
||||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
request({
|
request({
|
||||||
url: `/api/receipout/Receiptout/batchRemove/${ids}`,
|
url: `/api/receipout/Receiptout/batchRemove/${ids}`,
|
||||||
method: 'DELETE'
|
method: "DELETE",
|
||||||
}).then(res => {
|
}).then((res) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: "success",
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
this.initData()
|
this.initData();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
}).catch(() => {
|
|
||||||
})
|
|
||||||
},
|
|
||||||
addOrUpdateHandle(id, isDetail) {
|
|
||||||
this.formVisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.JNPFForm.init(id, isDetail)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
exportData() {
|
|
||||||
this.exportBoxVisible = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.ExportBox.init(this.columnList)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
download(data) {
|
|
||||||
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId}
|
|
||||||
request({
|
|
||||||
url: `/api/receipout/Receiptout/Actions/Export`,
|
|
||||||
method: 'GET',
|
|
||||||
data: query
|
|
||||||
}).then(res => {
|
|
||||||
if (!res.data.url) return
|
|
||||||
this.jnpf.downloadFile(res.data.url)
|
|
||||||
this.$refs.ExportBox.visible = false
|
|
||||||
this.exportBoxVisible = false
|
|
||||||
})
|
})
|
||||||
},
|
.catch(() => {});
|
||||||
search() {
|
},
|
||||||
this.listQuery = {
|
addOrUpdateHandle(id, isDetail) {
|
||||||
currentPage: 1,
|
this.formVisible = true;
|
||||||
pageSize: 20,
|
this.$nextTick(() => {
|
||||||
sort: "desc",
|
this.$refs.JNPFForm.init(id, isDetail);
|
||||||
sidx: "",
|
});
|
||||||
}
|
},
|
||||||
this.initData()
|
exportData() {
|
||||||
},
|
this.exportBoxVisible = true;
|
||||||
refresh(isrRefresh) {
|
this.$nextTick(() => {
|
||||||
this.formVisible = false
|
this.$refs.ExportBox.init(this.columnList);
|
||||||
if (isrRefresh) this.reset()
|
});
|
||||||
},
|
},
|
||||||
reset() {
|
download(data) {
|
||||||
// for (let key in this.query) {
|
let query = {
|
||||||
// this.query[key] = undefined
|
...data,
|
||||||
// }
|
...this.listQuery,
|
||||||
this.search()
|
...this.query,
|
||||||
},
|
menuId: this.menuId,
|
||||||
resetAll() {
|
};
|
||||||
for (let key in this.query) {
|
request({
|
||||||
this.query[key] = undefined
|
url: `/api/receipout/Receiptout/Actions/Export`,
|
||||||
}
|
method: "GET",
|
||||||
this.search()
|
data: query,
|
||||||
|
}).then((res) => {
|
||||||
|
if (!res.data.url) return;
|
||||||
|
this.jnpf.downloadFile(res.data.url);
|
||||||
|
this.$refs.ExportBox.visible = false;
|
||||||
|
this.exportBoxVisible = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
search() {
|
||||||
|
this.listQuery.currentPage = 1;
|
||||||
|
// this.listQuery = {
|
||||||
|
// currentPage: 1,
|
||||||
|
// pageSize: 20,
|
||||||
|
// sort: "desc",
|
||||||
|
// sidx: "",
|
||||||
|
// };
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
refresh(isrRefresh) {
|
||||||
|
this.formVisible = false;
|
||||||
|
if (isrRefresh) this.reset();
|
||||||
|
},
|
||||||
|
reset() {
|
||||||
|
// for (let key in this.query) {
|
||||||
|
// this.query[key] = undefined
|
||||||
|
// }
|
||||||
|
this.search();
|
||||||
|
},
|
||||||
|
resetAll() {
|
||||||
|
for (let key in this.query) {
|
||||||
|
this.query[key] = undefined;
|
||||||
}
|
}
|
||||||
}
|
this.search();
|
||||||
}
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue