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

product
mhsnet 2 years ago
parent 505d144e62
commit 2d26a75dcd

@ -1,18 +1,25 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -20,80 +27,159 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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 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 type="text" icon="el-icon-download" v-has="'btn_upload'" @click="">-->
<!-- </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 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>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<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"/>
<JNPF-table
v-loading="listLoading"
:data="list"
@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="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">
<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 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>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import {
getDictionaryDataSelector
} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: {
JNPFForm,
ExportBox,
Detail
Detail,
},
data() {
return {
detailVisible: false,
query: {
mName: undefined
mName: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
@ -102,192 +188,219 @@
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
sort: "desc",
sidx: "",
},
formVisible: false,
exportBoxVisible: false,
columnList: [{
prop: 'mName',
label: '区域名称'
columnList: [
{
prop: "mName",
label: "区域名称",
},
{
prop: 'creatortime',
label: '创建时间'
prop: "creatortime",
label: "创建时间",
},
{
prop: 'creatorusername',
label: '创建人名称'
prop: "creatorusername",
label: "创建人名称",
},
{
prop: 'lastmodifytime',
label: '修改时间'
prop: "lastmodifytime",
label: "修改时间",
},
{
prop: 'lastmodifyusername',
label: '修改人名称'
}
]
}
prop: "lastmodifyusername",
label: "修改人名称",
},
],
};
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
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: {
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({
column,
prop,
order
}) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
sortChange({ column, prop, order }) {
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
menuId: this.menuId,
};
request({
url: `/api/areasetting/Areasetting/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
method: "post",
data: _query,
}).then((res) => {
var _list = [];
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].lastmodifytime = res.data.list[i].lastmodifytime ? res.data.list[i].lastmodifytime.substring(0,
10) : '';
res.data.list[i].creatorTime = res.data.list[i].creatorTime
? 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)
: "";
let _data = res.data.list[i]
_list.push(_data)
let _data = res.data.list[i];
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/areasetting/Areasetting/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
const res = val.map((item) => item.id);
this.multipleSelection = res;
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 2500
})
return
type: "error",
message: "请选择一条数据",
duration: 2500,
});
return;
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
const ids = this.multipleSelection.join();
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/areasetting/Areasetting/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId
}
menuId: this.menuId,
};
request({
url: `/api/areasetting/Areasetting/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: ''
}
this.initData()
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: 'desc',
// sidx: ''
// }
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

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

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

@ -1,23 +1,34 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -30,52 +41,82 @@
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'>
<el-table-column prop="inventoryOrgCode" label="编码" width="0" align="left"
<JNPF-table
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"
width="100">
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<!-- <el-button type="text" v-has="'btn_edit'"-->
<!-- @click="addOrUpdateHandle(scope.row.id)">编辑-->
<!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>-->
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)"
>详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: { JNPFForm, ExportBox, Detail },
@ -87,9 +128,9 @@
inventoryOrgName: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
@ -103,127 +144,159 @@
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'inventoryOrgCode', label: '编码'},
{prop: 'inventoryOrgName', label: '名称'},
{prop: 'creatorTime', label: '创建时间'},
{prop: 'companyId', label: '所属组织'},
{ prop: "inventoryOrgCode", label: "编码" },
{ prop: "inventoryOrgName", label: "名称" },
{ prop: "creatorTime", label: "创建时间" },
{ prop: "companyId", label: "所属组织" },
],
companyIdOptions: [],
companyIdProps: {"label": "F_FullName", "value": "F_Id"},
}
companyIdProps: { label: "F_FullName", value: "F_Id" },
};
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
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: {
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
menuId: this.menuId,
};
request({
url: `/api/example/InventoryOrg/getList`,
method: 'post',
data: _query
}).then(res => {
method: "post",
data: _query,
}).then((res) => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/InventoryOrg/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
this.initData();
},
});
})
}).catch(() => {
});
})
.catch(() => {});
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({
url: `/api/example/InventoryOrg/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
}
this.initData()
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: "desc",
// sidx: "creatorTime",
// }
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

@ -1,23 +1,34 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -27,57 +38,92 @@
<div>
<!-- <el-button type="primary" v-has="'btn_add'" icon="el-icon-plus" @click="addOrUpdateHandle()">-->
<!-- </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>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'>
<el-table-column prop="inventoryOrgDetailCode" label="编码" width="0" align="left"
<JNPF-table
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"
width="100">
<el-table-column label="操作" fixed="right" width="100">
<template slot-scope="scope">
<!-- <el-button type="text" v-has="'btn_edit'"-->
<!-- @click="addOrUpdateHandle(scope.row.id)">编辑-->
<!-- </el-button>-->
<!-- <el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">-->
<!-- </el-button>-->
<el-button type="text"
@click="goDetail(scope.row.id)">详情
<el-button type="text" @click="goDetail(scope.row.id)"
>详情
</el-button>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: { JNPFForm, ExportBox, Detail },
@ -89,9 +135,9 @@
inventoryOrgDetailName: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
@ -105,125 +151,157 @@
formVisible: false,
exportBoxVisible: false,
columnList: [
{prop: 'inventoryOrgDetailCode', label: '编码'},
{prop: 'inventoryOrgDetailName', label: '名称'},
{prop: 'inventoryId', label: '库存组织'},
{prop: 'creatorTime', label: '创建时间'},
{ prop: "inventoryOrgDetailCode", label: "编码" },
{ prop: "inventoryOrgDetailName", label: "名称" },
{ prop: "inventoryId", label: "库存组织" },
{ prop: "creatorTime", label: "创建时间" },
],
}
};
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
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: {
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
menuId: this.menuId,
};
request({
url: `/api/example/InventoryOrgDetail/getList`,
method: 'post',
data: _query
}).then(res => {
method: "post",
data: _query,
}).then((res) => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/InventoryOrgDetail/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
this.initData();
},
});
})
}).catch(() => {
});
})
.catch(() => {});
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query, menuId: this.menuId}
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({
url: `/api/example/InventoryOrgDetail/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "creatorTime",
}
this.initData()
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: "desc",
// sidx: "creatorTime",
// };
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

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

@ -1,28 +1,42 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item label="区域">
<el-select v-model="query.monitoringId" placeholder="请选择区域"
clearable>
<el-option v-for="(item, index) in monitoringIdOptions" :key="index"
:label="item.m_name" :value="item.id"
:disabled="item.disabled"></el-option>
<el-select
v-model="query.monitoringId"
placeholder="请选择区域"
clearable
>
<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-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -30,78 +44,161 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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 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 type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </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 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>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="mName" label="设备名称" width="300" align="center" sortable
<JNPF-table
v-loading="listLoading"
:data="list"
@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">
{{ scope.row.mStatus | dynamicText(mStatusOptions) }}
</template>
</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">
{{ scope.row.isEnable | dynamicText(isEnableOptions) }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right"
width="100">
<el-table-column label="操作" fixed="right" width="100">
<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 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>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: { JNPFForm, ExportBox, Detail },
@ -110,192 +207,236 @@
detailVisible: false,
query: {
mName: undefined,
monitoringId: undefined
monitoringId: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
sort: "desc",
sidx: "creatorTime",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{ prop: 'mName', label: '设备名称' },
{ prop: 'serialnumber', label: '设备序列号' },
{ prop: 'monitoringId', label: '区域' },
{ prop: 'mStatus', label: '设备状态:' },
{ prop: 'channelNumber', label: '设备通道号' },
{ prop: 'isEnable', label: '是否显示' }
{ prop: "mName", label: "设备名称" },
{ prop: "serialnumber", label: "设备序列号" },
{ prop: "monitoringId", label: "区域" },
{ prop: "mStatus", label: "设备状态:" },
{ prop: "channelNumber", label: "设备通道号" },
{ prop: "isEnable", label: "是否显示" },
],
monitoringIdOptions: [],
monitoringIdProps: { 'label': 'm_name', 'value': 'id' },
mStatusOptions: [{ 'fullName': '在线', 'id': '1' }, { 'fullName': '不在线', 'id': '0' }],
mStatusProps: { 'label': 'fullName', 'value': 'id' },
isEnableOptions: [{ 'fullName': '显示', 'id': '1' }, { 'fullName': '不显示', 'id': '0' }],
isEnableProps: { 'label': 'fullName', 'value': 'id' }
}
monitoringIdProps: { label: "m_name", value: "id" },
mStatusOptions: [
{ fullName: "在线", id: "1" },
{ fullName: "不在线", id: "0" },
],
mStatusProps: { label: "fullName", value: "id" },
isEnableOptions: [
{ fullName: "显示", id: "1" },
{ fullName: "不显示", id: "0" },
],
isEnableProps: { label: "fullName", value: "id" },
};
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
created() {
this.initData()
this.getmonitoringIdOptions()
if (
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: {
getmonitoringIdOptions() {
getDataInterfaceRes('370933183241262469').then(res => {
let data = res.data.data
this.monitoringIdOptions = data
})
getDataInterfaceRes("370933183241262469").then((res) => {
let data = res.data.data;
this.monitoringIdOptions = data;
});
},
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
menuId: this.menuId,
};
request({
url: `/api/example/Monitoringitem/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
method: "post",
data: _query,
}).then((res) => {
var _list = [];
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) : '';
let _data = res.data.list[i]
_list.push(_data)
res.data.list[i].creatorTime = res.data.list[i].creatorTime
? res.data.list[i].creatorTime.substring(0, 10)
: "";
let _data = res.data.list[i];
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/Monitoringitem/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
const res = val.map((item) => item.id);
this.multipleSelection = res;
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 2500
})
return
type: "error",
message: "请选择一条数据",
duration: 2500,
});
return;
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
const ids = this.multipleSelection.join();
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/Monitoringitem/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({
url: `/api/example/Monitoringitem/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
}
this.initData()
sort: "desc",
sidx: "creatorTime",
};
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

File diff suppressed because it is too large Load Diff

@ -95,6 +95,7 @@
custom-column
border
>
<el-table-column type="index" fixed="left" width="1" />
<el-table-column
prop="documentNo"
label="单据编号"
@ -549,8 +550,37 @@ export default {
},
},
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();
},
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: {
stopPayment() {
if (!this.multipleSelectionItem.length) {
@ -779,12 +809,13 @@ export default {
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: "desc",
sidx: "",
};
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: "desc",
// sidx: "",
// };
this.initData();
},
colseFlow(isrRefresh) {

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

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

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

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

@ -1,23 +1,34 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -25,75 +36,157 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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 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 type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </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>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="areacode" label="库区编码" width="250" align="center" sortable
<JNPF-table
v-loading="listLoading"
:data="list"
@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">
{{ scope.row.unit | dynamicText(unitOptions) }}
</template>
</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"
width="100">
<el-table-column label="操作" fixed="right" width="100">
<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 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>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: { JNPFForm, ExportBox, Detail },
@ -102,182 +195,220 @@
detailVisible: false,
query: {
areacode: undefined,
areaname: undefined
areaname: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
sort: "desc",
sidx: "creatorTime",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{ prop: 'areacode', label: '库区编码' },
{ prop: 'areaname', label: '库区名称' },
{ prop: 'maximum', label: '最高库存' },
{ prop: 'safety', label: '安全库存' },
{ prop: 'minimum', label: '最低库存' },
{ prop: 'unit', label: '计量单位' },
{ prop: 'warehouseId', label: '仓库' }
{ prop: "areacode", label: "库区编码" },
{ prop: "areaname", label: "库区名称" },
{ prop: "maximum", label: "最高库存" },
{ prop: "safety", label: "安全库存" },
{ prop: "minimum", label: "最低库存" },
{ prop: "unit", label: "计量单位" },
{ prop: "warehouseId", label: "仓库" },
],
unitOptions: [{ 'fullName': '吨', 'id': '0' }, { 'fullName': '千克', 'id': '1' }],
unitProps: { 'label': 'fullName', 'value': 'id' }
}
unitOptions: [
{ fullName: "吨", id: "0" },
{ fullName: "千克", id: "1" },
],
unitProps: { label: "fullName", value: "id" },
};
},
computed: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
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: {
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
menuId: this.menuId,
};
request({
url: `/api/example/Reservoirarea/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
method: "post",
data: _query,
}).then((res) => {
var _list = [];
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) : '';
let _data = res.data.list[i]
_list.push(_data)
res.data.list[i].creatorTime = res.data.list[i].creatorTime
? res.data.list[i].creatorTime.substring(0, 10)
: "";
let _data = res.data.list[i];
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/Reservoirarea/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
const res = val.map((item) => item.id);
this.multipleSelection = res;
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 2500
})
return
type: "error",
message: "请选择一条数据",
duration: 2500,
});
return;
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
const ids = this.multipleSelection.join();
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/Reservoirarea/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({
url: `/api/example/Reservoirarea/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
}
this.initData()
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: "desc",
// sidx: "creatorTime",
// };
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
// for (let key in this.query) {
// this.query[key] = undefined
// }
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

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

File diff suppressed because it is too large Load Diff

@ -1,23 +1,34 @@
<template>
<div class="JNPF-common-layout">
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
<el-col :span="6">
<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-col>
<el-col :span="6">
<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-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="resetAll()"></el-button>
<el-button type="primary" icon="el-icon-search" @click="search()"
>查询</el-button
>
<el-button icon="el-icon-refresh-right" @click="resetAll()"
>重置</el-button
>
</el-form-item>
</el-col>
</el-form>
@ -25,81 +36,168 @@
<div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head">
<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 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 type="text" v-has="'btn_upload'" icon="el-icon-download" @click="">-->
<!-- </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>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
<el-link
icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
:underline="false"
@click="reset()"
/>
</el-tooltip>
<screenfull isContainer />
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="code" label="仓库编码" width="200" align="center" sortable
<JNPF-table
v-loading="listLoading"
:data="list"
@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">
{{ scope.row.type | dynamicText(typeOptions) }}
</template>
</el-table-column>
<el-table-column prop="sublibrary" label="ERP子库" width="200" align="center" sortable
<el-table-column
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">
{{ scope.row.activestate | dynamicText(activestateOptions) }}
</template>
</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"
width="100">
<el-table-column label="操作" fixed="right" width="100">
<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 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>
</template>
</el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData"/>
<pagination
:total="total"
:page.sync="listQuery.currentPage"
:limit.sync="listQuery.pageSize"
@pagination="initData"
/>
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
<Detail
v-if="detailVisible"
ref="Detail"
@refresh="detailVisible = false"
/>
</div>
</template>
<script>
import request from '@/utils/request'
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
import JNPFForm from './Form'
import ExportBox from './ExportBox'
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
import Detail from './Detail'
import request from "@/utils/request";
import { getDictionaryDataSelector } from "@/api/systemData/dictionary";
import JNPFForm from "./Form";
import ExportBox from "./ExportBox";
import { getDataInterfaceRes } from "@/api/systemData/dataInterface";
import Detail from "./Detail";
export default {
components: { JNPFForm, ExportBox, Detail },
@ -108,194 +206,245 @@
detailVisible: false,
query: {
code: undefined,
name: undefined
name: undefined,
},
treeProps: {
children: 'children',
label: 'fullName',
value: 'id'
children: "children",
label: "fullName",
value: "id",
},
list: [],
listLoading: true,
multipleSelection: [], total: 0,
multipleSelection: [],
total: 0,
listQuery: {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
sort: "desc",
sidx: "creatorTime",
},
formVisible: false,
exportBoxVisible: false,
columnList: [
{ prop: 'code', label: '仓库编码' },
{ prop: 'name', label: '仓库名称' },
{ prop: 'companyCode', label: '公司' },
{ prop: 'location', label: '仓库位置' },
{ prop: 'type', label: '仓库类型' },
{ prop: 'sublibrary', label: 'ERP子库' },
{ prop: 'activestate', label: '激活状态 ' },
{ prop: 'remark', label: '备注' }
{ prop: "code", label: "仓库编码" },
{ prop: "name", label: "仓库名称" },
{ prop: "companyCode", label: "公司" },
{ prop: "location", label: "仓库位置" },
{ prop: "type", label: "仓库类型" },
{ prop: "sublibrary", label: "ERP子库" },
{ prop: "activestate", label: "激活状态 " },
{ prop: "remark", label: "备注" },
],
typeOptions: [{ 'fullName': '原料库', 'id': '0' }, { 'fullName': '中间库', 'id': '1' }, {
'fullName': '成品库',
'id': '2'
}, { 'fullName': '副产品库', 'id': '3' }, { 'fullName': '废次品库', 'id': '4' }, {
'fullName': '备件辅材库',
'id': '5'
}, { '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' }
}
typeOptions: [
{ fullName: "原料库", id: "0" },
{ fullName: "中间库", id: "1" },
{
fullName: "成品库",
id: "2",
},
{ fullName: "副产品库", id: "3" },
{ fullName: "废次品库", id: "4" },
{
fullName: "备件辅材库",
id: "5",
},
{ 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: {
menuId() {
return this.$route.meta.modelId || ''
}
return this.$route.meta.modelId || "";
},
},
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: {
goDetail(id) {
this.detailVisible = true
this.detailVisible = true;
this.$nextTick(() => {
this.$refs.Detail.init(id)
})
this.$refs.Detail.init(id);
});
},
sortChange({ column, prop, order }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
this.listQuery.sort = order == "ascending" ? "asc" : "desc";
this.listQuery.sidx = !order ? "" : prop;
this.initData();
},
initData() {
this.listLoading = true
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
}
menuId: this.menuId,
};
request({
url: `/api/example/WareHouse/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = []
method: "post",
data: _query,
}).then((res) => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i]
_list.push(_data)
let _data = res.data.list[i];
_list.push(_data);
}
this.list = _list
this.total = res.data.pagination.total
this.list = _list;
this.total = res.data.pagination.total;
this.listLoading = false
})
this.listLoading = false;
});
},
handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/WareHouse/${id}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
handleSelectionChange(val) {
const res = val.map(item => item.id)
this.multipleSelection = res
const res = val.map((item) => item.id);
this.multipleSelection = res;
},
handleBatchRemoveDel() {
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 2500
})
return
type: "error",
message: "请选择一条数据",
duration: 2500,
});
return;
}
const ids = this.multipleSelection.join()
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
type: 'warning'
}).then(() => {
const ids = this.multipleSelection.join();
this.$confirm("您确定要删除这些数据吗, 是否继续?", "提示", {
type: "warning",
})
.then(() => {
request({
url: `/api/example/WareHouse/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
method: "DELETE",
}).then((res) => {
this.$message({
type: 'success',
type: "success",
message: res.msg,
onClose: () => {
this.initData()
}
})
})
}).catch(() => {
this.initData();
},
});
});
})
.catch(() => {});
},
addWarehouse() {
this.formVisible = true;
},
addWarehouse(){this.formVisible = true},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.formVisible = true;
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
this.$refs.JNPFForm.init(id, isDetail);
});
},
exportData() {
this.exportBoxVisible = true
this.exportBoxVisible = true;
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
this.$refs.ExportBox.init(this.columnList);
});
},
download(data) {
let query = { ...data, ...this.listQuery, ...this.query, menuId: this.menuId }
let query = {
...data,
...this.listQuery,
...this.query,
menuId: this.menuId,
};
request({
url: `/api/example/WareHouse/Actions/Export`,
method: 'GET',
data: query
}).then(res => {
if (!res.data.url) return
this.jnpf.downloadFile(res.data.url)
this.$refs.ExportBox.visible = false
this.exportBoxVisible = false
})
method: "GET",
data: query,
}).then((res) => {
if (!res.data.url) return;
this.jnpf.downloadFile(res.data.url);
this.$refs.ExportBox.visible = false;
this.exportBoxVisible = false;
});
},
search() {
this.listQuery = {
currentPage: 1,
pageSize: 20,
sort: 'desc',
sidx: 'creatorTime'
}
this.initData()
this.listQuery.currentPage = 1;
// this.listQuery = {
// currentPage: 1,
// pageSize: 20,
// sort: "desc",
// sidx: "creatorTime",
// };
this.initData();
},
refresh(isrRefresh) {
this.formVisible = false
if (isrRefresh) this.reset()
this.formVisible = false;
if (isrRefresh) this.reset();
},
reset() {
for (let key in this.query) {
this.query[key] = undefined
this.query[key] = undefined;
}
this.search()
this.search();
},
resetAll() {
for (let key in this.query) {
this.query[key] = undefined
}
this.search()
}
}
this.query[key] = undefined;
}
this.search();
},
},
};
</script>

Loading…
Cancel
Save