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

changeExcelParams自定义调整excel的参数

parent e0ae09ba
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <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"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
...@@ -191,7 +191,27 @@ ...@@ -191,7 +191,27 @@
}, },
methods: { 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) { qr(ctx) {
if (ctx.singleItem && ctx.singleItem.id) { if (ctx.singleItem && ctx.singleItem.id) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <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"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步领料单'" /> <Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步领料单'" />
...@@ -201,6 +201,27 @@ ...@@ -201,6 +201,27 @@
}, },
methods: { 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) { beforeEdit(val) {
let { let {
row, row,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <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"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Akck :type="'add'" v-if="ctx.basePage.showAdd&&showName=='akck'" :app='ctx.basePage' :buttonApp='ctx.basePage' /> <Akck :type="'add'" v-if="ctx.basePage.showAdd&&showName=='akck'" :app='ctx.basePage' :buttonApp='ctx.basePage' />
...@@ -190,6 +190,27 @@ ...@@ -190,6 +190,27 @@
}, },
methods: { 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) { beforeEdit(val) {
let { let {
row, row,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <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"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='选择工位'" /> <Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='选择工位'" />
...@@ -141,6 +141,27 @@ ...@@ -141,6 +141,27 @@
}, },
methods: { 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) { saveGw(form) {
let ctx = this.$refs.basePage let ctx = this.$refs.basePage
this.$post('lxyl/kcgl/kcpd/lkxj', { this.$post('lxyl/kcgl/kcpd/lkxj', {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <template>
<BasePage :toolButtonConfig="{ <BasePage :changeExcelParams='changeExcelParams' :toolButtonConfig="{
showExcel:false, showExcel:true,
showPrint:false, showPrint:false,
showField:true showField:true
}" addRename='装包' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config"> }" addRename='装包' :power='power' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
...@@ -159,6 +159,27 @@ ...@@ -159,6 +159,27 @@
}, },
methods: { 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) { qxwc(ctx) {
if (ctx.singleItem && ctx.singleItem.id) { if (ctx.singleItem && ctx.singleItem.id) {
this.$post('lxyl/rkgl/bzzy/cancelComplete', { this.$post('lxyl/rkgl/bzzy/cancelComplete', {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <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"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
...@@ -202,6 +202,27 @@ ...@@ -202,6 +202,27 @@
}, },
methods: { 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){ getRow(val){
this.$emit('getRow',val) this.$emit('getRow',val)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class=" higher flex-column"> <div class=" higher flex-column">
<!-- 分层--> <!-- 分层-->
<div class="top"> <div class="top">
<Top @getRow='topGetRow' ref="top"></Top> <Top :app='this' @getRow='topGetRow' ref="top"></Top>
</div> </div>
<div class="bottom flex"> <div class="bottom flex">
<div class="full" > <div class="full" >
......
<template> <template>
<BasePage <BasePage :changeExcelParams='changeExcelParams' @getRow="getRow" class="min_full" style="height: 100%"
@getRow="getRow" :config="config">
class="min_full"
style="height: 100%"
:config="config"
>
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd <Shd v-if="
v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步送货单' ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步送货单'
" " :app="ctx.basePage" />
:app="ctx.basePage" <Dbrktb v-if="
/>
<Dbrktb
v-if="
ctx.basePage.showDialog && ctx.basePage.showDialog &&
ctx.basePage.DialogTitle == '同步生产入库单' ctx.basePage.DialogTitle == '同步生产入库单'
" " :app="ctx.basePage" />
:app="ctx.basePage" <Tbcgd v-if="
/>
<Tbcgd
v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步采购单' ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步采购单'
" " :app="ctx.basePage" />
:app="ctx.basePage" <Tbxsth v-if="
/>
<Tbxsth
v-if="
ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步销售退货' ctx.basePage.showDialog && ctx.basePage.DialogTitle == '同步销售退货'
" " :app="ctx.basePage" />
:app="ctx.basePage"
/>
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<ImportButton <ImportButton v-if="ctx.basePage.powerObj['01']" @success="
v-if="ctx.basePage.powerObj['01']"
@success="
() => { () => {
ctx.basePage.refresh(); ctx.basePage.refresh();
} }
" " :url="'/lxyl/rkgl/rktz/import'" />
: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 <el-button v-if="ctx.basePage.powerObj['21']" @click="qxqr(ctx.basePage)" size="mini"
v-if="ctx.basePage.powerObj['21']" type="primary">取消确认</el-button>
style="margin-left: 10px" <el-button v-if="ctx.basePage.powerObj['23']" @click="tbshd(ctx.basePage)" size="mini"
@click="qr(ctx.basePage)" type="primary">同步送货单</el-button>
size="mini" <el-button v-if="ctx.basePage.powerObj['24']" @click="dbrktb(ctx.basePage)" size="mini"
type="primary" type="primary">同步生产入库单</el-button>
>确认</el-button <el-button v-if="ctx.basePage.powerObj['25']" @click="tbcgd(ctx.basePage)" size="mini"
> type="primary">同步采购单</el-button>
<el-button <el-button v-if="ctx.basePage.powerObj['26']" @click="tbxsth(ctx.basePage)" size="mini"
v-if="ctx.basePage.powerObj['21']" type="primary">同步销售退货</el-button>
@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> </template>
</BasePage> </BasePage>
</template> </template>
<script> <script>
import Edit from "./edit.vue"; import Edit from "./edit.vue";
import Shd from "./shd.vue"; import Shd from "./shd.vue";
import Dbrktb from "./dbrktb.vue"; import Dbrktb from "./dbrktb.vue";
import Tbcgd from "./tbcgd.vue"; import Tbcgd from "./tbcgd.vue";
import Tbxsth from "./tbxsth.vue"; import Tbxsth from "./tbxsth.vue";
export default { export default {
data() { data() {
return { return {
config: { config: {
queryDetail: true, queryDetail: true,
/* 基本配置*/ /* 基本配置*/
url: "lxyl/rkgl/rktz", url: "lxyl/rkgl/rktz",
tableTitle: [ tableTitle: [{
{
title: "状态", title: "状态",
field: "zt", field: "zt",
fieldType: "ftString", fieldType: "ftString",
...@@ -187,8 +135,7 @@ export default { ...@@ -187,8 +135,7 @@ export default {
} }
], ],
queryParams: [ queryParams: [
[ [{
{
label: "日期", label: "日期",
startProp: "start", startProp: "start",
endProp: "end", endProp: "end",
...@@ -229,8 +176,7 @@ export default { ...@@ -229,8 +176,7 @@ export default {
} }
], ],
[ [{
{
label: "物料信息", label: "物料信息",
prop: "wlxxInfo", prop: "wlxxInfo",
span: 8, span: 8,
...@@ -261,6 +207,27 @@ export default { ...@@ -261,6 +207,27 @@ export default {
}; };
}, },
methods: { 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) { tbxsth(ctx) {
ctx.DialogWidth = "35vw"; ctx.DialogWidth = "35vw";
ctx.DialogTitle = "同步销售退货"; ctx.DialogTitle = "同步销售退货";
...@@ -332,7 +299,7 @@ export default { ...@@ -332,7 +299,7 @@ export default {
Tbcgd, Tbcgd,
Tbxsth, Tbxsth,
}, },
}; };
</script> </script>
<style> <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