md
This commit is contained in:
parent
102168f320
commit
28ff754fcf
44
src/api/emis/emisPrintTpl.js
Normal file
44
src/api/emis/emisPrintTpl.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询快递打印模板列表
|
||||
export function listEmisPrintTpl(query) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTpl/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询快递打印模板详细
|
||||
export function getEmisPrintTpl(id) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTpl/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增快递打印模板
|
||||
export function addEmisPrintTpl(data) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTpl',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改快递打印模板
|
||||
export function updateEmisPrintTpl(data) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTpl',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除快递打印模板
|
||||
export function delEmisPrintTpl(id) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTpl/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/emis/emisPrintTplRel.js
Normal file
44
src/api/emis/emisPrintTplRel.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询快递商户关联表列表
|
||||
export function listEmisPrintTplRel(query) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTplRel/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询快递商户关联表详细
|
||||
export function getEmisPrintTplRel(id) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTplRel/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增快递商户关联表
|
||||
export function addEmisPrintTplRel(data) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTplRel',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改快递商户关联表
|
||||
export function updateEmisPrintTplRel(data) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTplRel',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除快递商户关联表
|
||||
export function delEmisPrintTplRel(id) {
|
||||
return request({
|
||||
url: '/emis/emisPrintTplRel/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
170
src/views/emis/EmisBaseTools/TransProductCasPicker.vue
Normal file
170
src/views/emis/EmisBaseTools/TransProductCasPicker.vue
Normal file
@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<el-cascader
|
||||
:size="size"
|
||||
:props="props"
|
||||
:key="resetCascader"
|
||||
@change="handleChange"
|
||||
v-model="svalue"
|
||||
style="width: 100%"
|
||||
clearable
|
||||
filterable
|
||||
></el-cascader>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
// import { listSimpleEmisCountry} from "@/api/emis/emisCountry";
|
||||
import { listSimpleEmisTransLine } from "@/api/emis/emisTransLine";
|
||||
import { listSimpleEmisTransProduct } from "@/api/emis/emisTransProduct";
|
||||
|
||||
export default {
|
||||
name: "TransProductCasPicker",
|
||||
props: {
|
||||
value: {
|
||||
type: [String, Number,Array],
|
||||
required: false
|
||||
},
|
||||
countryCode: {
|
||||
type: String,
|
||||
required: false
|
||||
},
|
||||
size:{
|
||||
type: String,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
resetCascader:0,
|
||||
svalue: this.value,
|
||||
props: {
|
||||
// checkStrictly: true,
|
||||
lazy: true,
|
||||
lazyLoad: (node, resolve) => {
|
||||
const { level } = node;
|
||||
const nodes = [];
|
||||
// level: 层级
|
||||
// node 节点数据
|
||||
// 一级菜单数据
|
||||
|
||||
// 为1代表第一次请求
|
||||
// let type = level == 0 ? "1" : node.value;
|
||||
let parentCode = node.value;
|
||||
this.queryData(level,parentCode)
|
||||
.then((res) => {
|
||||
|
||||
console.log(res);
|
||||
|
||||
if (res.code != 200) {
|
||||
return;
|
||||
}
|
||||
|
||||
res.rows.map((item) => {
|
||||
|
||||
if(level==0){
|
||||
let obj = {
|
||||
value: item.lineCode,
|
||||
label: item.lineName,
|
||||
leaf: false,
|
||||
};
|
||||
nodes.push(obj);
|
||||
}
|
||||
else if(level==1){
|
||||
let obj = {
|
||||
value: item.prodCode,
|
||||
label: item.prodName,
|
||||
leaf: true,
|
||||
};
|
||||
nodes.push(obj);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// resolve 节点返回
|
||||
resolve(nodes);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value(newVal) {
|
||||
this.svalue = newVal;
|
||||
},
|
||||
svalue(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.$emit("input", this.svalue);
|
||||
}
|
||||
},
|
||||
countryCode(newVal) {
|
||||
this.queryData(0,0);
|
||||
this.resetCascader++
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.queryData(0,0);
|
||||
},
|
||||
methods: {
|
||||
async queryData(level,parentCode) {
|
||||
// console.log(level)
|
||||
// 第一级国家
|
||||
// if(level == 0){
|
||||
// let queryParams={};
|
||||
// let res=await listSimpleEmisCountry(queryParams);
|
||||
// console.log("xxxx1")
|
||||
// console.log(res)
|
||||
// return res;
|
||||
// }
|
||||
|
||||
// 第二级是线路
|
||||
if(level == 0){
|
||||
let queryParams={
|
||||
country:this.countryCode
|
||||
};
|
||||
let res=await listSimpleEmisTransLine(queryParams);
|
||||
return res;
|
||||
}
|
||||
|
||||
// 产品
|
||||
if(level == 1){
|
||||
let queryParams={
|
||||
transLineCode:parentCode,
|
||||
status:1
|
||||
};
|
||||
let res=await listSimpleEmisTransProduct(queryParams);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.con {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.el-radio__inner {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
width: 170px;
|
||||
height: 34px;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: -18px;
|
||||
left: -19px;
|
||||
}
|
||||
|
||||
.el-radio__input.is-checked .el-radio__inner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
</style>
|
||||
183
src/views/emis/emisPrintTpl/emisPrintTplForm.vue
Normal file
183
src/views/emis/emisPrintTpl/emisPrintTplForm.vue
Normal file
@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<div >
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="模板名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item label="模版代码" prop="code">
|
||||
<el-input v-model="form.code" placeholder="请输入模版代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="模板版本" prop="version">
|
||||
<el-input v-model="form.version" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="公共模板标识" prop="isPublic">
|
||||
<el-input v-model="form.isPublic" placeholder="请输入公共模板标识" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item label="快递类型" prop="expressType">
|
||||
<el-input v-model="form.expressType" placeholder="请输入快递类型" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="模板内容-在线模版" prop="tplData">
|
||||
<el-input v-model="form.tplData" placeholder="请输入模板内容-在线模版" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="加密模版" prop="tplEncData">
|
||||
<el-input v-model="form.tplEncData" type="textarea" rows="12" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="pdf模版" prop="tplPdfData">
|
||||
<el-input v-model="form.tplPdfData" type="textarea" rows="12" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="在线图片" prop="tplPicUrl">
|
||||
<el-input v-model="form.tplPicUrl" placeholder="请输入在线图片" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="24">
|
||||
<el-form-item label="0-初始" prop="status">
|
||||
<el-input v-model="form.status" placeholder="请输入0-初始" />
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" 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 { listEmisPrintTpl, getEmisPrintTpl, delEmisPrintTpl, addEmisPrintTpl, updateEmisPrintTpl } from "@/api/emis/emisPrintTpl";
|
||||
|
||||
export default {
|
||||
name: "emisPrintTplForm",
|
||||
props:{
|
||||
id:{
|
||||
type:Number
|
||||
}
|
||||
},
|
||||
components: { },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
emisPrintTplOptions: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "0-初始不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
initData() {
|
||||
|
||||
if(this.id !=null) {
|
||||
this.loading = true;
|
||||
getEmisPrintTpl(this.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
}
|
||||
// this.getTreeselect();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.reset();
|
||||
this.$emit("on-cancel");
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
code: null,
|
||||
name: null,
|
||||
version: null,
|
||||
isPublic: null,
|
||||
merchId: null,
|
||||
expressType: null,
|
||||
tplData: null,
|
||||
tplEncData: null,
|
||||
tplPdfData: null,
|
||||
tplPicUrl: null,
|
||||
status: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
createSite: null,
|
||||
updateSite: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEmisPrintTpl(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
} else {
|
||||
addEmisPrintTpl(this.form).then(response => {
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
387
src/views/emis/emisPrintTpl/index.vue
Normal file
387
src/views/emis/emisPrintTpl/index.vue
Normal file
@ -0,0 +1,387 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="10" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
|
||||
<!-- <el-form-item label="" prop="code">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
:placeholder="$t('模版代码')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item :label="$t('模板名称')" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
:placeholder="$t('模板名称')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</SearchForm>
|
||||
|
||||
|
||||
<XdTable v-loading="loading"
|
||||
border stripe
|
||||
size="small"
|
||||
:data="emisPrintTplList"
|
||||
: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:emisPrintTpl: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:emisPrintTpl: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:emisPrintTpl: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:emisPrintTpl: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="code" width="100" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.code}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('模板名称')" align="center" prop="name" width="150" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.name}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('模板版本')" align="center" prop="version" width="80" />
|
||||
<!-- <el-table-column :label="$t('公共模板标识')" align="center" prop="isPublic" min-width="100" /> -->
|
||||
<el-table-column :label="$t('快递类型')" align="center" prop="expressType" min-width="100" />
|
||||
<!-- <el-table-column :label="$t('在线图片')" align="center" prop="tplPicUrl" min-width="100" /> -->
|
||||
<!-- <el-table-column :label="$t('0-初始')" align="center" prop="status" min-width="100" /> -->
|
||||
<!-- <el-table-column :label="$t('删除标志(0代表存在')" align="center" prop="delFlag" min-width="100" /> -->
|
||||
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['emis:emisPrintTpl:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['emis:emisPrintTpl:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</XdTable>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="80%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<emisPrintTplForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisPrintTplForm>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!--
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" v-dialogDrag append-to-body>
|
||||
<emisPrintTplView :id="id" ></EmisPrintTplView>
|
||||
</el-dialog>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisPrintTpl, getEmisPrintTpl, delEmisPrintTpl, addEmisPrintTpl, updateEmisPrintTpl } from "@/api/emis/emisPrintTpl";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
// import emisPrintTplView from '@/views/emis/emisPrintTpl/emisPrintTplView';
|
||||
import emisPrintTplForm from '@/views/emis/emisPrintTpl/emisPrintTplForm';
|
||||
|
||||
export default {
|
||||
name: "emisPrintTpl",
|
||||
components: { elDateSimplePicker,emisPrintTplForm },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 快递打印模板表格数据
|
||||
emisPrintTplList: [],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 更新网点时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 更新网点时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
code: null,
|
||||
name: null,
|
||||
version: null,
|
||||
isPublic: null,
|
||||
expressType: null,
|
||||
tplData: null,
|
||||
tplEncData: null,
|
||||
tplPdfData: null,
|
||||
tplPicUrl: null,
|
||||
status: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询快递打印模板列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
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];
|
||||
}
|
||||
listEmisPrintTpl(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.emisPrintTplList = 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.currentId=null;
|
||||
this.openForm= true;
|
||||
this.titleForm = "新增";
|
||||
},
|
||||
handleShowMoreInput(){
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.currentId= row.id;
|
||||
this.openForm = true;
|
||||
this.titleForm = "修改";
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/emis/emisPrintTpl/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 delEmisPrintTpl(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisPrintTpl/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisPrintTpl_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listEmisPrintTpl(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','模版代码','模板名称','模板版本例如1.0.0','公共模板标识','模板所有者','快递类型','模板内容-在线模版','加密模版','在线pdf模版','在线图片','0-初始','删除标志(0代表存在','创建者','创建时间','更新者','update_time','备注','创建网点','更新网点',];
|
||||
const filterVal = ['id','code','name','version','isPublic','merchId','expressType','tplData','tplEncData','tplPdfData','tplPicUrl','status','delFlag','createBy','createTime','updateBy','updateTime','remark','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>
|
||||
174
src/views/emis/emisPrintTplRel/emisPrintTplRelForm.vue
Normal file
174
src/views/emis/emisPrintTplRel/emisPrintTplRelForm.vue
Normal file
@ -0,0 +1,174 @@
|
||||
<template>
|
||||
<div >
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row :gutter="0" style="display: flex;flex-wrap: wrap;">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="模版代码" prop="tplCode">
|
||||
<el-input v-model="form.tplCode" placeholder="请输入模版代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="模板名称" prop="tplName">
|
||||
<el-input v-model="form.tplName" placeholder="请输入模板名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="删除标志(0代表存在" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标志(0代表存在" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<!--
|
||||
<el-form-item label="上级字典">
|
||||
<treeselect
|
||||
ref="tree"
|
||||
v-model="form.parentId"
|
||||
:options="emisPrintTplRelOptions"
|
||||
:normalizer="normalizer"
|
||||
:default-expand-level="1"
|
||||
:show-count="true"
|
||||
placeholder="选择上级"
|
||||
/>
|
||||
</el-form-item>
|
||||
-->
|
||||
</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 { listEmisPrintTplRel, getEmisPrintTplRel, delEmisPrintTplRel, addEmisPrintTplRel, updateEmisPrintTplRel } from "@/api/emis/emisPrintTplRel";
|
||||
|
||||
export default {
|
||||
name: "emisPrintTplRelForm",
|
||||
props:{
|
||||
id:{
|
||||
type:Number
|
||||
}
|
||||
},
|
||||
components: { },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
emisPrintTplRelOptions: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "id不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
"id": {
|
||||
handler (newValue, oldValue) {
|
||||
this.id = newValue;
|
||||
this.initData();
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
|
||||
methods: {
|
||||
initData() {
|
||||
|
||||
if(this.id !=null) {
|
||||
this.loading = true;
|
||||
getEmisPrintTplRel(this.id).then(response => {
|
||||
this.form = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
}else{
|
||||
this.reset();
|
||||
}
|
||||
// this.getTreeselect();
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.reset();
|
||||
this.$emit("on-cancel");
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
merchId: null,
|
||||
tplId: null,
|
||||
tplCode: null,
|
||||
tplName: null,
|
||||
delFlag: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
createSite: null,
|
||||
updateSite: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateEmisPrintTplRel(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
} else {
|
||||
addEmisPrintTplRel(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$emit("on-changed");
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// /** 转换菜单数据结构 */
|
||||
// normalizer(node) {
|
||||
// if (node.children && !node.children.length) {
|
||||
// delete node.children;
|
||||
// }
|
||||
// return {
|
||||
// id: node.id,
|
||||
// label: node.idName,
|
||||
// children: node.children
|
||||
// };
|
||||
// },
|
||||
// /** 查询菜单下拉树结构 */
|
||||
// getTreeselect() {
|
||||
// const queryParams = {}
|
||||
// listEmisPrintTplRel(queryParams).then(response => {
|
||||
// this.emisPrintTplRelOptions = [];
|
||||
// const rootItem = { idId: 0, emisPrintTplRelName: '-', children: [] };
|
||||
// rootItem.children = this.handleTree(response.data, "id");
|
||||
// this.emisPrintTplRelOptions.push(rootItem);
|
||||
|
||||
// if(this.parentId != undefined) {
|
||||
// this.form.parentId = this.parentId;
|
||||
// }
|
||||
|
||||
// });
|
||||
// },
|
||||
}
|
||||
};
|
||||
</script>
|
||||
382
src/views/emis/emisPrintTplRel/index.vue
Normal file
382
src/views/emis/emisPrintTplRel/index.vue
Normal file
@ -0,0 +1,382 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
|
||||
<el-form-item label="" prop="tplCode">
|
||||
<el-input
|
||||
v-model="queryParams.tplCode"
|
||||
:placeholder="$t('模版代码')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="tplName">
|
||||
<el-input
|
||||
v-model="queryParams.tplName"
|
||||
:placeholder="$t('模板名称')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="delFlag">
|
||||
<el-input
|
||||
v-model="queryParams.delFlag"
|
||||
:placeholder="$t('删除标志(0代表存在')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
:placeholder="$t('备注')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</SearchForm>
|
||||
|
||||
|
||||
<XdTable v-loading="loading"
|
||||
border stripe
|
||||
size="small"
|
||||
:data="emisPrintTplRelList"
|
||||
: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:emisPrintTplRel: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:emisPrintTplRel: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:emisPrintTplRel: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:emisPrintTplRel: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="tplCode" min-width="100" />
|
||||
<el-table-column :label="$t('模板名称')" align="center" prop="tplName" min-width="100" />
|
||||
<el-table-column :label="$t('删除标志(0代表存在')" align="center" prop="delFlag" min-width="100" />
|
||||
<el-table-column :label="$t('备注')" align="center" prop="remark" min-width="100" />
|
||||
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['emis:emisPrintTplRel:edit']"
|
||||
>修改</el-button>
|
||||
<!--
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['emis:emisPrintTplRel:remove']"
|
||||
>删除</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</XdTable>
|
||||
|
||||
<el-dialog :title="titleForm" :visible.sync="openForm" width="50%" :destroy-on-close="true" v-dialogDrag append-to-body>
|
||||
<emisPrintTplRelForm :id="currentId" @on-changed="handleFormChanged" @on-cancel="cancelForm"></EmisPrintTplRelForm>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!--
|
||||
<el-dialog :title="titleView" :visible.sync="openView" width="60%" :close-on-click-modal="false" v-dialogDrag append-to-body>
|
||||
<emisPrintTplRelView :id="id" ></EmisPrintTplRelView>
|
||||
</el-dialog>
|
||||
-->
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listEmisPrintTplRel, getEmisPrintTplRel, delEmisPrintTplRel, addEmisPrintTplRel, updateEmisPrintTplRel } from "@/api/emis/emisPrintTplRel";
|
||||
import elDateSimplePicker from '@/components/DatePickerAdv/elDateSimplePicker';
|
||||
// import emisPrintTplRelView from '@/views/emis/emisPrintTplRel/emisPrintTplRelView';
|
||||
import emisPrintTplRelForm from '@/views/emis/emisPrintTplRel/emisPrintTplRelForm';
|
||||
|
||||
export default {
|
||||
name: "emisPrintTplRel",
|
||||
components: { elDateSimplePicker,emisPrintTplRelForm },
|
||||
dicts: [
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 创建时间搜索
|
||||
dateTimeRange:[],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 快递商户关联表表格数据
|
||||
emisPrintTplRelList: [],
|
||||
|
||||
currentId:null,
|
||||
openForm: false,
|
||||
titleForm: "",
|
||||
|
||||
// 弹出展示层
|
||||
id:null,
|
||||
titleView:"",
|
||||
openView: false,
|
||||
// 更新网点时间范围
|
||||
daterangeCreateTime: [],
|
||||
// 更新网点时间范围
|
||||
daterangeUpdateTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
tplCode: null,
|
||||
tplName: null,
|
||||
delFlag: null,
|
||||
remark: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询快递商户关联表列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
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];
|
||||
}
|
||||
listEmisPrintTplRel(this.addDateRange(this.queryParams, this.dateTimeRange)).then(response => {
|
||||
this.emisPrintTplRelList = 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.currentId=null;
|
||||
this.openForm= true;
|
||||
this.titleForm = "新增";
|
||||
},
|
||||
handleShowMoreInput(){
|
||||
this.moreInputVisible = !this.moreInputVisible;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.currentId= row.id;
|
||||
this.openForm = true;
|
||||
this.titleForm = "修改";
|
||||
},
|
||||
handleView(row) {
|
||||
this.id=row.id;
|
||||
this.titleView="查看";
|
||||
this.openView=true;
|
||||
// this.router.push({ path: '/emis/emisPrintTplRel/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 delEmisPrintTplRel(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// this.download('emis/emisPrintTplRel/export', {
|
||||
// ...this.queryParams
|
||||
// }, `emisPrintTplRel_${new Date().getTime()}.xlsx`)
|
||||
const loadingInstance = this.$loading({
|
||||
text: '正在导出...'
|
||||
})
|
||||
var qParam = {...this.queryParams};
|
||||
qParam.pageNum=1;
|
||||
qParam.pageSize=5000;
|
||||
|
||||
listEmisPrintTplRel(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','商户号','模板ID','模版代码','模板名称','删除标志(0代表存在','创建者','创建时间','更新者','update_time','备注','创建网点','更新网点',];
|
||||
const filterVal = ['id','merchId','tplId','tplCode','tplName','delFlag','createBy','createTime','updateBy','updateTime','remark','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