md
This commit is contained in:
parent
f9aa9c8db0
commit
f6b164332d
44
src/api/emis/emisSiteBillControl.js
Normal file
44
src/api/emis/emisSiteBillControl.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询对账单锁账列表
|
||||||
|
export function listEmisSiteBillControl(query) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisSiteBillControl/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询对账单锁账详细
|
||||||
|
export function getEmisSiteBillControl(id) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisSiteBillControl/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增对账单锁账
|
||||||
|
export function addEmisSiteBillControl(data) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisSiteBillControl',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改对账单锁账
|
||||||
|
export function updateEmisSiteBillControl(data) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisSiteBillControl',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除对账单锁账
|
||||||
|
export function delEmisSiteBillControl(id) {
|
||||||
|
return request({
|
||||||
|
url: '/emis/emisSiteBillControl/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
93
src/components/QrCodeImage/index.vue
Normal file
93
src/components/QrCodeImage/index.vue
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div :id="id" :ref="id" />
|
||||||
|
|
||||||
|
<!-- style="width: 100%;height: 100%;" -->
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import QRCode from 'qrcodejs2'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
text: { // 后端返回的二维码地址
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: '128'
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: String,
|
||||||
|
default: '128'
|
||||||
|
},
|
||||||
|
colorDark: {
|
||||||
|
type: String,
|
||||||
|
default: '#000000'
|
||||||
|
},
|
||||||
|
colorLight: {
|
||||||
|
type: String,
|
||||||
|
default: '#ffffff'
|
||||||
|
},
|
||||||
|
logoImage: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
qrcode: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
text (newText) {
|
||||||
|
this.createQrcode()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.createQrcode()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
createQrcode () {
|
||||||
|
if (this.qrcode) { // 有新的二维码地址了,先把之前的清除掉
|
||||||
|
this.$refs[this.id].innerHTML = ''
|
||||||
|
}
|
||||||
|
this.qrcode = new QRCode(this.$refs[this.id], {
|
||||||
|
text: this.text, // 页面地址 ,如果页面需要参数传递请注意哈希模式#
|
||||||
|
width: this.width, // 二维码宽度 (不支持100%)
|
||||||
|
height: this.height, // 二维码高度 (不支持100%)
|
||||||
|
colorDark: this.colorDark,
|
||||||
|
colorLight: this.colorLight,
|
||||||
|
correctLevel: QRCode.CorrectLevel.H
|
||||||
|
})
|
||||||
|
// 添加二维码中间的图片
|
||||||
|
if (this.logoImage) {
|
||||||
|
let logo = new Image()
|
||||||
|
logo.setAttribute('crossOrigin', 'Anonymous')
|
||||||
|
logo.src = this.logoImage
|
||||||
|
logo.onload = () => {
|
||||||
|
let qrImg = this.qrcode._el.getElementsByTagName('img')[0]
|
||||||
|
let canvas = this.qrcode._el.getElementsByTagName('canvas')[0]
|
||||||
|
this.qrcode._el.title = ''
|
||||||
|
canvas.style.display = 'inline-block'
|
||||||
|
let ctx = canvas.getContext('2d')
|
||||||
|
// 设置logo的大小为二维码图片缩小的3.7倍,第二与第三参数代表logo在二维码的位置
|
||||||
|
ctx.drawImage(logo, (128 - 128 / 3.7) / 2, (128 - 128 / 3.7) / 2, 128 / 3.7, 128 / 3.7)
|
||||||
|
qrImg.src = canvas.toDataURL()
|
||||||
|
qrImg.style.display = 'none'
|
||||||
|
this.$refs.id.appendChild(this.qrcode._el)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(this.qrcode, 'qrcode')
|
||||||
|
},
|
||||||
|
// 制作另一个二维码
|
||||||
|
updateCode () {
|
||||||
|
// this.qrcode.makeCode('')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
182
src/views/emis/emisSiteBillControl/emisSiteBillControlForm.vue
Normal file
182
src/views/emis/emisSiteBillControl/emisSiteBillControlForm.vue
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
<template>
|
||||||
|
<div >
|
||||||
|
<el-form ref="form" :model="form" size="mini" :rules="rules" label-width="100px">
|
||||||
|
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||||
|
<el-col :span="12" v-if="!isBatchUpdateLockTime">
|
||||||
|
<el-form-item label="财务中心" prop="sendSiteCode">
|
||||||
|
<EmisSiteSimplePicker1 :placeholder="$t('财务中心')" v-model="form.sendSiteCode" :siteType="2" :isInitiated="true" ></EmisSiteSimplePicker1>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="!isBatchUpdateLockTime">
|
||||||
|
<el-form-item label="目的财务中心" prop="destSiteCode" label-width="120px">
|
||||||
|
<EmisSiteSimplePicker2 :placeholder="$t('目的财务中心')" v-model="form.destSiteCode" :siteType="2" :isInitiated="true" ></EmisSiteSimplePicker2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="锁账时间" prop="controlDate">
|
||||||
|
<el-date-picker
|
||||||
|
style="width: 100%;"
|
||||||
|
clearable
|
||||||
|
v-model="form.controlDate"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="请选择锁账时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12" v-if="!isBatchUpdateLockTime">
|
||||||
|
<el-form-item label="启用状态" prop="blOpen">
|
||||||
|
<el-radio-group v-model="form.blOpen">
|
||||||
|
<el-radio label="1">是</el-radio>
|
||||||
|
<el-radio label="0">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" v-if="!isBatchUpdateLockTime">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<div style="text-align: center;margin-bottom: 10px;">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisSiteBillControl, getEmisSiteBillControl, delEmisSiteBillControl, addEmisSiteBillControl, updateEmisSiteBillControl } from "@/api/emis/emisSiteBillControl";
|
||||||
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "EmisSiteBillControlForm",
|
||||||
|
props:{
|
||||||
|
id:{
|
||||||
|
type:[Number,Array]
|
||||||
|
},
|
||||||
|
isBatchUpdateLockTime:{
|
||||||
|
type:Boolean
|
||||||
|
}
|
||||||
|
},
|
||||||
|
components: { EmisSiteSimplePicker1,EmisSiteSimplePicker2 },
|
||||||
|
dicts: [
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
emisSiteBillControlOptions: [],
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
sendSiteCode: [
|
||||||
|
{ required: true, message: "财务中心不能为空", trigger: ["blur","change"] }
|
||||||
|
],
|
||||||
|
destSiteCode: [
|
||||||
|
{ required: true, message: "目的财务中心不能为空", trigger: ["blur","change"] }
|
||||||
|
],
|
||||||
|
controlDate: [
|
||||||
|
{ required: true, message: "锁账时间不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
blOpen: [
|
||||||
|
{ required: true, message: "启用状态不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
"id": {
|
||||||
|
handler (newValue, oldValue) {
|
||||||
|
// this.id = newValue;
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.initData();
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
initData() {
|
||||||
|
if(this.id !=null && !this.isBatchUpdateLockTime) {
|
||||||
|
this.loading = true;
|
||||||
|
getEmisSiteBillControl(this.id).then(response => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
this.reset();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.reset();
|
||||||
|
this.$emit("on-cancel");
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
sendSiteCode: null,
|
||||||
|
destSiteCode: null,
|
||||||
|
controlDate: null,
|
||||||
|
blOpen: null,
|
||||||
|
remark: null,
|
||||||
|
delFlag: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
createSite: null,
|
||||||
|
updateSite: null
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(async valid => {
|
||||||
|
if (valid) {
|
||||||
|
|
||||||
|
// 批量
|
||||||
|
if(this.isBatchUpdateLockTime){
|
||||||
|
if(this.id&&this.id.length>0){
|
||||||
|
for(let i=0;i<this.id.length;i++){
|
||||||
|
let postData={
|
||||||
|
id:this.id[i],
|
||||||
|
controlDate:this.form.controlDate,
|
||||||
|
}
|
||||||
|
let res=await updateEmisSiteBillControl(postData);
|
||||||
|
}
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("请选择需要更新的数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateEmisSiteBillControl(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addEmisSiteBillControl(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功");
|
||||||
|
this.$emit("on-changed");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
394
src/views/emis/emisSiteBillControl/index.vue
Normal file
394
src/views/emis/emisSiteBillControl/index.vue
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
<template>
|
||||||
|
<XdPageContainer class="app-container">
|
||||||
|
<SearchForm slot="pageHeader" :model="queryParams" ref="queryForm" size="mini" :maxShow="5" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||||
|
<!-- label-width="100px" -->
|
||||||
|
<el-form-item label="财务中心" prop="sendSiteCode">
|
||||||
|
<EmisSiteSimplePicker1 :placeholder="$t('财务中心')" v-model="queryParams.sendSiteCode" :siteType="2" :isInitiated="true" ></EmisSiteSimplePicker1>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="目的财务中心" prop="destSiteCode">
|
||||||
|
<EmisSiteSimplePicker2 :placeholder="$t('目的财务中心')" v-model="queryParams.destSiteCode" :siteType="2" :isInitiated="true" ></EmisSiteSimplePicker2>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('启用状态')" prop="blOpen">
|
||||||
|
<el-select v-model="queryParams.blOpen" clearable filterable placeholder="启用状态" >
|
||||||
|
<el-option :key="1" label="启用" :value="1" ></el-option>
|
||||||
|
<el-option :key="0" label="停用" :value="0" ></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</SearchForm>
|
||||||
|
|
||||||
|
|
||||||
|
<XdTable
|
||||||
|
slot="pageContent"
|
||||||
|
slot-scope="slotProps"
|
||||||
|
:height="(slotProps.contentHeight)+'px'"
|
||||||
|
|
||||||
|
v-loading="loading"
|
||||||
|
border stripe
|
||||||
|
size="mini"
|
||||||
|
:data="emisSiteBillControlList"
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
:queryParams="queryParams"
|
||||||
|
:total="total"
|
||||||
|
@queryTable="getList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@sort-change="handleSortChange"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div slot="toolbar">
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['emis:emisSiteBillControl:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['emis:emisSiteBillControl:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleUpdateBatch"
|
||||||
|
v-hasPermi="['emis:emisSiteBillControl:edit']"
|
||||||
|
>批量修改锁账时间</el-button>
|
||||||
|
</el-col>
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['emis:emisSiteBillControl:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<!-- <el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['emis:emisSiteBillControl:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<!--
|
||||||
|
<el-table-column label="序号" align="center" min-width="60">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-text="getIndex(scope.$index)"> </span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="xxx" align="left" prop="xxx" min-width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="link-type" @click="handleView(scope.row)">{{scope.row.orderSn}}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="结算状态" align="center" prop="settleStatus" :sort-orders="['descending','ascending']" sortable="custom" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-if="scope.row.settleStatus == 0" style="color:red;">
|
||||||
|
<span class="el-tag el-tag--info">未结算</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="scope.row.settleStatus == 10" style="color:red;">
|
||||||
|
<span class="el-tag">待确认</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="scope.row.settleStatus == 11" style="color:green;">
|
||||||
|
<span class="el-tag el-tag--success el-tag--light">已确认</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="scope.row.settleStatus == 20" >
|
||||||
|
<span class="el-tag el-tag--warning el-tag--light">待打款</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="scope.row.settleStatus == 21" style="color:green;">
|
||||||
|
<span class="el-tag el-tag--success el-tag--light">已打款</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="scope.row.settleStatus == 40" style="color:red;">
|
||||||
|
<span class="el-tag el-tag--danger">已拒绝</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<el-table-column :label="$t('财务中心')" align="center" prop="sendSiteName" min-width="100" />
|
||||||
|
<el-table-column :label="$t('目的财务中心')" align="center" prop="destSiteName" min-width="170" />
|
||||||
|
<el-table-column :label="$t('锁账时间')" align="center" prop="controlDate" min-width="170" />
|
||||||
|
<el-table-column label="是否启用" align="center" prop="blOpen" min-width="100" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tag v-if="scope.row.blOpen==1" type="success">启用</el-tag>
|
||||||
|
<el-tag v-if="scope.row.blOpen==0" type="danger">停用</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('创建站点')" align="center" prop="createSiteName" min-width="100" />
|
||||||
|
<el-table-column :label="$t('创建人')" align="center" prop="createByName" min-width="100" />
|
||||||
|
<el-table-column :label="$t('创建时间')" align="center" prop="createTime" min-width="170" />
|
||||||
|
<el-table-column :label="$t('修改人')" align="center" prop="updateByName" min-width="100" />
|
||||||
|
<el-table-column :label="$t('修改站点')" align="center" prop="updateSiteName" min-width="100" />
|
||||||
|
<el-table-column :label="$t('修改时间')" align="center" prop="updateTime" min-width="170" />
|
||||||
|
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" :show-overflow-tooltip="true" />
|
||||||
|
|
||||||
|
</XdTable>
|
||||||
|
|
||||||
|
<el-dialog :title="titleForm" :visible.sync="openForm" width="60%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||||
|
<emisSiteBillControlForm :id="currentId" :isBatchUpdateLockTime="isBatchUpdateLockTime" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisSiteBillControlForm>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</XdPageContainer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listEmisSiteBillControl, getEmisSiteBillControl, delEmisSiteBillControl, addEmisSiteBillControl, updateEmisSiteBillControl } from "@/api/emis/emisSiteBillControl";
|
||||||
|
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||||
|
// import emisSiteBillControlView from '@/views/emis/emisSiteBillControl/emisSiteBillControlView';
|
||||||
|
import emisSiteBillControlForm from '@/views/emis/emisSiteBillControl/emisSiteBillControlForm';
|
||||||
|
import EmisSiteSimplePicker1 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
import EmisSiteSimplePicker2 from '@/views/emis/EmisBaseTools/EmisSiteSimplePicker.vue';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "emisSiteBillControl",
|
||||||
|
components: {
|
||||||
|
elDateSimplePicker,
|
||||||
|
emisSiteBillControlForm,
|
||||||
|
EmisSiteSimplePicker1,
|
||||||
|
EmisSiteSimplePicker2
|
||||||
|
},
|
||||||
|
dicts: [
|
||||||
|
],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 创建时间搜索
|
||||||
|
dateTimeRange:[],
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 对账单锁账表格数据
|
||||||
|
emisSiteBillControlList: [],
|
||||||
|
|
||||||
|
currentId:null,
|
||||||
|
openForm: false,
|
||||||
|
titleForm: "",
|
||||||
|
|
||||||
|
isBatchUpdateLockTime:false,
|
||||||
|
|
||||||
|
// 弹出展示层
|
||||||
|
id:null,
|
||||||
|
titleView:"",
|
||||||
|
openView: false,
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeControlDate: [],
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeCreateTime: [],
|
||||||
|
// 更新站点时间范围
|
||||||
|
daterangeUpdateTime: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
sendSiteCode: null,
|
||||||
|
destSiteCode: null,
|
||||||
|
blOpen: null,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
/** 查询对账单锁账列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
this.queryParams.params = {};
|
||||||
|
if (null != this.daterangeControlDate && '' != this.daterangeControlDate) {
|
||||||
|
this.queryParams.params["beginControlDate"] = this.daterangeControlDate[0];
|
||||||
|
this.queryParams.params["endControlDate"] = this.daterangeControlDate[1];
|
||||||
|
}
|
||||||
|
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
|
||||||
|
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
|
||||||
|
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
|
||||||
|
}
|
||||||
|
if (null != this.daterangeUpdateTime && '' != this.daterangeUpdateTime) {
|
||||||
|
this.queryParams.params["beginUpdateTime"] = this.daterangeUpdateTime[0];
|
||||||
|
this.queryParams.params["endUpdateTime"] = this.daterangeUpdateTime[1];
|
||||||
|
}
|
||||||
|
listEmisSiteBillControl(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||||
|
this.emisSiteBillControlList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
// 排序 查询字段是表格中字段名字 动态取值排序顺序
|
||||||
|
handleSortChange(column) {
|
||||||
|
this.queryParams.orderByColumn = column.prop;
|
||||||
|
this.queryParams.isAsc = column.order;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd(row) {
|
||||||
|
this.isBatchUpdateLockTime=false;
|
||||||
|
this.currentId=null;
|
||||||
|
this.openForm= true;
|
||||||
|
|
||||||
|
this.titleForm = "新增";
|
||||||
|
|
||||||
|
},
|
||||||
|
handleShowMoreInput(){
|
||||||
|
this.moreInputVisible = !this.moreInputVisible;
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.isBatchUpdateLockTime=false;
|
||||||
|
this.currentId= row.id || this.ids;
|
||||||
|
this.openForm = true;
|
||||||
|
this.titleForm = "修改";
|
||||||
|
|
||||||
|
},
|
||||||
|
handleUpdateBatch(){
|
||||||
|
this.isBatchUpdateLockTime=true;
|
||||||
|
this.currentId= this.ids;
|
||||||
|
this.openForm = true;
|
||||||
|
this.titleForm = "批量修改锁定时间";
|
||||||
|
},
|
||||||
|
handleView(row) {
|
||||||
|
this.id=row.id;
|
||||||
|
this.titleView="查看";
|
||||||
|
this.openView=true;
|
||||||
|
|
||||||
|
// this.router.push({ path: '/emis/emisSiteBillControl/viewDetail', query: { id: row.id }})
|
||||||
|
},
|
||||||
|
handleFormChanged(){
|
||||||
|
this.openForm = false;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
cancelForm(){
|
||||||
|
this.openForm = false;
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除').then(function() {
|
||||||
|
return delEmisSiteBillControl(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
// this.download('emis/emisSiteBillControl/export', {
|
||||||
|
// ...this.queryParams
|
||||||
|
// }, `emisSiteBillControl_${new Date().getTime()}.xlsx`)
|
||||||
|
const loadingInstance = this.$loading({
|
||||||
|
text: '正在导出...'
|
||||||
|
})
|
||||||
|
var qParam = {...this.queryParams};
|
||||||
|
qParam.pageNum=1;
|
||||||
|
qParam.pageSize=5000;
|
||||||
|
|
||||||
|
listEmisSiteBillControl(this.addDateRange(qParam, this.dateTimeRange)).then(response => {
|
||||||
|
this.downloadLoading = false
|
||||||
|
if (response.code === 200) {
|
||||||
|
const curList = response.rows
|
||||||
|
import('@/vendor/Export2Excel').then(excel => {
|
||||||
|
const tHeader = ['id','财务中心','目的财务中心','锁账时间','启用状态','备注','删除标志(0代表存在','创建者','创建时间','更新者','更新时间','创建站点','更新站点',];
|
||||||
|
const filterVal = ['id','sendSiteCode','destSiteCode','controlDate','blOpen','remark','delFlag','createBy','createTime','updateBy','updateTime','createSite','updateSite',];
|
||||||
|
const data = this.formatJson(filterVal, curList, response.rows)
|
||||||
|
excel.export_json_to_excel({
|
||||||
|
header: tHeader,
|
||||||
|
data,
|
||||||
|
filename: '对账单锁账',
|
||||||
|
autoWidth: true
|
||||||
|
})
|
||||||
|
loadingInstance.close()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
formatJson(filterVal, jsonData, resData) {
|
||||||
|
let index = 0
|
||||||
|
return jsonData.map(v => filterVal.map(j => {
|
||||||
|
if (j === 'index') {
|
||||||
|
return ++index
|
||||||
|
}
|
||||||
|
if (j === 'status') {
|
||||||
|
var statusStr='xxx'
|
||||||
|
if(v[j] == 10){
|
||||||
|
statusStr='xxx'
|
||||||
|
}
|
||||||
|
return statusStr;
|
||||||
|
}
|
||||||
|
return v[j]
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
/** 列索引函数 */
|
||||||
|
getIndex($index) {
|
||||||
|
return (this.queryParams.pageNum - 1) * this.queryParams.pageSize + $index + 1
|
||||||
|
},
|
||||||
|
/** 时间搜索响应函数 */
|
||||||
|
dateTimeChange(value){
|
||||||
|
this.dateTimeRange=value;
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.el-divider{
|
||||||
|
margin-top: 0px;
|
||||||
|
background: 0 0;
|
||||||
|
border-top: 1px solid #E6EBF5;
|
||||||
|
}
|
||||||
|
.el-divider__text {
|
||||||
|
color: #0955ee;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user