非基础页页面翻页搜寻固定列修改

product
mhsnet 2 years ago
parent 505d144e62
commit 2d26a75dcd

@ -1,18 +1,25 @@
<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.mName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.mName"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -20,80 +27,159 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus"v-has="'btn_add'" @click="addOrUpdateHandle()" >新增 <el-button
type="primary"
icon="el-icon-plus"
v-has="'btn_add'"
@click="addOrUpdateHandle()"
>新增
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" v-has="'btn_download'" @click="exportData()"> <el-button
type="text"
icon="el-icon-download"
v-has="'btn_download'"
@click="exportData()"
>导出
</el-button> </el-button>
<!-- <el-button type="text" icon="el-icon-download" v-has="'btn_upload'" @click="">--> <!-- <el-button type="text" icon="el-icon-download" v-has="'btn_upload'" @click="">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" icon="el-icon-download" v-has="'btn_edit'" @click=""> <el-button
type="text"
icon="el-icon-download"
v-has="'btn_edit'"
@click=""
>编辑
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" v-has="'btn_batchRemove'" @click="handleBatchRemoveDel()"> <el-button
type="text"
icon="el-icon-delete"
v-has="'btn_batchRemove'"
@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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table
@selection-change="handleSelectionChange" border> v-loading="listLoading"
<el-table-column type="index" width="50" label="序号" align="center" /> :data="list"
<el-table-column prop="mName" label="区域名称" width="300" align="center"sortable /> @sort-change="sortChange"
<el-table-column prop="creatortime" label="创建时间" width="300" sortable align="center"/> has-c
<el-table-column prop="creatorusername" label="创建人名称" width="300" sortable align="center"/> :hasNO="false"
<el-table-column prop="lastmodifytime" label="修改时间" width="300" sortable align="center"/> @selection-change="handleSelectionChange"
<el-table-column prop="lastmodifyusername" label="修改人名称" width="300"sortable align="center"/> border
>
<el-table-column type="index" fixed="left" width="1" />
<el-table-column
type="index"
width="50"
label="序号"
align="center"
/>
<el-table-column
prop="mName"
label="区域名称"
width="300"
align="center"
sortable
/>
<el-table-column
prop="creatortime"
label="创建时间"
width="300"
sortable
align="center"
/>
<el-table-column
prop="creatorusername"
label="创建人名称"
width="300"
sortable
align="center"
/>
<el-table-column
prop="lastmodifytime"
label="修改时间"
width="300"
sortable
align="center"
/>
<el-table-column
prop="lastmodifyusername"
label="修改人名称"
width="300"
sortable
align="center"
/>
<el-table-column label="操作" fixed="right" width="100"> <el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" @click="addOrUpdateHandle(scope.row.id)"> <el-button
type="text"
v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)"
>编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)"> <el-button
type="text"
class="JNPF-table-delBtn"
v-has="'btn_remove'"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from "@/utils/request";
import { import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
getDictionaryDataSelector import JNPFForm from "./Form";
} from '@/api/systemData/dictionary' import ExportBox from "./ExportBox";
import JNPFForm from './Form' import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import ExportBox from './ExportBox' import Detail from "./Detail";
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
ExportBox, ExportBox,
Detail Detail,
}, },
data() { data() {
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
mName: undefined mName: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -102,192 +188,219 @@
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: '' sidx: "",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [
prop: 'mName', {
label: '区域名称' prop: "mName",
label: "区域名称",
}, },
{ {
prop: 'creatortime', prop: "creatortime",
label: '创建时间' label: "创建时间",
}, },
{ {
prop: 'creatorusername', prop: "creatorusername",
label: '创建人名称' label: "创建人名称",
}, },
{ {
prop: 'lastmodifytime', prop: "lastmodifytime",
label: '修改时间' label: "修改时间",
}, },
{ {
prop: 'lastmodifyusername', prop: "lastmodifyusername",
label: '修改人名称' label: "修改人名称",
} },
] ],
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-areasetting-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-areasetting-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-areasetting-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-areasetting-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-areasetting-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-areasetting-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ sortChange({ column, prop, order }) {
column, this.listQuery.sort = order == "ascending" ? "asc" : "desc";
prop, this.listQuery.sidx = !order ? "" : prop;
order this.initData();
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
}, },
initData() { initData() {
this.listLoading = true this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/areasetting/Areasetting/getList`, url: `/api/areasetting/Areasetting/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = [] var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, res.data.list[i].creatorTime = res.data.list[i].creatorTime
10) : ''; ? res.data.list[i].creatorTime.substring(0, 10)
res.data.list[i].lastmodifytime = res.data.list[i].lastmodifytime ? res.data.list[i].lastmodifytime.substring(0, : "";
10) : ''; res.data.list[i].lastmodifytime = res.data.list[i].lastmodifytime
? res.data.list[i].lastmodifytime.substring(0, 10)
: "";
let _data = res.data.list[i] let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/areasetting/Areasetting/${id}`, url: `/api/areasetting/Areasetting/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500 duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/areasetting/Areasetting/batchRemove/${ids}`, url: `/api/areasetting/Areasetting/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(() => {
}) })
.catch(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { let query = {
...data, ...data,
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/areasetting/Areasetting/Actions/Export`, url: `/api/areasetting/Areasetting/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: 'desc', // pageSize: 20,
sidx: '' // sort: 'desc',
} // sidx: ''
this.initData() // }
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,47 +1,86 @@
<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
v-model="query.documentNo"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <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.contractNm" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.contractNm"
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-date-picker v-model="query.businessDate" type="daterange" <el-date-picker
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期" v-model="query.businessDate"
end-placeholder="结束日期" > type="daterange"
value-format="timestamp"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" >
v-if="!showAll">展开</el-button> <el-button icon="el-icon-refresh-right" @click="resetAll()"
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> >重置</el-button
收起</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> </el-form>
@ -51,43 +90,106 @@
<div> <div>
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">--> <!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-download" @click="exportData()"
>导出
</el-button> </el-button>
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <!-- <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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange" custom-column border> <JNPF-table
<el-table-column prop="businessDate" label="业务日期" sortable width="150" align="center" 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="businessDate"
label="业务日期"
sortable
width="150"
align="center"
/> />
<el-table-column prop="documentNo" label="单据编号" sortable width="200" 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="customerNm"
label="客户"
sortable
width="200"
align="center"
/> />
<el-table-column prop="amount" label="金额" sortable width="150" 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
prop="quantity"
label="数量"
sortable
width="150"
align="center"
/> />
<el-table-column label="币别 " width="150" prop="currency" algin="center" sortable <el-table-column
label="币别 "
width="150"
prop="currency"
algin="center"
sortable
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" sortable width="150" align="center" <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="invoiceQuantity"
label="发票数量"
sortable
width="150"
align="center"
/> />
<el-table-column prop="sourceOrderNo" label="来源单号" sortable width="200" 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
prop="contractNm"
label="合同名称"
sortable
width="200"
align="center"
/> />
<!-- <el-table-column label="单据状态 " width="150" prop="status" algin="center"--> <!-- <el-table-column label="单据状态 " width="150" prop="status" algin="center"-->
<!--&gt;--> <!--&gt;-->
@ -95,44 +197,76 @@
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column prop="status" label="单据状态" sortable width="150" align="center"> <el-table-column
prop="status"
label="单据状态"
sortable
width="150"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" sortable width="150" align="center" <el-table-column
prop="remark"
label="备注"
sortable
width="150"
align="center"
/> />
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button
@click="addOrUpdateHandle(scope.row.id)" v-has="'btn_edit'">编辑 type="text"
@click="addOrUpdateHandle(scope.row.id)"
v-has="'btn_edit'"
>编辑
</el-button> </el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> --> </el-button> -->
<el-button type="text" <el-button
@click="goDetail(scope.row.id)"v-has="'btn_detail'">详情 type="text"
@click="goDetail(scope.row.id)"
v-has="'btn_detail'"
>详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </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>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -145,13 +279,14 @@
businessDate: undefined, businessDate: 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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
@ -161,169 +296,213 @@
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'businessDate', label: '业务日期'}, { prop: "businessDate", label: "业务日期" },
{prop: 'documentNo', label: '单据编号'}, { prop: "documentNo", label: "单据编号" },
{prop: 'customerNm', label: '客户'}, { prop: "customerNm", label: "客户" },
{prop: 'amount', label: '金额'}, { prop: "amount", label: "金额" },
{prop: 'quantity', label: '数量'}, { prop: "quantity", label: "数量" },
{prop: 'currency', label: '币别 '}, { prop: "currency", label: "币别 " },
{prop: 'invoiceAmount', label: '发票金额'}, { prop: "invoiceAmount", label: "发票金额" },
{prop: 'invoiceQuantity', label: '发票数量'}, { prop: "invoiceQuantity", label: "发票数量" },
{prop: 'sourceOrderNo', label: '销售订单号'}, { prop: "sourceOrderNo", label: "销售订单号" },
{prop: 'contractNm', label: '合同名称'}, { prop: "contractNm", label: "合同名称" },
{prop: 'status', label: '单据状态 '}, { prop: "status", label: "单据状态 " },
{prop: 'remark', label: '备注'}, { prop: "remark", label: "备注" },
], ],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}], currencyOptions: [
currencyProps:{"label":"fullName","value":"id"}, { fullName: "人民币", id: "0" },
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}], { fullName: "美元", id: "1" },
statusProps:{"label":"fullName","value":"id"}, { fullName: "英镑", id: "2" },
} ],
currencyProps: { label: "fullName", value: "id" },
statusOptions: [
{ fullName: "已保存", id: "0" },
{ fullName: "审批中", id: "1" },
{ fullName: "已审批", id: "2" },
],
statusProps: { label: "fullName", value: "id" },
};
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-arinvoices-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-arinvoices-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-arinvoices-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-arinvoices-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
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: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId:this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/arinvoices/Arinvoices/getList`, url: `/api/arinvoices/Arinvoices/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/arinvoices/Arinvoices/${id}`, url: `/api/arinvoices/Arinvoices/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/arinvoices/Arinvoices/batchRemove/${ids}`, url: `/api/arinvoices/Arinvoices/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(() => { .catch(() => {});
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/arinvoices/Arinvoices/Actions/Export`, url: `/api/arinvoices/Arinvoices/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "", // sort: "desc",
} // sidx: "",
this.initData() // }
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,28 +1,46 @@
<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
v-model="query.documentNo"
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-input v-model="query.contractNm" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.contractNm"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -30,11 +48,26 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()" v-has="'btn_add'"> <el-button
type="text"
icon="el-icon-plus"
@click="addOrUpdateHandle()"
v-has="'btn_add'"
>新增
</el-button> </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>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" v-has="'btn_batchRemove'"> <el-button
type="text"
icon="el-icon-delete"
@click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'"
>批量删除
</el-button> </el-button>
<!-- <el-button type="text" icon="el-icon-check" @click="exportData()">--> <!-- <el-button type="text" icon="el-icon-check" @click="exportData()">-->
<!-- </el-button>--> <!-- </el-button>-->
@ -42,37 +75,110 @@
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" icon="el-icon-check" @click="commit()">--> <!-- <el-button type="text" icon="el-icon-check" @click="commit()">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" icon="el-icon-check" @click="confirmprice()"v-has="'btn_confirmprice'"> <el-button
type="text"
icon="el-icon-check"
@click="confirmprice()"
v-has="'btn_confirmprice'"
>认款
</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" @click="reset()" /> <el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table
@selection-change="handleSelectionChange" custom-column border> v-loading="listLoading"
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" /> :data="list"
<el-table-column prop="customerNm" label="客户名称" sortable width="200" align="center" /> @sort-change="sortChange"
<el-table-column prop="contractNm" label="合同名称" sortable width="200" align="center" /> has-c
<el-table-column label="币别 " width="80" sortable prop="currency" align="center" > @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="contractNm"
label="合同名称"
sortable
width="200"
align="center"
/>
<el-table-column
label="币别 "
width="80"
sortable
prop="currency"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="amountCollected" sortable label="收款金额" width="150" align="center" /> <el-table-column
<el-table-column prop="collectionCount" sortable label="收款账户" width="150" align="center" /> prop="amountCollected"
<el-table-column prop="collectionBank" sortable label="收款银行" width="150" align="center" /> sortable
<el-table-column label="收款类型" sortable width="150" prop="paymentType" align="center" > label="收款金额"
width="150"
align="center"
/>
<el-table-column
prop="collectionCount"
sortable
label="收款账户"
width="150"
align="center"
/>
<el-table-column
prop="collectionBank"
sortable
label="收款银行"
width="150"
align="center"
/>
<el-table-column
label="收款类型"
sortable
width="150"
prop="paymentType"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }} {{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结算类型" sortable width="150" prop="settlementType" align="center" > <el-table-column
label="结算类型"
sortable
width="150"
prop="settlementType"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }} {{
scope.row.settlementType | dynamicText(settlementTypeOptions)
}}
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="单据状态" sortable width="150" prop="status" align="center" >--> <!-- <el-table-column label="单据状态" sortable width="150" prop="status" align="center" >-->
@ -80,58 +186,92 @@
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column prop="status" label="单据状态" sortable width="150" align="center"> <el-table-column
prop="status"
label="单据状态"
sortable
width="150"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">已提交</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已认款</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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorUserName" sortable label="制单人" width="150" align="center" /> <el-table-column
prop="creatorUserName"
sortable
label="制单人"
width="150"
align="center"
/>
<el-table-column label="操作" fixed="right" width="150"> <el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)"v-has="'btn_edit'"> <el-button
type="text"
@click="addOrUpdateHandle(scope.row)"
v-has="'btn_edit'"
>编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row)"v-has="'btn_batchRemove'"> <el-button
type="text"
class="JNPF-table-delBtn"
@click="handleDel(scope.row)"
v-has="'btn_batchRemove'"
>删除
</el-button> </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> </el-button>
<!-- <el-button type="text" @click="">撤回申请</el-button>--> <!-- <el-button type="text" @click="">撤回申请</el-button>-->
<!-- <el-button type="text" @click="">审核</el-button>--> <!-- <el-button type="text" @click="">审核</el-button>-->
<!-- <el-button type="text" @click="">弃审</el-button>--> <!-- <el-button type="text" @click="">弃审</el-button>-->
<!-- <el-button type="text" @click="">提交</el-button>--> <!-- <el-button type="text" @click="">提交</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData" /> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from "@/utils/request";
import { import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
getDictionaryDataSelector import JNPFForm from "./Form";
} from '@/api/systemData/dictionary' import ExportBox from "./ExportBox";
import JNPFForm from './Form' import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import ExportBox from './ExportBox' import Detail from "./Detail";
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
ExportBox, ExportBox,
Detail Detail,
}, },
data() { data() {
return { return {
@ -141,9 +281,9 @@
documentNo: undefined, documentNo: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -158,298 +298,340 @@
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [
prop: 'documentNo', {
label: '单据编号' prop: "documentNo",
label: "单据编号",
}, },
{ {
prop: 'customerNm', prop: "customerNm",
label: '客户名称' label: "客户名称",
}, },
{ {
prop: 'contractNm', prop: "contractNm",
label: '合同名称' label: "合同名称",
}, },
{ {
prop: 'currency', prop: "currency",
label: '币别 ' label: "币别 ",
}, },
{ {
prop: 'amountCollected', prop: "amountCollected",
label: '收款金额' label: "收款金额",
}, },
{ {
prop: 'collectionCount', prop: "collectionCount",
label: '收款账户' label: "收款账户",
}, },
{ {
prop: 'collectionBank', prop: "collectionBank",
label: '收款银行' label: "收款银行",
}, },
{ {
prop: 'paymentType', prop: "paymentType",
label: '收款类型 ' label: "收款类型 ",
}, },
{ {
prop: 'settlementType', prop: "settlementType",
label: '结算类型' label: "结算类型",
}, },
{ {
prop: 'status', prop: "status",
label: '单据状态 ' label: "单据状态 ",
}, },
{ {
prop: 'creatorUserName', prop: "creatorUserName",
label: '制单人' label: "制单人",
},
],
paymentTypeOptions: [
{
fullName: "货款",
id: "0",
},
{
fullName: "运费",
id: "1",
},
{
fullName: "仓储",
id: "2",
}, },
], ],
paymentTypeOptions: [{
"fullName": "货款",
"id": "0"
}, {
"fullName": "运费",
"id": "1"
}, {
"fullName": "仓储",
"id": "2"
}],
paymentTypeProps: { paymentTypeProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
currencyOptions: [{ currencyOptions: [
"fullName": "人民币", {
"id": "0" fullName: "人民币",
}, { id: "0",
"fullName": "美元", },
"id": "1" {
}, { fullName: "美元",
"fullName": "英镑", id: "1",
"id": "2" },
}], {
fullName: "英镑",
id: "2",
},
],
currencyProps: { currencyProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
settlementTypeOptions: [{ settlementTypeOptions: [
"fullName": "现金", {
"id": "0" fullName: "现金",
}, { id: "0",
"fullName": "赊购", },
"id": "1" {
}, { fullName: "赊购",
"fullName": "网银", id: "1",
"id": "2" },
}, { {
"fullName": "银企直连", fullName: "网银",
"id": "3" id: "2",
}, { },
"fullName": "银票", {
"id": "4" fullName: "银企直连",
}, { id: "3",
"fullName": "商票", },
"id": "5" {
}], fullName: "银票",
id: "4",
},
{
fullName: "商票",
id: "5",
},
],
settlementTypeProps: { settlementTypeProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
statusOptions: [{ statusOptions: [
"fullName": "已保存", {
"id": "0" fullName: "已保存",
}, { id: "0",
"fullName": "已提交", },
"id": "1" {
}, { fullName: "已提交",
"fullName": "已认款", id: "1",
"id": "2" },
}, ], {
fullName: "已认款",
id: "2",
},
],
statusProps: { statusProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-collection-pageSize") !== null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-collection-pageSize")
);
}
if (sessionStorage.getItem("scm-basicInformation-collection-query") !== null) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-collection-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-collection-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-collection-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ sortChange({ column, prop, order }) {
column, this.listQuery.sort = order == "ascending" ? "asc" : "desc";
prop, this.listQuery.sidx = !order ? "" : prop;
order this.initData();
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/collection/Collection/getList`, url: `/api/collection/Collection/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total this.total = res.data.pagination.total;
this.listLoading = false this.listLoading = false;
}) });
}, },
handleDel(row) { handleDel(row) {
if(row.Status != '0'){ if (row.Status != "0") {
this.$message({ this.$message({
type: 'error', type: "error",
message: '已认款无法删除', message: "已认款无法删除",
duration: 2500, duration: 2500,
}) });
return return;
} }
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/collection/Collection/${row.id}`, url: `/api/collection/Collection/${row.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) { handleSelectionChange(val) {
this.multipleSelectionItem = val this.multipleSelectionItem = val;
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
var statusFlag = true; var statusFlag = true;
this.multipleSelectionItem.forEach((item, index) => { this.multipleSelectionItem.forEach((item, index) => {
if(item.status != '0'){ if (item.status != "0") {
statusFlag = false; statusFlag = false;
} }
}); });
if (!statusFlag) { if (!statusFlag) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '已认款无法删除', message: "已认款无法删除",
duration: 1000 duration: 1000,
}); });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/collection/Collection/batchRemove/${ids}`, url: `/api/collection/Collection/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(() => {}) .catch(() => {});
}, },
commit() { commit() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
if (this.multipleSelection.length === 1) { if (this.multipleSelection.length === 1) {
let ids = this.multipleSelection.join() let ids = this.multipleSelection.join();
request({ request({
url: `/api/collection/Collection/commit/${ids}`, url: `/api/collection/Collection/commit/${ids}`,
method: 'POST', method: "POST",
}).then(res => { }).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() this.initData();
} },
});
}); });
})
} }
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择单条数据', message: "请选择单条数据",
duration: 2500 duration: 2500,
}) });
} }
}, },
confirmprice() { confirmprice() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
let ids = this.multipleSelection.join() let ids = this.multipleSelection.join();
if (this.multipleSelection.length === 1) { if (this.multipleSelection.length === 1) {
request({ request({
url: `/api/collection/Collection/confirmprice/${ids}`, url: `/api/collection/Collection/confirmprice/${ids}`,
method: 'POST', method: "POST",
}).then(res => { }).then((res) => {
this.$message({ this.$message({
type: 'success', type: "success",
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() this.initData();
} },
});
}); });
})
if (this.multipleSelection.length > 1) { if (this.multipleSelection.length > 1) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择单条数据', message: "请选择单条数据",
duration: 2500 duration: 2500,
}) });
} }
} }
}, },
@ -457,75 +639,76 @@
var id = undefined; var id = undefined;
if (row) { if (row) {
id = row.id; id = row.id;
if(row.status != '0'){ if (row.status != "0") {
var msg = ''; var msg = "";
if(row.status == '1'){ if (row.status == "1") {
msg = '已提交'; msg = "已提交";
}else if(row.status == '2'){ } else if (row.status == "2") {
msg = '已认款'; msg = "已认款";
} }
this.$message({ this.$message({
type: 'error', type: "error",
message: msg +'无法编辑', message: msg + "无法编辑",
duration: 2500 duration: 2500,
}); });
return return;
} }
} }
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { let query = {
...data, ...data,
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/collection/Collection/Actions/Export`, url: `/api/collection/Collection/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "", // sort: "desc",
} // sidx: "",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,23 +1,34 @@
<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.inventoryOrgCode" placeholder="请输入" clearable></el-input> <el-input
v-model="query.inventoryOrgCode"
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.inventoryOrgName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.inventoryOrgName"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -30,52 +41,82 @@
</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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'> <JNPF-table
<el-table-column prop="inventoryOrgCode" label="编码" width="0" align="left" v-loading="listLoading"
:data="list"
@sort-change="sortChange"
>
<el-table-column
prop="inventoryOrgCode"
label="编码"
width="0"
align="left"
/> />
<el-table-column prop="inventoryOrgName" label="名称" width="0" align="left" <el-table-column
prop="inventoryOrgName"
label="名称"
width="0"
align="left"
/> />
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" <el-table-column
prop="creatorTime"
label="创建时间"
width="0"
align="left"
/> />
<el-table-column prop="companyId" label="所属组织" width="0" align="left" <el-table-column
prop="companyId"
label="所属组织"
width="0"
align="left"
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="100">
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" v-has="'btn_edit'"--> <!-- <el-button type="text" v-has="'btn_edit'"-->
<!-- @click="addOrUpdateHandle(scope.row.id)">编辑--> <!-- @click="addOrUpdateHandle(scope.row.id)">编辑-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">--> <!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" <el-button type="text" @click="goDetail(scope.row.id)"
@click="goDetail(scope.row.id)">详情 >详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -87,9 +128,9 @@
inventoryOrgName: undefined, inventoryOrgName: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -103,127 +144,159 @@
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'inventoryOrgCode', label: '编码'}, { prop: "inventoryOrgCode", label: "编码" },
{prop: 'inventoryOrgName', label: '名称'}, { prop: "inventoryOrgName", label: "名称" },
{prop: 'creatorTime', label: '创建时间'}, { prop: "creatorTime", label: "创建时间" },
{prop: 'companyId', label: '所属组织'}, { prop: "companyId", label: "所属组织" },
], ],
companyIdOptions: [], companyIdOptions: [],
companyIdProps: {"label": "F_FullName", "value": "F_Id"}, companyIdProps: { label: "F_FullName", value: "F_Id" },
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-inventoryOrd-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-inventoryOrd-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-inventoryOrd-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-inventoryOrd-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-inventoryOrd-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-inventoryOrd-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/example/InventoryOrg/getList`, url: `/api/example/InventoryOrg/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/example/InventoryOrg/${id}`, url: `/api/example/InventoryOrg/${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(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId} let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/example/InventoryOrg/Actions/Export`, url: `/api/example/InventoryOrg/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "creatorTime", // sort: "desc",
} // sidx: "creatorTime",
this.initData() // }
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,23 +1,34 @@
<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.inventoryOrgDetailCode" placeholder="请输入" clearable></el-input> <el-input
v-model="query.inventoryOrgDetailCode"
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.inventoryOrgDetailName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.inventoryOrgDetailName"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -27,57 +38,92 @@
<div> <div>
<!-- <el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">--> <!-- <el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()"> <el-button
type="text"
v-has="'btn_download'"
icon="el-icon-download"
@click="exportData()"
>导出
</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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'> <JNPF-table
<el-table-column prop="inventoryOrgDetailCode" label="编码" width="0" align="left" v-loading="listLoading"
:data="list"
@sort-change="sortChange"
>
<el-table-column
prop="inventoryOrgDetailCode"
label="编码"
width="0"
align="left"
/> />
<el-table-column prop="inventoryOrgDetailName" label="名称" width="0" align="left" <el-table-column
prop="inventoryOrgDetailName"
label="名称"
width="0"
align="left"
/> />
<el-table-column prop="inventoryId" label="库存组织" width="0" align="left" <el-table-column
prop="inventoryId"
label="库存组织"
width="0"
align="left"
/> />
<el-table-column prop="creatorTime" label="创建时间" width="0" align="left" <el-table-column
prop="creatorTime"
label="创建时间"
width="0"
align="left"
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="100">
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button type="text" v-has="'btn_edit'"--> <!-- <el-button type="text" v-has="'btn_edit'"-->
<!-- @click="addOrUpdateHandle(scope.row.id)">编辑--> <!-- @click="addOrUpdateHandle(scope.row.id)">编辑-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">--> <!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" <el-button type="text" @click="goDetail(scope.row.id)"
@click="goDetail(scope.row.id)">详情 >详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -89,9 +135,9 @@
inventoryOrgDetailName: undefined, inventoryOrgDetailName: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -105,125 +151,157 @@
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'inventoryOrgDetailCode', label: '编码'}, { prop: "inventoryOrgDetailCode", label: "编码" },
{prop: 'inventoryOrgDetailName', label: '名称'}, { prop: "inventoryOrgDetailName", label: "名称" },
{prop: 'inventoryId', label: '库存组织'}, { prop: "inventoryId", label: "库存组织" },
{prop: 'creatorTime', label: '创建时间'}, { prop: "creatorTime", label: "创建时间" },
], ],
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-inventoryOrdDetail-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-inventoryOrdDetail-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-inventoryOrdDetail-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-inventoryOrdDetail-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-inventoryOrdDetail-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-inventoryOrdDetail-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/example/InventoryOrgDetail/getList`, url: `/api/example/InventoryOrgDetail/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/example/InventoryOrgDetail/${id}`, url: `/api/example/InventoryOrgDetail/${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(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId} let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/example/InventoryOrgDetail/Actions/Export`, url: `/api/example/InventoryOrgDetail/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "creatorTime", // sort: "desc",
} // sidx: "creatorTime",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,47 +1,84 @@
<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
v-model="query.documentNo"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <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.souceno" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.souceno"
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.purchaseName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.purchaseName"
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.supplierName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.supplierName"
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-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"
value-format="timestamp"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" >
v-if="!showAll">展开</el-button> <el-button icon="el-icon-refresh-right" @click="resetAll()"
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> >重置</el-button
收起</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> </el-form>
@ -51,90 +88,208 @@
<div> <div>
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()"> <!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> --> </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>
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <!-- <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" @click="reset()" /> <el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table
@selection-change="handleSelectionChange" custom-column border> v-loading="listLoading"
<el-table-column prop="documentNo" label="单据编号" width="200" align="center" sortable="custom" /> :data="list"
<el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" /> @sort-change="sortChange"
<el-table-column prop="purchaseorderId" label="采购订单号" width="150" align="center" sortable="custom" /> has-c
<el-table-column prop="contractId" label="合同名称" width="150" align="center" sortable="custom" /> @selection-change="handleSelectionChange"
<el-table-column prop="supplierId" label="供应商" width="150" align="center" sortable="custom" /> custom-column
<el-table-column prop="amount" label="金额" width="150" align="center" sortable="custom" /> border
<el-table-column prop="quantity" label="结算重量" width="150" align="center" sortable="custom" /> >
<el-table-column label="发票类型" width="150" prop="invoiceType" align="center" sortable="custom"> <el-table-column type="index" fixed="left" width="1" />
<el-table-column
prop="documentNo"
label="单据编号"
width="200"
align="center"
sortable="custom"
/>
<el-table-column
prop="businessDate"
label="业务日期"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="purchaseorderId"
label="采购订单号"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="contractId"
label="合同名称"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="supplierId"
label="供应商"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="amount"
label="金额"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="quantity"
label="结算重量"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
label="发票类型"
width="150"
prop="invoiceType"
align="center"
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.invoiceType | dynamicText(invoiceTypeOptions) }} {{ scope.row.invoiceType | dynamicText(invoiceTypeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="币别 " width="150" prop="currency" align="center" sortable="custom"> <el-table-column
label="币别 "
width="150"
prop="currency"
align="center"
sortable="custom"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceAmount" label="发票金额" width="150" align="center" sortable="custom" /> <el-table-column
<el-table-column prop="invoiceQuantity" label="发票数量" width="150" align="center" sortable="custom" /> prop="invoiceAmount"
label="发票金额"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
prop="invoiceQuantity"
label="发票数量"
width="150"
align="center"
sortable="custom"
/>
<!-- <el-table-column label="单据状态" width="150" prop="status"sortable="custom" align="center" >--> <!-- <el-table-column label="单据状态" width="150" prop="status"sortable="custom" align="center" >-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </el-table-column>-->
<el-table-column prop="status" label="单据状态" sortable width="150" align="center"> <el-table-column
prop="status"
label="单据状态"
sortable
width="150"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" /> <el-table-column
<el-table-column label="操作" fixed="right" width="150" align="center" > prop="remark"
label="备注"
width="150"
align="center"
sortable="custom"
/>
<el-table-column
label="操作"
fixed="right"
width="150"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)" v-has="'btn_edit'"> <el-button
type="text"
@click="addOrUpdateHandle(scope.row)"
v-has="'btn_edit'"
>编辑
</el-button> </el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> --> </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> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData" /> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from "@/utils/request";
import { import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
getDictionaryDataSelector import JNPFForm from "./Form";
} from '@/api/systemData/dictionary' import ExportBox from "./ExportBox";
import JNPFForm from './Form' import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import ExportBox from './ExportBox' import Detail from "./Detail";
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
ExportBox, ExportBox,
Detail Detail,
}, },
data() { data() {
return { return {
@ -144,9 +299,9 @@
documentNo: undefined, documentNo: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -160,269 +315,312 @@
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [
prop: 'documentNo', {
label: '单据编号' prop: "documentNo",
label: "单据编号",
}, },
{ {
prop: 'businessDate', prop: "businessDate",
label: '业务日期' label: "业务日期",
}, },
{ {
prop: 'amount', prop: "amount",
label: '金额' label: "金额",
}, },
{ {
prop: 'quantity', prop: "quantity",
label: '数量' label: "数量",
}, },
{ {
prop: 'invoiceType', prop: "invoiceType",
label: '发票类型' label: "发票类型",
}, },
{ {
prop: 'currency', prop: "currency",
label: '币别 ' label: "币别 ",
}, },
{ {
prop: 'remark', prop: "remark",
label: '备注' label: "备注",
}, },
{ {
prop: 'status', prop: "status",
label: '单据状态' label: "单据状态",
}, },
{ {
prop: 'invoiceAmount', prop: "invoiceAmount",
label: '发票金额' label: "发票金额",
}, },
{ {
prop: 'invoiceQuantity', prop: "invoiceQuantity",
label: '发票数量' label: "发票数量",
}, },
{ {
prop: 'purchaseorderId', prop: "purchaseorderId",
label: '采购订单号' label: "采购订单号",
}, },
{ {
prop: 'contractId', prop: "contractId",
label: '合同名称' label: "合同名称",
}, },
{ {
prop: 'supplierId', prop: "supplierId",
label: '供应商' label: "供应商",
},
],
invoiceTypeOptions: [
{
fullName: "普通增值税发票",
id: "1",
},
{
fullName: "专用增值税发票",
id: "2",
},
{
fullName: "增值税电子普通发票",
id: "3",
},
{
fullName: "增值税电子发票",
id: "4",
}, },
], ],
invoiceTypeOptions: [{
"fullName": "普通增值税发票",
"id": "1"
}, {
"fullName": "专用增值税发票",
"id": "2"
}, {
"fullName": "增值税电子普通发票",
"id": "3"
}, {
"fullName": "增值税电子发票",
"id": "4"
}],
invoiceTypeProps: { invoiceTypeProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
currencyOptions: [{ currencyOptions: [
"fullName": "人民币", {
"id": "0" fullName: "人民币",
}, { id: "0",
"fullName": "美元", },
"id": "1" {
}, { fullName: "美元",
"fullName": "英镑", id: "1",
"id": "2" },
}], {
fullName: "英镑",
id: "2",
},
],
currencyProps: { currencyProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
statusOptions: [{ statusOptions: [
"fullName": "已保存", {
"id": "0" fullName: "已保存",
}, { id: "0",
"fullName": "审批中", },
"id": "1" {
}, { fullName: "审批中",
"fullName": "已审批", id: "1",
"id": "2" },
}], {
fullName: "已审批",
id: "2",
},
],
statusProps: { statusProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-invoices-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-invoices-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-invoices-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-invoices-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-invoices-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem(
"scm-basicInformation-invoices-query",
json_query
);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ sortChange({ column, prop, order }) {
column, this.listQuery.sort = order == "ascending" ? "asc" : "desc";
prop, this.listQuery.sidx = !order ? "" : prop;
order this.initData();
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/invoices/Invoices/getList`, url: `/api/invoices/Invoices/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/invoices/Invoices/${id}`, url: `/api/invoices/Invoices/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/invoices/Invoices/batchRemove/${ids}`, url: `/api/invoices/Invoices/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(() => {}) .catch(() => {});
}, },
addOrUpdateHandle(row, isDetail) { addOrUpdateHandle(row, isDetail) {
var id = undefined; var id = undefined;
if (row) { if (row) {
id = row.id; id = row.id;
if(row.status != '0'){ if (row.status != "0") {
this.$message({ this.$message({
type: 'error', type: "error",
message: '审批中或已审批无法编辑', message: "审批中或已审批无法编辑",
duration: 2500, duration: 2500,
}); });
return return;
} }
} }
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { let query = {
...data, ...data,
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/invoices/Invoices/Actions/Export`, url: `/api/invoices/Invoices/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "", // sort: "desc",
} // sidx: "",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,28 +1,42 @@
<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.mName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.mName"
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.monitoringId" placeholder="请选择区域" <el-select
clearable> v-model="query.monitoringId"
<el-option v-for="(item, index) in monitoringIdOptions" :key="index" placeholder="请选择区域"
:label="item.m_name" :value="item.id" clearable
:disabled="item.disabled"></el-option> >
<el-option
v-for="(item, index) in monitoringIdOptions"
:key="index"
:label="item.m_name"
: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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -30,78 +44,161 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button
type="primary"
v-has="'btn_add'"
icon="el-icon-plus"
@click="addOrUpdateHandle()"
>新增
</el-button> </el-button>
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()"> <el-button
type="text"
v-has="'btn_download'"
icon="el-icon-download"
@click="exportData()"
>导出
</el-button> </el-button>
<!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">--> <!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" v-has="'btn_edit'" icon="el-icon-download" @click=""> <el-button
type="text"
v-has="'btn_edit'"
icon="el-icon-download"
@click=""
>编辑
</el-button> </el-button>
<el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <el-button
type="text"
v-has="'btn_batchRemove'"
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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table
@selection-change="handleSelectionChange" border> v-loading="listLoading"
<el-table-column type="index" width="50" label="序号" align="center" /> :data="list"
<el-table-column prop="mName" label="设备名称" width="300" align="center" sortable @sort-change="sortChange"
has-c
:hasNO="false"
@selection-change="handleSelectionChange"
border
>
<el-table-column type="index" fixed="left" width="1" />
<el-table-column
type="index"
width="50"
label="序号"
align="center"
/>
<el-table-column
prop="mName"
label="设备名称"
width="300"
align="center"
sortable
/> />
<el-table-column prop="serialnumber" label="设备序列号" width="300" align="center" sortable <el-table-column
prop="serialnumber"
label="设备序列号"
width="300"
align="center"
sortable
/> />
<el-table-column prop="monitoringId" label="区域" width="200" align="center" sortable <el-table-column
prop="monitoringId"
label="区域"
width="200"
align="center"
sortable
/> />
<el-table-column label="设备状态" width="200" sortable prop="mStatus" align="center" > <el-table-column
label="设备状态"
width="200"
sortable
prop="mStatus"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.mStatus | dynamicText(mStatusOptions) }} {{ scope.row.mStatus | dynamicText(mStatusOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="channelNumber" label="设备通道号" width="200" align="center" sortable <el-table-column
prop="channelNumber"
label="设备通道号"
width="200"
align="center"
sortable
/> />
<el-table-column label="是否显示" width="200" sortable prop="isEnable" align="center" > <el-table-column
label="是否显示"
width="200"
sortable
prop="isEnable"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isEnable | dynamicText(isEnableOptions) }} {{ scope.row.isEnable | dynamicText(isEnableOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="100">
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" <el-button
@click="addOrUpdateHandle(scope.row.id)">编辑 type="text"
v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)"
>编辑
</el-button> </el-button>
<el-button type="text" class="JNPF-table-delBtn" v-has="'btn_remove'" @click="handleDel(scope.row.id)"> <el-button
type="text"
class="JNPF-table-delBtn"
v-has="'btn_remove'"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -110,192 +207,236 @@
detailVisible: false, detailVisible: false,
query: { query: {
mName: undefined, mName: undefined,
monitoringId: undefined monitoringId: 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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: 'creatorTime' sidx: "creatorTime",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'mName', label: '设备名称' }, { prop: "mName", label: "设备名称" },
{ prop: 'serialnumber', label: '设备序列号' }, { prop: "serialnumber", label: "设备序列号" },
{ prop: 'monitoringId', label: '区域' }, { prop: "monitoringId", label: "区域" },
{ prop: 'mStatus', label: '设备状态:' }, { prop: "mStatus", label: "设备状态:" },
{ prop: 'channelNumber', label: '设备通道号' }, { prop: "channelNumber", label: "设备通道号" },
{ prop: 'isEnable', label: '是否显示' } { prop: "isEnable", label: "是否显示" },
], ],
monitoringIdOptions: [], monitoringIdOptions: [],
monitoringIdProps: { 'label': 'm_name', 'value': 'id' }, monitoringIdProps: { label: "m_name", value: "id" },
mStatusOptions: [{ 'fullName': '在线', 'id': '1' }, { 'fullName': '不在线', 'id': '0' }], mStatusOptions: [
mStatusProps: { 'label': 'fullName', 'value': 'id' }, { fullName: "在线", id: "1" },
isEnableOptions: [{ 'fullName': '显示', 'id': '1' }, { 'fullName': '不显示', 'id': '0' }], { fullName: "不在线", id: "0" },
isEnableProps: { 'label': 'fullName', 'value': 'id' } ],
} mStatusProps: { label: "fullName", value: "id" },
isEnableOptions: [
{ fullName: "显示", id: "1" },
{ fullName: "不显示", id: "0" },
],
isEnableProps: { label: "fullName", value: "id" },
};
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
this.getmonitoringIdOptions() sessionStorage.getItem("scm-basicInformation-monitormanage-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-monitormanage-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-monitormanage-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-monitormanage-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
this.getmonitoringIdOptions();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-monitormanage-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem(
"scm-basicInformation-monitormanage-query",
json_query
);
}, },
methods: { methods: {
getmonitoringIdOptions() { getmonitoringIdOptions() {
getDataInterfaceRes('370933183241262469').then(res => { getDataInterfaceRes("370933183241262469").then((res) => {
let data = res.data.data let data = res.data.data;
this.monitoringIdOptions = data this.monitoringIdOptions = data;
}) });
}, },
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/example/Monitoringitem/getList`, url: `/api/example/Monitoringitem/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = [] var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : ''; res.data.list[i].creatorTime = res.data.list[i].creatorTime
let _data = res.data.list[i] ? res.data.list[i].creatorTime.substring(0, 10)
_list.push(_data) : "";
let _data = res.data.list[i];
_list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/example/Monitoringitem/${id}`, url: `/api/example/Monitoringitem/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500 duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/example/Monitoringitem/batchRemove/${ids}`, url: `/api/example/Monitoringitem/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(() => {
}) })
.catch(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId } let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/example/Monitoringitem/Actions/Export`, url: `/api/example/Monitoringitem/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery = {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: 'creatorTime' sidx: "creatorTime",
} };
this.initData() this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

File diff suppressed because it is too large Load Diff

@ -95,6 +95,7 @@
custom-column custom-column
border border
> >
<el-table-column type="index" fixed="left" width="1" />
<el-table-column <el-table-column
prop="documentNo" prop="documentNo"
label="单据编号" label="单据编号"
@ -549,8 +550,37 @@ export default {
}, },
}, },
created() { created() {
if (
sessionStorage.getItem("scm-basicInformation-paymentdoc-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-paymentdoc-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-paymentdoc-query") !==
null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-paymentdoc-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData(); this.initData();
}, },
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-paymentdoc-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem(
"scm-basicInformation-paymentdoc-query",
json_query
);
},
methods: { methods: {
stopPayment() { stopPayment() {
if (!this.multipleSelectionItem.length) { if (!this.multipleSelectionItem.length) {
@ -779,12 +809,13 @@ export default {
}); });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "", // sort: "desc",
}; // sidx: "",
// };
this.initData(); this.initData();
}, },
colseFlow(isrRefresh) { colseFlow(isrRefresh) {

@ -68,6 +68,7 @@
custom-column custom-column
border border
> >
<el-table-column type="index" fixed="left" width="1" />
<el-table-column <el-table-column
prop="documentNo" prop="documentNo"
label="单据编号" label="单据编号"

@ -181,6 +181,7 @@
show-summary show-summary
:summary-method="getSummaries" :summary-method="getSummaries"
> >
<el-table-column type="index" fixed="left" width="1" />
<el-table-column <el-table-column
prop="documentNo" prop="documentNo"
label="单据编号" label="单据编号"

@ -1,50 +1,92 @@
<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
v-model="query.documentno"
placeholder="请输入"
clearable
>
</el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <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.souceno" placeholder="请输入" clearable> </el-input> <el-input
v-model="query.souceno"
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.supplierName" placeholder="请输入" clearable></el-input> <el-input
v-model="query.supplierName"
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-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"
value-format="timestamp"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</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.status" placeholder="请选择单据状态" clearable> <el-select
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" v-model="query.status"
:disabled="item.disabled"></el-option> placeholder="请选择单据状态"
clearable
>
<el-option
v-for="(item, index) in statusOptions"
:key="index"
: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>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" >
v-if="!showAll">展开</el-button> <el-button icon="el-icon-refresh-right" @click="resetAll()"
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> >重置</el-button
收起</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> </el-form>
@ -54,89 +96,201 @@
<div> <div>
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()"> <!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> --> </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>
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <!-- <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" @click="reset()" /> <el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table
@selection-change="handleSelectionChange" custom-column border> v-loading="listLoading"
<el-table-column prop="documentno" label="单据编号" sortable width="200" align="center" /> :data="list"
<el-table-column prop="supplier" label="供应商" sortable width="220" align="center" /> @sort-change="sortChange"
<el-table-column prop="receiptamount" label="入库金额" sortable width="120" align="center" /> has-c
<el-table-column prop="receiptnum" label="入库数量" sortable width="120" align="center" /> @selection-change="handleSelectionChange"
<el-table-column prop="currency" label="币别" sortable width="80" align="center"> 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="supplier"
label="供应商"
sortable
width="220"
align="center"
/>
<el-table-column
prop="receiptamount"
label="入库金额"
sortable
width="120"
align="center"
/>
<el-table-column
prop="receiptnum"
label="入库数量"
sortable
width="120"
align="center"
/>
<el-table-column
prop="currency"
label="币别"
sortable
width="80"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehousingdate" sortable label="入库日期" width="120" align="center" /> <el-table-column
<el-table-column prop="purchaseorderSouceno" sortable label="来源单号" width="200" align="center" /> prop="warehousingdate"
<el-table-column prop="type" sortable label="业务类型" width="120" align="center"> sortable
label="入库日期"
width="120"
align="center"
/>
<el-table-column
prop="purchaseorderSouceno"
sortable
label="来源单号"
width="200"
align="center"
/>
<el-table-column
prop="type"
sortable
label="业务类型"
width="120"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }} {{ scope.row.type | dynamicText(typeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" sortable label="备注" width="120" align="center" /> <el-table-column
prop="remark"
sortable
label="备注"
width="120"
align="center"
/>
<!-- <el-table-column prop="status" sortable label="单据状态" width="120" align="center">--> <!-- <el-table-column prop="status" sortable label="单据状态" width="120" align="center">-->
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </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"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" sortable label="创建日期" width="120" align="center" /> <el-table-column
<el-table-column prop="creatorUserName" sortable label="创建人" width="120" align="center" /> prop="creatorTime"
<el-table-column label="操作" fixed="right" width="150" align="center"> sortable
label="创建日期"
width="120"
align="center"
/>
<el-table-column
prop="creatorUserName"
sortable
label="创建人"
width="120"
align="center"
/>
<el-table-column
label="操作"
fixed="right"
width="150"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="addOrUpdateHandle(scope.row)"v-has="'btn_edit'"> <el-button
type="text"
@click="addOrUpdateHandle(scope.row)"
v-has="'btn_edit'"
>编辑
</el-button> </el-button>
<!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <!-- <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> --> </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> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData" /> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from "@/utils/request";
import { import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
getDictionaryDataSelector import JNPFForm from "./Form";
} from '@/api/systemData/dictionary' import ExportBox from "./ExportBox";
import JNPFForm from './Form' import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import ExportBox from './ExportBox' import Detail from "./Detail";
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: { components: {
JNPFForm, JNPFForm,
ExportBox, ExportBox,
Detail Detail,
}, },
data() { data() {
return { return {
@ -147,9 +301,9 @@
status: undefined, status: undefined,
}, },
treeProps: { treeProps: {
children: 'children', children: "children",
label: 'fullName', label: "fullName",
value: 'id' value: "id",
}, },
list: [], list: [],
listLoading: true, listLoading: true,
@ -163,263 +317,306 @@
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [{ columnList: [
prop: 'documentno', {
label: '单据编号' prop: "documentno",
label: "单据编号",
},
{
prop: "supplier",
label: "供应商名称",
}, },
{ {
prop: 'supplier', prop: "receiptamount",
label: '供应商名称' label: "入库金额",
}, },
{ {
prop: 'receiptamount', prop: "receiptnum",
label: '入库金额' label: "入库数量",
}, },
{ {
prop: 'receiptnum', prop: "currency",
label: '入库数量' label: "币别",
}, },
{ {
prop: 'currency', prop: "warehousingdate",
label: '币别' label: "入库日期",
}, },
{ {
prop: 'warehousingdate', prop: "purchaseorderSouceno",
label: '入库日期' label: "来源单号",
}, },
{ {
prop: 'purchaseorderSouceno', prop: "type",
label: '来源单号' label: "业务类型",
}, },
{ {
prop: 'type', prop: "remark",
label: '业务类型' label: "备注",
}, },
{ {
prop: 'remark', prop: "status",
label: '备注' label: "单据状态",
}, },
{ {
prop: 'status', prop: "creatorTime",
label: '单据状态' label: "创建日期",
}, },
{ {
prop: 'creatorTime', prop: "creatorUserName",
label: '创建日期' label: "创建人",
},
],
typeOptions: [
{
fullName: "采购入库",
id: "0",
}, },
{ {
prop: 'creatorUserName', fullName: "购销入库",
label: '创建人' id: "1",
}, },
], ],
typeOptions: [{
"fullName": "采购入库",
"id": "0"
}, {
"fullName": "购销入库",
"id": "1"
}],
typeProps: { typeProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
currencyOptions: [{ currencyOptions: [
"fullName": "人民币", {
"id": "0" fullName: "人民币",
}, { id: "0",
"fullName": "美元", },
"id": "1" {
}, { fullName: "美元",
"fullName": "英镑", id: "1",
"id": "2" },
}], {
fullName: "英镑",
id: "2",
},
],
currencyProps: { currencyProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
statusOptions: [{ statusOptions: [
"fullName": "已保存", {
"id": "0" fullName: "已保存",
}, { id: "0",
"fullName": "审批中", },
"id": "1" {
}, { fullName: "审批中",
"fullName": "已审批", id: "1",
"id": "2" },
}], {
fullName: "已审批",
id: "2",
},
],
statusProps: { statusProps: {
"label": "fullName", label: "fullName",
"value": "id" value: "id",
}, },
} };
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-receiptin-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-receiptin-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-receiptin-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-receiptin-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-receiptin-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem(
"scm-basicInformation-receiptin-query",
json_query
);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ sortChange({ column, prop, order }) {
column, this.listQuery.sort = order == "ascending" ? "asc" : "desc";
prop, this.listQuery.sidx = !order ? "" : prop;
order this.initData();
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/receiptin/Receiptin/getList`, url: `/api/receiptin/Receiptin/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, res.data.list[i].creatorTime = res.data.list[i].creatorTime
10) : ''; ? res.data.list[i].creatorTime.substring(0, 10)
res.data.list[i].warehousingdate = res.data.list[i].warehousingdate ? res.data.list[i].warehousingdate : "";
.substring(0, 10) : ''; res.data.list[i].warehousingdate = res.data.list[i].warehousingdate
? res.data.list[i].warehousingdate.substring(0, 10)
: "";
let _data = res.data.list[i]; let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/receiptin/Receiptin/${id}`, url: `/api/receiptin/Receiptin/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/receiptin/Receiptin/batchRemove/${ids}`, url: `/api/receiptin/Receiptin/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(() => {}) .catch(() => {});
}, },
addOrUpdateHandle(row, isDetail) { addOrUpdateHandle(row, isDetail) {
var id = undefined; var id = undefined;
if (row) { if (row) {
id = row.id; id = row.id;
if(row.status != '0'){ if (row.status != "0") {
this.$message({ this.$message({
type: 'error', type: "error",
message: '审批中或已审批无法编辑', message: "审批中或已审批无法编辑",
duration: 2500, duration: 2500,
}); });
return return;
} }
} }
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { let query = {
...data, ...data,
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/receiptin/Receiptin/Actions/Export`, url: `/api/receiptin/Receiptin/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "creatorTime", // sort: "desc",
} // sidx: "creatorTime",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -6,47 +6,82 @@
<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
v-model="query.documentNo"
placeholder="请输入"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<template v-if="showAll"> <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"
value-format="timestamp"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</template> </template>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
<el-button type="text" icon="el-icon-arrow-down" @click="showAll=true" >
v-if="!showAll">展开</el-button> <el-button icon="el-icon-refresh-right" @click="resetAll()"
<el-button type="text" icon="el-icon-arrow-up" @click="showAll=false" v-else> >重置</el-button
收起</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> </el-form>
@ -56,46 +91,107 @@
<div> <div>
<!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">--> <!-- <el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </el-button>--> <!-- </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>
<!-- <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <!-- <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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table
@selection-change="handleSelectionChange" custom-column border> v-loading="listLoading"
<el-table-column prop="documentNo" label="单据编号" sortable width="200" align="center" :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"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="issueDate" label="出库日期" width="120" align="center" <el-table-column
sortable="custom"/> prop="issueDate"
<el-table-column prop="sourceOrderNo" label="来源单号" sortable width="200" align="center" 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"> <template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }} {{ scope.row.type | dynamicText(typeOptions) }}
</template> </template>
</el-table-column> </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"--> <!-- <el-table-column label="单据状态" width="0" prop="status" algin="left"-->
<!-- >--> <!-- >-->
@ -103,47 +199,83 @@
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </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"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</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> </template>
</el-table-column> </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" <el-table-column label="操作" fixed="right" width="150">
width="150">
<template slot-scope="scope"> <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>
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> --> </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> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -156,13 +288,14 @@
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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
@ -172,174 +305,223 @@
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{prop: 'documentNo', label: '单据编号'}, { prop: "documentNo", label: "单据编号" },
{prop: 'customerNm', label: '客户名称'}, { prop: "customerNm", label: "客户名称" },
{prop: 'amount', label: '出库金额'}, { prop: "amount", label: "出库金额" },
{prop: 'num', label: '出库数量'}, { prop: "num", label: "出库数量" },
{prop: 'currency', label: '币别'}, { prop: "currency", label: "币别" },
{prop: 'issueDate', label: '出库日期'}, { prop: "issueDate", label: "出库日期" },
{prop: 'sourceOrderNo', label: '来源单号'}, { prop: "sourceOrderNo", label: "来源单号" },
{prop: 'type', label: '业务类型'}, { prop: "type", label: "业务类型" },
{prop: 'remark', label: '备注'}, { prop: "remark", label: "备注" },
{prop: 'status', label: '单据状态'}, { prop: "status", label: "单据状态" },
{prop: 'creatorTime', label: '创建时间'}, { prop: "creatorTime", label: "创建时间" },
{prop: 'creatorUserName', label: '创建人名称'}, { prop: "creatorUserName", label: "创建人名称" },
], ],
typeOptions: [{"fullName": "销售出库", "id": "0"}, {"fullName": "购销出库", "id": "1"}], typeOptions: [
typeProps: {"label": "fullName", "value": "id"}, { fullName: "销售出库", id: "0" },
currencyOptions: [{"fullName": "人民币", "id": "0"}, {"fullName": "美元", "id": "1"}, {"fullName": "英镑", "id": "2"}], { fullName: "购销出库", id: "1" },
currencyProps: {"label": "fullName", "value": "id"}, ],
statusOptions: [{"fullName": "已保存", "id": "0"}, {"fullName": "审批中", "id": "1"}, {"fullName": "已审批", "id": "2"}], typeProps: { label: "fullName", value: "id" },
statusProps: {"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: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { 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: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true; this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
}; };
request({ request({
url: `/api/receipout/Receiptout/getList`, url: `/api/receipout/Receiptout/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = []; var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]; let _data = res.data.list[i];
let format = "YYYY-MM-DD" let format = "YYYY-MM-DD";
_data.creatorTime = this.jnpf.dateFormat(res.data.list[i].creatorTime,format) _data.creatorTime = this.jnpf.dateFormat(
_data.issueDate = this.jnpf.dateFormat(res.data.list[i].issueDate,format) res.data.list[i].creatorTime,
_list.push(_data) format
);
_data.issueDate = this.jnpf.dateFormat(
res.data.list[i].issueDate,
format
);
_list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500, duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.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(() => { .catch(() => {});
})
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId} let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/receipout/Receiptout/Actions/Export`, url: `/api/receipout/Receiptout/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: "desc", // pageSize: 20,
sidx: "", // sort: "desc",
} // sidx: "",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,23 +1,34 @@
<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.areacode" placeholder="请输入" clearable></el-input> <el-input
v-model="query.areacode"
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.areaname" placeholder="请输入" clearable></el-input> <el-input
v-model="query.areaname"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -25,75 +36,157 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button
type="primary"
v-has="'btn_add'"
icon="el-icon-plus"
@click="addOrUpdateHandle()"
>新增
</el-button> </el-button>
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()"> <el-button
type="text"
v-has="'btn_download'"
icon="el-icon-download"
@click="exportData()"
>导出
</el-button> </el-button>
<!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">--> <!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <el-button
type="text"
v-has="'btn_batchRemove'"
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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table
@selection-change="handleSelectionChange" border> v-loading="listLoading"
<el-table-column type="index" width="50" label="序号" align="center" /> :data="list"
<el-table-column prop="areacode" label="库区编码" width="250" align="center" sortable @sort-change="sortChange"
has-c
:hasNO="false"
@selection-change="handleSelectionChange"
border
>
<el-table-column type="index" fixed="left" width="1" />
<el-table-column
type="index"
width="50"
label="序号"
align="center"
/>
<el-table-column
prop="areacode"
label="库区编码"
width="250"
align="center"
sortable
/> />
<el-table-column prop="areaname" label="库区名称" width="250" align="center" sortable <el-table-column
prop="areaname"
label="库区名称"
width="250"
align="center"
sortable
/> />
<el-table-column prop="maximum" label="最高库存" width="200" align="center" sortable <el-table-column
prop="maximum"
label="最高库存"
width="200"
align="center"
sortable
/> />
<el-table-column prop="safety" label="安全库存" width="200" align="center" sortable <el-table-column
prop="safety"
label="安全库存"
width="200"
align="center"
sortable
/> />
<el-table-column prop="minimum" label="最低库存" width="200" align="center" sortable <el-table-column
prop="minimum"
label="最低库存"
width="200"
align="center"
sortable
/> />
<el-table-column label="计量单位" width="120" sortable prop="unit" align="center" > <el-table-column
label="计量单位"
width="120"
sortable
prop="unit"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }} {{ scope.row.unit | dynamicText(unitOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="warehouseId" label="仓库" width="200" align="center" sortable <el-table-column
prop="warehouseId"
label="仓库"
width="200"
align="center"
sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="100">
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" <el-button
@click="addOrUpdateHandle(scope.row.id)">编辑 type="text"
v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)"
>编辑
</el-button> </el-button>
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button
type="text"
v-has="'btn_remove'"
class="JNPF-table-delBtn"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -102,182 +195,220 @@
detailVisible: false, detailVisible: false,
query: { query: {
areacode: undefined, areacode: undefined,
areaname: undefined areaname: 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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: 'creatorTime' sidx: "creatorTime",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'areacode', label: '库区编码' }, { prop: "areacode", label: "库区编码" },
{ prop: 'areaname', label: '库区名称' }, { prop: "areaname", label: "库区名称" },
{ prop: 'maximum', label: '最高库存' }, { prop: "maximum", label: "最高库存" },
{ prop: 'safety', label: '安全库存' }, { prop: "safety", label: "安全库存" },
{ prop: 'minimum', label: '最低库存' }, { prop: "minimum", label: "最低库存" },
{ prop: 'unit', label: '计量单位' }, { prop: "unit", label: "计量单位" },
{ prop: 'warehouseId', label: '仓库' } { prop: "warehouseId", label: "仓库" },
], ],
unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }], unitOptions: [
unitProps: { 'label': 'fullName', 'value': 'id' } { fullName: "吨", id: "0" },
} { fullName: "千克", id: "1" },
],
unitProps: { label: "fullName", value: "id" },
};
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-reservoirarea-pageSize") !== null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-reservoirarea-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-reservoirarea-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-reservoirarea-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-reservoirarea-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-reservoirarea-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/example/Reservoirarea/getList`, url: `/api/example/Reservoirarea/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = [] var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, 10) : ''; res.data.list[i].creatorTime = res.data.list[i].creatorTime
let _data = res.data.list[i] ? res.data.list[i].creatorTime.substring(0, 10)
_list.push(_data) : "";
let _data = res.data.list[i];
_list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/example/Reservoirarea/${id}`, url: `/api/example/Reservoirarea/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500 duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/example/Reservoirarea/batchRemove/${ids}`, url: `/api/example/Reservoirarea/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(() => {
}) })
.catch(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId } let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/example/Reservoirarea/Actions/Export`, url: `/api/example/Reservoirarea/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: 'desc', // pageSize: 20,
sidx: 'creatorTime' // sort: "desc",
} // sidx: "creatorTime",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

@ -1,17 +1,24 @@
<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
v-model="query.documentNo"
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.saledocumentNo" placeholder="请输入" clearable></el-input> <el-input
v-model="query.saledocumentNo"
placeholder="请输入"
clearable
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="6">--> <!-- <el-col :span="6">-->
@ -26,16 +33,25 @@
<!-- </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"
value-format="timestamp"
format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -43,43 +59,100 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()" v-has="'btn_add'"> <el-button
type="text"
icon="el-icon-plus"
@click="addOrUpdateHandle()"
v-has="'btn_add'"
>新增
</el-button> </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>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()"v-has="'btn_batchRemove'"> <el-button
type="text"
icon="el-icon-delete"
@click="handleBatchRemoveDel()"
v-has="'btn_batchRemove'"
>批量删除
</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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c <JNPF-table
@selection-change="handleSelectionChange" custom-column border> v-loading="listLoading"
<el-table-column prop="documentNo" label="单据编号" width="200" align="center" sortable :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="单据编号"
width="200"
align="center"
sortable
/> />
<el-table-column prop="saledocumentNo" label="销售订单" width="200" align="center"sortable <el-table-column
prop="saledocumentNo"
label="销售订单"
width="200"
align="center"
sortable
/> />
<!-- <el-table-column prop="jg_salesorder.contractName" label="合同名称" width="120"sortable align="center"--> <!-- <el-table-column prop="jg_salesorder.contractName" label="合同名称" width="120"sortable align="center"-->
<!-- />--> <!-- />-->
<!-- <el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="200" sortable align="center"--> <!-- <el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="200" sortable align="center"-->
<!-- />--> <!-- />-->
<el-table-column prop="refundAmount" label="退款金额" width="120" align="center" sortable <el-table-column
prop="refundAmount"
label="退款金额"
width="120"
align="center"
sortable
/> />
<el-table-column prop="actualAmount" label="实退金额" width="120" align="center" sortable <el-table-column
prop="actualAmount"
label="实退金额"
width="120"
align="center"
sortable
/> />
<el-table-column label="币别" width="120" sortable prop="currency" align="center" > <el-table-column
label="币别"
width="120"
sortable
prop="currency"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }} {{ scope.row.currency | dynamicText(currencyOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="refundNum" label="退货数量" width="120" align="center" sortable <el-table-column
prop="refundNum"
label="退货数量"
width="120"
align="center"
sortable
/> />
<!-- <el-table-column label="单据状态" width="120" sortable prop="status" align="center" >--> <!-- <el-table-column label="单据状态" width="120" sortable prop="status" align="center" >-->
@ -87,50 +160,95 @@
<!-- {{ scope.row.status | dynamicText(statusOptions) }}--> <!-- {{ scope.row.status | dynamicText(statusOptions) }}-->
<!-- </template>--> <!-- </template>-->
<!-- </el-table-column>--> <!-- </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"> <template slot-scope="scope">
<el-tag type="success" v-if="scope.row.status==0"></el-tag> <el-tag type="success" v-if="scope.row.status == 0"
<el-tag type="info" v-else-if="scope.row.status==1">审批中</el-tag> >已保存</el-tag
<el-tag type="warning" v-else-if="scope.row.status==2">已审批</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> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creatorTime" label="创建时间" width="120" align="center" sortable <el-table-column
prop="creatorTime"
label="创建时间"
width="120"
align="center"
sortable
/> />
<el-table-column prop="creatorUserName" label="创建人" width="120" align="center" sortable <el-table-column
prop="creatorUserName"
label="创建人"
width="120"
align="center"
sortable
/> />
<el-table-column prop="remark" label="备注" width="120" align="center" sortable <el-table-column
prop="remark"
label="备注"
width="120"
align="center"
sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="150">
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" <el-button
@click="addOrUpdateHandle(scope.row.id)">编辑 type="text"
v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)"
>编辑
</el-button> </el-button>
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button
type="text"
v-has="'btn_remove'"
class="JNPF-table-delBtn"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
<el-button type="text" v-has="'btn_detail'" <el-button
@click="goDetail(scope.row.id)">详情 type="text"
v-has="'btn_detail'"
@click="goDetail(scope.row.id)"
>详情
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -138,196 +256,238 @@
return { return {
detailVisible: false, detailVisible: false,
query: { query: {
documentNo: undefined documentNo: 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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: '' sidx: "",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'documentNo', label: '单据编号' }, { prop: "documentNo", label: "单据编号" },
{ prop: 'saledocumentNo', label: '销售订单' }, { prop: "saledocumentNo", label: "销售订单" },
// { prop: 'jg_salesorder.contractName', label: '' }, // { prop: 'jg_salesorder.contractName', label: '' },
// { prop: 'jg_salesorder.costomerName', label: '' }, // { prop: 'jg_salesorder.costomerName', label: '' },
{ prop: 'refundAmount', label: '退款金额' }, { prop: "refundAmount", label: "退款金额" },
{ prop: 'actualAmount', label: '实退金额' }, { prop: "actualAmount", label: "实退金额" },
{ prop: 'currency', label: '币别' }, { prop: "currency", label: "币别" },
{ prop: 'refundNum', label: '退货数量' }, { prop: "refundNum", label: "退货数量" },
{ prop: 'status', label: '单据状态 ' }, { prop: "status", label: "单据状态 " },
{ prop: 'creatorTime', label: '创建时间' }, { prop: "creatorTime", label: "创建时间" },
{ prop: 'creatorUserName', label: '创建人' }, { prop: "creatorUserName", label: "创建人" },
{ prop: 'remark', label: '备注' } { prop: "remark", label: "备注" },
], ],
currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, { currencyOptions: [
'fullName': '英镑', { fullName: "人民币", id: "0" },
'id': '2' { fullName: "美元", id: "1" },
}], {
currencyProps: { 'label': 'fullName', 'value': 'id' }, fullName: "英镑",
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, { id: "2",
'fullName': '已审批', },
'id': '2' ],
}], currencyProps: { label: "fullName", value: "id" },
statusProps: { 'label': 'fullName', 'value': 'id' } statusOptions: [
} { fullName: "已保存", id: "0" },
{ fullName: "审批中", id: "1" },
{
fullName: "已审批",
id: "2",
},
],
statusProps: { label: "fullName", value: "id" },
};
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-saleback-pageSize") !== null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-saleback-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-saleback-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-saleback-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-saleback-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-saleback-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/saleback/Saleback/getList`, url: `/api/saleback/Saleback/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = [] var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0, res.data.list[i].creatorTime = res.data.list[i].creatorTime
10) : ''; ? res.data.list[i].creatorTime.substring(0, 10)
let _data = res.data.list[i] : "";
_list.push(_data) let _data = res.data.list[i];
_list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/saleback/Saleback/${id}`, url: `/api/saleback/Saleback/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 1500 duration: 1500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/saleback/Saleback/batchRemove/${ids}`, url: `/api/saleback/Saleback/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(() => {
}) })
.catch(() => {});
}, },
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId } let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/saleback/Saleback/Actions/Export`, url: `/api/saleback/Saleback/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: 'desc', // pageSize: 20,
sidx: '' // sort: 'desc',
} // sidx: ''
this.initData() // }
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
// for (let key in this.query) { // for (let key in this.query) {
// this.query[key] = undefined // this.query[key] = undefined
// } // }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

File diff suppressed because it is too large Load Diff

@ -1,23 +1,34 @@
<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.code" placeholder="请输入" clearable></el-input> <el-input
v-model="query.code"
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.name" placeholder="请输入" clearable></el-input> <el-input
v-model="query.name"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button> >查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -25,81 +36,168 @@
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button
type="primary"
v-has="'btn_add'"
icon="el-icon-plus"
@click="addOrUpdateHandle()"
>新增
</el-button> </el-button>
<el-button type="text" v-has="'btn_download'" icon="el-icon-download" @click="exportData()"> <el-button
type="text"
v-has="'btn_download'"
icon="el-icon-download"
@click="exportData()"
>导出
</el-button> </el-button>
<!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">--> <!-- <el-button type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </el-button>--> <!-- </el-button>-->
<el-button type="text" v-has="'btn_batchRemove'" icon="el-icon-delete" @click="handleBatchRemoveDel()"> <el-button
type="text"
v-has="'btn_batchRemove'"
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"
:underline="false"
@click="reset()"
/>
</el-tooltip> </el-tooltip>
<screenfull isContainer /> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" <JNPF-table
@selection-change="handleSelectionChange" border> v-loading="listLoading"
<el-table-column type="index" width="50" label="序号" align="center" /> :data="list"
<el-table-column prop="code" label="仓库编码" width="200" align="center" sortable @sort-change="sortChange"
has-c
:hasNO="false"
@selection-change="handleSelectionChange"
border
>
<el-table-column type="index" fixed="left" width="1" />
<el-table-column
type="index"
width="50"
label="序号"
align="center"
/>
<el-table-column
prop="code"
label="仓库编码"
width="200"
align="center"
sortable
/> />
<el-table-column prop="name" label="仓库名称" width="200" align="center" sortable <el-table-column
prop="name"
label="仓库名称"
width="200"
align="center"
sortable
/> />
<el-table-column prop="companyCode" label="公司" width="200" align="center" sortable <el-table-column
prop="companyCode"
label="公司"
width="200"
align="center"
sortable
/> />
<el-table-column prop="location" label="仓库位置" width="200" align="center" sortable <el-table-column
prop="location"
label="仓库位置"
width="200"
align="center"
sortable
/> />
<el-table-column label="仓库类型" width="120" sortable prop="type" align="center" > <el-table-column
label="仓库类型"
width="120"
sortable
prop="type"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type | dynamicText(typeOptions) }} {{ scope.row.type | dynamicText(typeOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
<el-table-column prop="sublibrary" label="ERP子库" width="200" align="center" sortable prop="sublibrary"
label="ERP子库"
width="200"
align="center"
sortable
/> />
<el-table-column label="激活状态" width="120" sortable prop="activestate" align="center" > <el-table-column
label="激活状态"
width="120"
sortable
prop="activestate"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.activestate | dynamicText(activestateOptions) }} {{ scope.row.activestate | dynamicText(activestateOptions) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="remark" label="备注" width="0" align="center" sortable <el-table-column
prop="remark"
label="备注"
width="0"
align="center"
sortable
/> />
<el-table-column label="操作" fixed="right" <el-table-column label="操作" fixed="right" width="100">
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-has="'btn_edit'" <el-button
@click="addOrUpdateHandle(scope.row.id)">编辑 type="text"
v-has="'btn_edit'"
@click="addOrUpdateHandle(scope.row.id)"
>编辑
</el-button> </el-button>
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)"> <el-button
type="text"
v-has="'btn_remove'"
class="JNPF-table-delBtn"
@click="handleDel(scope.row.id)"
>删除
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" <pagination
@pagination="initData"/> :total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div> </div>
</div> </div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" /> <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" /> <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> </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 },
@ -108,194 +206,245 @@
detailVisible: false, detailVisible: false,
query: { query: {
code: undefined, code: undefined,
name: undefined name: 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: [],
total: 0,
listQuery: { listQuery: {
currentPage: 1, currentPage: 1,
pageSize: 20, pageSize: 20,
sort: 'desc', sort: "desc",
sidx: 'creatorTime' sidx: "creatorTime",
}, },
formVisible: false, formVisible: false,
exportBoxVisible: false, exportBoxVisible: false,
columnList: [ columnList: [
{ prop: 'code', label: '仓库编码' }, { prop: "code", label: "仓库编码" },
{ prop: 'name', label: '仓库名称' }, { prop: "name", label: "仓库名称" },
{ prop: 'companyCode', label: '公司' }, { prop: "companyCode", label: "公司" },
{ prop: 'location', label: '仓库位置' }, { prop: "location", label: "仓库位置" },
{ prop: 'type', label: '仓库类型' }, { prop: "type", label: "仓库类型" },
{ prop: 'sublibrary', label: 'ERP子库' }, { prop: "sublibrary", label: "ERP子库" },
{ prop: 'activestate', label: '激活状态 ' }, { prop: "activestate", label: "激活状态 " },
{ prop: 'remark', label: '备注' } { prop: "remark", label: "备注" },
], ],
typeOptions: [{ 'fullName': '原料库', 'id': '0' }, { 'fullName': '中间库', 'id': '1' }, { typeOptions: [
'fullName': '成品库', { fullName: "原料库", id: "0" },
'id': '2' { fullName: "中间库", id: "1" },
}, { 'fullName': '副产品库', 'id': '3' }, { 'fullName': '废次品库', 'id': '4' }, { {
'fullName': '备件辅材库', fullName: "成品库",
'id': '5' id: "2",
}, { 'fullName': '贸易虚拟库', 'id': '6' }, { 'fullName': '仓储库', 'id': '7' }, { },
'fullName': '能源库', { fullName: "副产品库", id: "3" },
'id': '8' { fullName: "废次品库", id: "4" },
}, { 'fullName': '其他库', 'id': '9' }, { 'fullName': '帐外库', 'id': '10' }], {
typeProps: { 'label': 'fullName', 'value': 'id' }, fullName: "备件辅材库",
activestateOptions: [{ 'fullName': '激活', 'id': '1' }, { 'fullName': '未激活', 'id': '0' }], id: "5",
activestateProps: { 'label': 'fullName', 'value': 'id' } },
} { fullName: "贸易虚拟库", id: "6" },
{ fullName: "仓储库", id: "7" },
{
fullName: "能源库",
id: "8",
},
{ fullName: "其他库", id: "9" },
{ fullName: "帐外库", id: "10" },
],
typeProps: { label: "fullName", value: "id" },
activestateOptions: [
{ fullName: "激活", id: "1" },
{ fullName: "未激活", id: "0" },
],
activestateProps: { label: "fullName", value: "id" },
};
}, },
computed: { computed: {
menuId() { menuId() {
return this.$route.meta.modelId || '' return this.$route.meta.modelId || "";
} },
}, },
created() { created() {
this.initData() if (
sessionStorage.getItem("scm-basicInformation-warehouse-pageSize") !==
null
) {
this.listQuery.pageSize = parseInt(
sessionStorage.getItem("scm-basicInformation-warehouse-pageSize")
);
}
if (
sessionStorage.getItem("scm-basicInformation-warehouse-query") !== null
) {
let json_query = sessionStorage.getItem(
"scm-basicInformation-warehouse-query"
);
let obj_query = JSON.parse(json_query);
this.query = obj_query;
}
this.initData();
},
beforeDestroy() {
sessionStorage.setItem(
"scm-basicInformation-warehouse-pageSize",
this.listQuery.pageSize
);
let json_query = JSON.stringify(this.query);
sessionStorage.setItem("scm-basicInformation-warehouse-query", json_query);
}, },
methods: { methods: {
goDetail(id) { goDetail(id) {
this.detailVisible = true this.detailVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.Detail.init(id) this.$refs.Detail.init(id);
}) });
}, },
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? '' : prop this.listQuery.sidx = !order ? "" : prop;
this.initData() this.initData();
}, },
initData() { initData() {
this.listLoading = true this.listLoading = true;
let _query = { let _query = {
...this.listQuery, ...this.listQuery,
...this.query, ...this.query,
menuId: this.menuId menuId: this.menuId,
} };
request({ request({
url: `/api/example/WareHouse/getList`, url: `/api/example/WareHouse/getList`,
method: 'post', method: "post",
data: _query data: _query,
}).then(res => { }).then((res) => {
var _list = [] var _list = [];
for (let i = 0; i < res.data.list.length; i++) { for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i] let _data = res.data.list[i];
_list.push(_data) _list.push(_data);
} }
this.list = _list this.list = _list;
this.total = res.data.pagination.total 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/example/WareHouse/${id}`, url: `/api/example/WareHouse/${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) { handleSelectionChange(val) {
const res = val.map(item => item.id) const res = val.map((item) => item.id);
this.multipleSelection = res this.multipleSelection = res;
}, },
handleBatchRemoveDel() { handleBatchRemoveDel() {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
this.$message({ this.$message({
type: 'error', type: "error",
message: '请选择一条数据', message: "请选择一条数据",
duration: 2500 duration: 2500,
}) });
return return;
} }
const ids = this.multipleSelection.join() const ids = this.multipleSelection.join();
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: 'warning' type: "warning",
}).then(() => { })
.then(() => {
request({ request({
url: `/api/example/WareHouse/batchRemove/${ids}`, url: `/api/example/WareHouse/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(() => {
}) })
.catch(() => {});
},
addWarehouse() {
this.formVisible = true;
}, },
addWarehouse(){this.formVisible = true},
addOrUpdateHandle(id, isDetail) { addOrUpdateHandle(id, isDetail) {
this.formVisible = true this.formVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail) this.$refs.JNPFForm.init(id, isDetail);
}) });
}, },
exportData() { exportData() {
this.exportBoxVisible = true this.exportBoxVisible = true;
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList) this.$refs.ExportBox.init(this.columnList);
}) });
}, },
download(data) { download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId } let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({ request({
url: `/api/example/WareHouse/Actions/Export`, url: `/api/example/WareHouse/Actions/Export`,
method: 'GET', method: "GET",
data: query data: query,
}).then(res => { }).then((res) => {
if (!res.data.url) return if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url) this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false this.exportBoxVisible = false;
}) });
}, },
search() { search() {
this.listQuery = { this.listQuery.currentPage = 1;
currentPage: 1, // this.listQuery = {
pageSize: 20, // currentPage: 1,
sort: 'desc', // pageSize: 20,
sidx: 'creatorTime' // sort: "desc",
} // sidx: "creatorTime",
this.initData() // };
this.initData();
}, },
refresh(isrRefresh) { refresh(isrRefresh) {
this.formVisible = false this.formVisible = false;
if (isrRefresh) this.reset() if (isrRefresh) this.reset();
}, },
reset() { reset() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
} }
this.search() this.search();
}, },
resetAll() { resetAll() {
for (let key in this.query) { for (let key in this.query) {
this.query[key] = undefined this.query[key] = undefined;
}
this.search()
}
}
} }
this.search();
},
},
};
</script> </script>

Loading…
Cancel
Save