|
|
|
@ -6,47 +6,82 @@
|
|
|
|
|
<el-form @submit.native.prevent>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="单据编号">
|
|
|
|
|
<el-input v-model="query.documentNo" placeholder="请输入" clearable></el-input>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="query.documentNo"
|
|
|
|
|
placeholder="请输入"
|
|
|
|
|
clearable
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<template v-if="showAll">
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<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-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<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-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="业务类型">
|
|
|
|
|
<el-select v-model="query.type" placeholder="请选择"
|
|
|
|
|
clearable>
|
|
|
|
|
<el-option v-for="(item, index) in typeOptions" :key="index"
|
|
|
|
|
:label="item.fullName" :value="item.id"
|
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
|
<el-select v-model="query.type" placeholder="请选择" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="(item, index) in typeOptions"
|
|
|
|
|
:key="index"
|
|
|
|
|
:label="item.fullName"
|
|
|
|
|
:value="item.id"
|
|
|
|
|
:disabled="item.disabled"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="6">
|
|
|
|
|
<el-form-item label="制单日期">
|
|
|
|
|
<el-date-picker v-model="query.creatorTime" type="daterange"
|
|
|
|
|
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期" >
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="query.creatorTime"
|
|
|
|
|
type="daterange"
|
|
|
|
|
value-format="timestamp"
|
|
|
|
|
format="yyyy-MM-dd"
|
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
>
|
|
|
|
|
</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-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>
|
|
|
|
@ -56,46 +91,107 @@
|
|
|
|
|
<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
|
|
|
|
|
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> -->
|
|
|
|
|
</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-link
|
|
|
|
|
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
|
|
|
|
|
:underline="false"
|
|
|
|
|
@click="reset()"
|
|
|
|
|
/>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<screenfull isContainer />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
|
|
|
|
|
@selection-change="handleSelectionChange" custom-column border>
|
|
|
|
|
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center"
|
|
|
|
|
<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="customerNm"
|
|
|
|
|
label="客户名称"
|
|
|
|
|
sortable
|
|
|
|
|
width="200"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column prop="amount" label="出库金额" sortable width="120" 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
|
|
|
|
|
prop="num"
|
|
|
|
|
label="出库数量"
|
|
|
|
|
sortable
|
|
|
|
|
width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="币别" prop="currency" 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
|
|
|
|
|
prop="issueDate"
|
|
|
|
|
label="出库日期"
|
|
|
|
|
width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
sortable="custom"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="业务类型" prop="type" sortable width="120" align="center"
|
|
|
|
|
<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
|
|
|
|
|
prop="remark"
|
|
|
|
|
label="备注"
|
|
|
|
|
sortable
|
|
|
|
|
width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<!-- <el-table-column label="单据状态" width="0" prop="status" algin="left"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
@ -103,47 +199,83 @@
|
|
|
|
|
<!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column prop="status" label="单据状态" sortable width="120" align="center">
|
|
|
|
|
<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>
|
|
|
|
|
<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="creatorTime"
|
|
|
|
|
label="创建时间"
|
|
|
|
|
sortable
|
|
|
|
|
width="120"
|
|
|
|
|
align="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column prop="creatorUserName" 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">
|
|
|
|
|
<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
|
|
|
|
|
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
|
|
|
|
|
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"/>
|
|
|
|
|
<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"/>
|
|
|
|
|
|
|
|
|
|
<Detail
|
|
|
|
|
v-if="detailVisible"
|
|
|
|
|
ref="Detail"
|
|
|
|
|
@refresh="detailVisible = false"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
|
|
|
|
import JNPFForm from './Form'
|
|
|
|
|
import ExportBox from './ExportBox'
|
|
|
|
|
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
|
|
|
|
import Detail from './Detail'
|
|
|
|
|
import request from "@/utils/request";
|
|
|
|
|
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
|
|
|
|
|
import JNPFForm from "./Form";
|
|
|
|
|
import ExportBox from "./ExportBox";
|
|
|
|
|
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
|
|
|
|
|
import Detail from "./Detail";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: { JNPFForm, ExportBox, Detail },
|
|
|
|
@ -156,13 +288,14 @@
|
|
|
|
|
type: undefined,
|
|
|
|
|
},
|
|
|
|
|
treeProps: {
|
|
|
|
|
children: 'children',
|
|
|
|
|
label: 'fullName',
|
|
|
|
|
value: 'id'
|
|
|
|
|
children: "children",
|
|
|
|
|
label: "fullName",
|
|
|
|
|
value: "id",
|
|
|
|
|
},
|
|
|
|
|
list: [],
|
|
|
|
|
listLoading: true,
|
|
|
|
|
multipleSelection: [], total: 0,
|
|
|
|
|
multipleSelection: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
listQuery: {
|
|
|
|
|
currentPage: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
@ -172,174 +305,223 @@
|
|
|
|
|
formVisible: false,
|
|
|
|
|
exportBoxVisible: false,
|
|
|
|
|
columnList: [
|
|
|
|
|
{prop: 'documentNo', label: '单据编号'},
|
|
|
|
|
{prop: 'customerNm', label: '客户名称'},
|
|
|
|
|
{prop: 'amount', label: '出库金额'},
|
|
|
|
|
{prop: 'num', label: '出库数量'},
|
|
|
|
|
{prop: 'currency', label: '币别'},
|
|
|
|
|
{prop: 'issueDate', label: '出库日期'},
|
|
|
|
|
{prop: 'sourceOrderNo', label: '来源单号'},
|
|
|
|
|
{prop: 'type', label: '业务类型'},
|
|
|
|
|
{prop: 'remark', label: '备注'},
|
|
|
|
|
{prop: 'status', label: '单据状态'},
|
|
|
|
|
{prop: 'creatorTime', label: '创建时间'},
|
|
|
|
|
{prop: 'creatorUserName', label: '创建人名称'},
|
|
|
|
|
{ prop: "documentNo", label: "单据编号" },
|
|
|
|
|
{ prop: "customerNm", label: "客户名称" },
|
|
|
|
|
{ prop: "amount", label: "出库金额" },
|
|
|
|
|
{ prop: "num", label: "出库数量" },
|
|
|
|
|
{ prop: "currency", label: "币别" },
|
|
|
|
|
{ prop: "issueDate", label: "出库日期" },
|
|
|
|
|
{ prop: "sourceOrderNo", label: "来源单号" },
|
|
|
|
|
{ prop: "type", label: "业务类型" },
|
|
|
|
|
{ prop: "remark", label: "备注" },
|
|
|
|
|
{ prop: "status", label: "单据状态" },
|
|
|
|
|
{ prop: "creatorTime", label: "创建时间" },
|
|
|
|
|
{ prop: "creatorUserName", label: "创建人名称" },
|
|
|
|
|
],
|
|
|
|
|
typeOptions: [{"fullName": "销售出库", "id": "0"}, {"fullName": "购销出库", "id": "1"}],
|
|
|
|
|
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"},
|
|
|
|
|
}
|
|
|
|
|
typeOptions: [
|
|
|
|
|
{ fullName: "销售出库", id: "0" },
|
|
|
|
|
{ fullName: "购销出库", id: "1" },
|
|
|
|
|
],
|
|
|
|
|
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 || ''
|
|
|
|
|
}
|
|
|
|
|
return this.$route.meta.modelId || "";
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.initData()
|
|
|
|
|
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.detailVisible = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.Detail.init(id)
|
|
|
|
|
})
|
|
|
|
|
this.$refs.Detail.init(id);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
sortChange({ column, prop, order }) {
|
|
|
|
|
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
|
|
|
|
this.listQuery.sidx = !order ? '' : prop
|
|
|
|
|
this.initData()
|
|
|
|
|
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
|
|
|
|
|
menuId: this.menuId,
|
|
|
|
|
};
|
|
|
|
|
request({
|
|
|
|
|
url: `/api/receipout/Receiptout/getList`,
|
|
|
|
|
method: 'post',
|
|
|
|
|
data: _query
|
|
|
|
|
}).then(res => {
|
|
|
|
|
method: "post",
|
|
|
|
|
data: _query,
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
var _list = [];
|
|
|
|
|
for (let i = 0; i < res.data.list.length; i++) {
|
|
|
|
|
let _data = res.data.list[i];
|
|
|
|
|
let format = "YYYY-MM-DD"
|
|
|
|
|
_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)
|
|
|
|
|
let format = "YYYY-MM-DD";
|
|
|
|
|
_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.list = _list;
|
|
|
|
|
this.total = res.data.pagination.total;
|
|
|
|
|
|
|
|
|
|
this.listLoading = false
|
|
|
|
|
})
|
|
|
|
|
this.listLoading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
handleDel(id) {
|
|
|
|
|
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
request({
|
|
|
|
|
url: `/api/receipout/Receiptout/${id}`,
|
|
|
|
|
method: 'DELETE'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
method: "DELETE",
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
type: "success",
|
|
|
|
|
message: res.msg,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.initData()
|
|
|
|
|
}
|
|
|
|
|
this.initData();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
handleSelectionChange(val) {
|
|
|
|
|
const res = val.map(item => item.id)
|
|
|
|
|
this.multipleSelection = res
|
|
|
|
|
const res = val.map((item) => item.id);
|
|
|
|
|
this.multipleSelection = res;
|
|
|
|
|
},
|
|
|
|
|
handleBatchRemoveDel() {
|
|
|
|
|
if (!this.multipleSelection.length) {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'error',
|
|
|
|
|
message: '请选择一条数据',
|
|
|
|
|
type: "error",
|
|
|
|
|
message: "请选择一条数据",
|
|
|
|
|
duration: 2500,
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const ids = this.multipleSelection.join()
|
|
|
|
|
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
|
|
|
|
type: 'warning'
|
|
|
|
|
}).then(() => {
|
|
|
|
|
const ids = this.multipleSelection.join();
|
|
|
|
|
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
request({
|
|
|
|
|
url: `/api/receipout/Receiptout/batchRemove/${ids}`,
|
|
|
|
|
method: 'DELETE'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
method: "DELETE",
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
this.$message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
type: "success",
|
|
|
|
|
message: res.msg,
|
|
|
|
|
onClose: () => {
|
|
|
|
|
this.initData()
|
|
|
|
|
}
|
|
|
|
|
this.initData();
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {});
|
|
|
|
|
},
|
|
|
|
|
addOrUpdateHandle(id, isDetail) {
|
|
|
|
|
this.formVisible = true
|
|
|
|
|
this.formVisible = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.JNPFForm.init(id, isDetail)
|
|
|
|
|
})
|
|
|
|
|
this.$refs.JNPFForm.init(id, isDetail);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
exportData() {
|
|
|
|
|
this.exportBoxVisible = true
|
|
|
|
|
this.exportBoxVisible = true;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.ExportBox.init(this.columnList)
|
|
|
|
|
})
|
|
|
|
|
this.$refs.ExportBox.init(this.columnList);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
download(data) {
|
|
|
|
|
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId}
|
|
|
|
|
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
|
|
|
|
|
})
|
|
|
|
|
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,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
sort: "desc",
|
|
|
|
|
sidx: "",
|
|
|
|
|
}
|
|
|
|
|
this.initData()
|
|
|
|
|
this.listQuery.currentPage = 1;
|
|
|
|
|
// this.listQuery = {
|
|
|
|
|
// currentPage: 1,
|
|
|
|
|
// pageSize: 20,
|
|
|
|
|
// sort: "desc",
|
|
|
|
|
// sidx: "",
|
|
|
|
|
// };
|
|
|
|
|
this.initData();
|
|
|
|
|
},
|
|
|
|
|
refresh(isrRefresh) {
|
|
|
|
|
this.formVisible = false
|
|
|
|
|
if (isrRefresh) this.reset()
|
|
|
|
|
this.formVisible = false;
|
|
|
|
|
if (isrRefresh) this.reset();
|
|
|
|
|
},
|
|
|
|
|
reset() {
|
|
|
|
|
// for (let key in this.query) {
|
|
|
|
|
// this.query[key] = undefined
|
|
|
|
|
// }
|
|
|
|
|
this.search()
|
|
|
|
|
this.search();
|
|
|
|
|
},
|
|
|
|
|
resetAll() {
|
|
|
|
|
for (let key in this.query) {
|
|
|
|
|
this.query[key] = undefined
|
|
|
|
|
}
|
|
|
|
|
this.search()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.query[key] = undefined;
|
|
|
|
|
}
|
|
|
|
|
this.search();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|