Commit 8fb72fbb authored by 李苏's avatar 李苏 💬

changeExcelParams自定义调整excel的参数

parent e0ae09ba
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
......@@ -191,7 +191,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
qr(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage ref="basePage" @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' ref="basePage" @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步领料单'" />
......@@ -201,6 +201,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
beforeEdit(val) {
let {
row,
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage ref="basePage" @beforeEdit='beforeEdit' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' ref="basePage" @beforeEdit='beforeEdit' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Akck :type="'add'" v-if="ctx.basePage.showAdd&&showName=='akck'" :app='ctx.basePage' :buttonApp='ctx.basePage' />
......@@ -190,6 +190,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.ckdmx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
beforeEdit(val) {
let {
row,
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage class="min_full" @getRow='getRow' ref="basePage" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' class="min_full" @getRow='getRow' ref="basePage" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='选择工位'" />
......@@ -141,6 +141,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
saveGw(form) {
let ctx = this.$refs.basePage
this.$post('lxyl/kcgl/kcpd/lkxj', {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage :toolButtonConfig="{
showExcel:false,
<BasePage :changeExcelParams='changeExcelParams' :toolButtonConfig="{
showExcel:true,
showPrint:false,
showField:true
}" addRename='装包' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
......@@ -159,6 +159,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
qxwc(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$post('lxyl/rkgl/bzzy/cancelComplete', {
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<BasePage :changeExcelParams='changeExcelParams' @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
......@@ -202,6 +202,27 @@
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.rkdmx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
/* 示例*/
getRow(val){
this.$emit('getRow',val)
......
......@@ -3,7 +3,7 @@
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
<Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
......
<template>
<BasePage
@getRow="getRow"
class="min_full"
style="height: 100%"
:config="config"
>
<BasePage :changeExcelParams='changeExcelParams' @getRow="getRow" class="min_full" style="height: 100%"
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd
v-if="
<Shd v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步送货单'
"
:app="ctx.basePage"
/>
<Dbrktb
v-if="
" :app="ctx.basePage" />
<Dbrktb v-if="
ctx.basePage.showDialog &&
ctx.basePage.DialogTitle == '同步生产入库单'
"
:app="ctx.basePage"
/>
<Tbcgd
v-if="
" :app="ctx.basePage" />
<Tbcgd v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步采购单'
"
:app="ctx.basePage"
/>
<Tbxsth
v-if="
" :app="ctx.basePage" />
<Tbxsth v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步销售退货'
"
:app="ctx.basePage"
/>
" :app="ctx.basePage" />
</template>
<template #toolbar="ctx">
<ImportButton
v-if="ctx.basePage.powerObj['01']"
@success="
<ImportButton v-if="ctx.basePage.powerObj['01']" @success="
() => {
ctx.basePage.refresh();
}
"
:url="'/lxyl/rkgl/rktz/import'"
/>
<el-button
v-if="ctx.basePage.powerObj['21']"
style="margin-left: 10px"
@click="qr(ctx.basePage)"
size="mini"
type="primary"
>确认</el-button
>
<el-button
v-if="ctx.basePage.powerObj['21']"
@click="qxqr(ctx.basePage)"
size="mini"
type="primary"
>取消确认</el-button
>
<el-button
v-if="ctx.basePage.powerObj['23']"
@click="tbshd(ctx.basePage)"
size="mini"
type="primary"
>同步送货单</el-button
>
<el-button
v-if="ctx.basePage.powerObj['24']"
@click="dbrktb(ctx.basePage)"
size="mini"
type="primary"
>同步生产入库单</el-button
>
<el-button
v-if="ctx.basePage.powerObj['25']"
@click="tbcgd(ctx.basePage)"
size="mini"
type="primary"
>同步采购单</el-button
>
<el-button
v-if="ctx.basePage.powerObj['26']"
@click="tbxsth(ctx.basePage)"
size="mini"
type="primary"
>同步销售退货</el-button
>
" :url="'/lxyl/rkgl/rktz/import'" />
<el-button v-if="ctx.basePage.powerObj['21']" style="margin-left: 10px" @click="qr(ctx.basePage)" size="mini"
type="primary">确认</el-button>
<el-button v-if="ctx.basePage.powerObj['21']" @click="qxqr(ctx.basePage)" size="mini"
type="primary">取消确认</el-button>
<el-button v-if="ctx.basePage.powerObj['23']" @click="tbshd(ctx.basePage)" size="mini"
type="primary">同步送货单</el-button>
<el-button v-if="ctx.basePage.powerObj['24']" @click="dbrktb(ctx.basePage)" size="mini"
type="primary">同步生产入库单</el-button>
<el-button v-if="ctx.basePage.powerObj['25']" @click="tbcgd(ctx.basePage)" size="mini"
type="primary">同步采购单</el-button>
<el-button v-if="ctx.basePage.powerObj['26']" @click="tbxsth(ctx.basePage)" size="mini"
type="primary">同步销售退货</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from "./edit.vue";
import Shd from "./shd.vue";
import Dbrktb from "./dbrktb.vue";
import Tbcgd from "./tbcgd.vue";
import Tbxsth from "./tbxsth.vue";
export default {
import Edit from "./edit.vue";
import Shd from "./shd.vue";
import Dbrktb from "./dbrktb.vue";
import Tbcgd from "./tbcgd.vue";
import Tbxsth from "./tbxsth.vue";
export default {
data() {
return {
config: {
queryDetail: true,
/* 基本配置*/
url: "lxyl/rkgl/rktz",
tableTitle: [
{
tableTitle: [{
title: "状态",
field: "zt",
fieldType: "ftString",
......@@ -187,8 +135,7 @@ export default {
}
],
queryParams: [
[
{
[{
label: "日期",
startProp: "start",
endProp: "end",
......@@ -229,8 +176,7 @@ export default {
}
],
[
{
[{
label: "物料信息",
prop: "wlxxInfo",
span: 8,
......@@ -261,6 +207,27 @@ export default {
};
},
methods: {
/**
* @description: 调整excel传递的参数
* @param {Object} params
* @return {*}
* @author: lisu
*/
changeExcelParams(params) {
let fields = JSON.parse(params.fields)
let expandTitle = this.$attrs.app.$refs.mx.$refs.basePage.tableTitle
let newExpandTitle = []
expandTitle.forEach((item, index) => {
let newObj = {
caption: item.label,
name: item.prop,
width: item.width
}
newExpandTitle[index] = newObj
})
fields = [...fields, ...newExpandTitle]
params.fields = JSON.stringify(fields)
},
tbxsth(ctx) {
ctx.DialogWidth = "35vw";
ctx.DialogTitle = "同步销售退货";
......@@ -332,7 +299,7 @@ export default {
Tbcgd,
Tbxsth,
},
};
};
</script>
<style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment