Commit 186f179d authored by 李苏's avatar 李苏 💬

移除项目

parent 88e29042
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/xsry/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/xsry/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/xsry/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/xsry/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/xsry/startOrStop',
method: 'post',
data: query||{}
})
}
export function importXsry(query) {
return request({
url: '/jcsj/xsry/importXsry',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: 'jcsj/khfl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/khfl/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/khfl/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/khfl/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/khfl/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/kh/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/kh/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/kh/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/kh/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/kh/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/wlsx/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/wlsx/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/wlsx/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/wlsx/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/wlsx/startOrStop',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/wlfl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/wlfl/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/wlfl/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/wlfl/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/wlfl/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/wlxx/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/wlxx/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/wlxx/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/wlxx/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/wlxx/record/qt',
method: 'post',
data: query||{}
})
}
export function apiTreeQuery(query) {
return request({
url: '/jcsj/wlfl/query',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/swlx/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/swlx/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/swlx/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/swlx/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/swlx/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/kw/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/kw/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/kw/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/kw/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/kw/record/qt',
method: 'post',
data: query||{}
})
}
/* 查询库位物料 */
export function queryKwwl(query) {
return request({
url: '/jcsj/kwwl/query',
method: 'post',
data: query||{}
})
}
export function delKwwl(query) {
return request({
url: '/jcsj/kwwl/delete',
method: 'post',
data: query||{}
})
}
export function addKwwl(query) {
return request({
url: '/jcsj/kwwl/batch/add',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/ck/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/ck/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/ck/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/ck/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/ck/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/cgry/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/cgry/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/cgry/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/cgry/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/cgry/startOrStop',
method: 'post',
data: query||{}
})
}
export function importCgry(query) {
return request({
url: 'jcsj/cgry/importCgry',
method: 'post',
data: query||{}
})
}
export function getCgryForImp(query) {
return request({
url: '/jcsj/cgry/getCgryForImp',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: 'jcsj/gysfl/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/gysfl/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/gysfl/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/gysfl/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/gysfl/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* query */
export function doQuery(query) {
return request({
url: '/jcsj/gys/query',
method: 'post',
data: query||{}
})
}
export function doAdd(query) {
return request({
url: '/jcsj/gys/add',
method: 'post',
data: query||{}
})
}
export function doUpdate(query) {
return request({
url: '/jcsj/gys/update',
method: 'post',
data: query||{}
})
}
export function doDelete(query) {
return request({
url: '/jcsj/gys/delete',
method: 'post',
data: query||{}
})
}
export function qt(query) {
return request({
url: '/jcsj/gys/record/qt',
method: 'post',
data: query||{}
})
}
import request from 'common/src/utils/request'
/* 事务类型接口 */
export function initSwlx(query) {
return request({
url: '/jcsj/common/wfstate',
method: 'post',
data: query||{}
})
}
/* 部门接口 */
export function initBm(query) {
return request({
url: '/kzzx/bm/query',
method: 'post',
data: query||{}
})
}
/* 系统初始接口 */
export function systeminfo(query) {
return request({
url: '/systeminfo',
method: 'post',
data: query||{}
})
}
// 公司接口
export function queryGs(query) {
return request({
url: '/jcsj/common/bm/queryGs',
method: 'post',
data: query||{}
})
}
export default{
list:[
{
path:'/baseData',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'store',
meta: {title: "基础数据", icon: "fa-cog", noCache: false, link: null,mkid:215000000},
children:[
/* 计量单位*/
{
erpComponent:true,
component:'template/index',
hidden:false,
meta:{
"title": "财务",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215060000,
},
redirect: 'meteringUnit',
name:'finance',
path:"finance",
children:[{
erpComponent:true,
component:'template/view/index',
hidden:false,
meta:{
"title": "发票分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060100,
},
name:'financeClassification',
path:"financeClassification",
},
{ erpComponent:true,
component:'baseData/finance/period/index',
hidden:false,
meta:{
"title": "会计期间",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060200,
},
name:'financePeriod',
path:"financePeriod",
},
{
erpComponent:true,
component:'template/view/index',
hidden:false,
meta:{
"title": "会计单位",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060300,
},
name:'financeUnit',
path:"financeUnit",
},
{
erpComponent:true,
component:'baseData/finance/store/index',
hidden:false,
meta:{
"title": "仓库财务信息",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060400,
},
name:'financeStore',
path:"financeStore",
},
]
}
]
}
]
}
...@@ -29,339 +29,8 @@ import Layout from '@/layout' ...@@ -29,339 +29,8 @@ import Layout from '@/layout'
*/ */
export const powerRoutes=[ export const powerRoutes=[
/* erp 基础数据*/ /* erp 基础数据*/
{
path:'/baseData',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'store',
meta: {title: "基础数据", icon: "fa-cog", noCache: false, link: null,mkid:215000000},
children:[
{
component:'baseData/store/index',
hidden:false,
meta:{
"title": "仓储",
"icon": "",
"noCache": false,
"link": null,
"mkid":215010000,
},
redirect: 'storeMaintenance',
name:'store',
path:"store",
children:[{
component:'baseData/store/maintenance/index',
hidden:false,
meta:{
"title": "仓库维护",
"icon": "",
"noCache": false,
"link": null,
"mkid":215010100,
},
name:'storeMaintenance',
path:"storeMaintenance",
},
{
component:'baseData/store/location/index',
hidden:false,
meta:{
"title": "库位维护",
"icon": "",
"noCache": false,
"link": null,
"mkid":215010200,
},
name:'storeLocation',
path:"storeLocation",
},
{
component:'baseData/store/actionType/index',
hidden:false,
meta:{
"title": "事务类型",
"icon": "",
"noCache": false,
"link": null,
"mkid":215010300,
},
name:'storeActionType',
path:"storeActionType",
}
]
},
/* 物料*/
{
component:'baseData/material/index',
hidden:false,
meta:{
"title": "物料",
"icon": "",
"noCache": false,
"link": null,
"mkid":215020000,
},
redirect: 'materialClassification',
name:'material',
path:"material",
children:[{
component:'baseData/material/classification/index',
hidden:false,
meta:{
"title": "物料分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215020100,
},
name:'materialClassification',
path:"materialClassification",
},
{
component:'baseData/material/info/index',
hidden:false,
meta:{
"title": "物料信息",
"icon": "",
"noCache": false,
"link": null,
"mkid":215020200,
},
name:'materialInfo',
path:"materialInfo",
},
{
component:'baseData/material/attribute/index',
hidden:false,
meta:{
"title": "物料属性",
"icon": "",
"noCache": false,
"link": null,
"mkid":215022000,
},
name:'materialAttribute',
path:"materialAttribute",
}
]
},
/* 客户分类*/
{
component:'baseData/custom/index',
hidden:false,
meta:{
"title": "客户",
"icon": "",
"noCache": false,
"link": null,
"mkid":215030000,
},
redirect: 'customClassification',
name:'custom',
path:"custom",
children:[{
component:'baseData/custom/classification/index',
hidden:false,
meta:{
"title": "客户分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215030100,
},
name:'customClassification',
path:"customClassification",
},
{
component:'baseData/custom/info/index',
hidden:false,
meta:{
"title": "客户信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215030200,
},
name:'customInfo',
path:"customInfo",
},
{
component:'baseData/custom/attribute/index',
hidden:false,
meta:{
"title": "销售员",
"icon": "",
"noCache": false,
"link": null,
"mkid":215030600,
},
name:'customAttribute',
path:"customAttribute",
}
]
},
{
component:'baseData/supplier/index',
hidden:false,
meta:{
"title": "供应商",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215040000,
},
redirect: 'supplierClassification',
name:'supplier',
path:"supplier",
children:[{
component:'baseData/supplier/classification/index',
hidden:false,
meta:{
"title": "客户分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215040100,
},
name:'supplierClassification',
path:"supplierClassification",
},
{
component:'baseData/supplier/info/index',
hidden:false,
meta:{
"title": "客户信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215040200,
},
name:'supplierInfo',
path:"supplierInfo",
},
{
component:'baseData/supplier/attribute/index',
hidden:false,
meta:{
"title": "销售员",
"icon": "",
"noCache": false,
"link": null,
"mkid":215040600,
},
name:'supplierAttribute',
path:"supplierAttribute",
}
]
},
/* 计量单位*/
{
component:'baseData/metering/index',
hidden:false,
meta:{
"title": "计量单位",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215050000,
},
redirect: 'meteringUnit',
name:'metering',
path:"metering",
children:[{
component:'baseData/metering/unit/index',
hidden:false,
meta:{
"title": "计量单位",
"icon": "",
"noCache": false,
"link": null,
"mkid":215050100,
},
name:'meteringUnit',
path:"meteringUnit",
},
{
component:'baseData/metering/replace/index',
hidden:false,
meta:{
"title": "替换单位",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215050200,
},
name:'meteringReplace',
path:"meteringReplace",
},
{
component:'baseData/metering/maintenance/index',
hidden:false,
meta:{
"title": "维护",
"icon": "",
"noCache": false,
"link": null,
"mkid":215050300,
},
name:'meteringMaintenance',
path:"meteringMaintenance",
}
]
},
/* 计量单位*/
{
component:'template/index',
hidden:false,
meta:{
"title": "财务",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215060000,
},
redirect: 'meteringUnit',
name:'finance',
path:"finance",
children:[{
component:'template/view/index',
hidden:false,
meta:{
"title": "发票分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060100,
},
name:'financeClassification',
path:"financeClassification",
},
{
component:'baseData/finance/period/index',
hidden:false,
meta:{
"title": "会计期间",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060200,
},
name:'financePeriod',
path:"financePeriod",
}
]
}
]
}
] ]
// 公共路由 // 公共路由
......
import Vue, { VNode } from 'vue'
declare global {
namespace JSX {
// tslint:disable no-empty-interface
interface Element extends VNode {}
// tslint:disable no-empty-interface
interface ElementClass extends Vue {}
interface IntrinsicElements {
[elem: string]: any
}
}
}
declare module '*.vue' {
import Vue from 'vue'
export default Vue
}
...@@ -7,6 +7,7 @@ import InnerLink from '@/layout/components/InnerLink' ...@@ -7,6 +7,7 @@ import InnerLink from '@/layout/components/InnerLink'
import views from 'common' import views from 'common'
import vue from 'vue' import vue from 'vue'
import commonList from "common/src/commonList" import commonList from "common/src/commonList"
import erpList from "common/src/erpList"
/* 引入common */ /* 引入common */
...@@ -95,6 +96,7 @@ const permission = { ...@@ -95,6 +96,7 @@ const permission = {
let newPowerRoutes=filter(powerRoutes) let newPowerRoutes=filter(powerRoutes)
console.log(newPowerRoutes,'newPowerRoutes') console.log(newPowerRoutes,'newPowerRoutes')
let newCommonList=filter(commonList.list) let newCommonList=filter(commonList.list)
let newErpList=filter(erpList.list)
/* 转化菜单格式*/ /* 转化菜单格式*/
let delArr=[] let delArr=[]
let newmenus=[] let newmenus=[]
...@@ -105,7 +107,7 @@ const permission = { ...@@ -105,7 +107,7 @@ const permission = {
} }
}) })
res.data=[...newCommonList,...newPowerRoutes] res.data=[...newCommonList,...newErpList,...newPowerRoutes]
const sdata = JSON.parse(JSON.stringify(res.data)) const sdata = JSON.parse(JSON.stringify(res.data))
const rdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify(res.data))
const sidebarRoutes = filterAsyncRouter(sdata) const sidebarRoutes = filterAsyncRouter(sdata)
...@@ -146,7 +148,10 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { ...@@ -146,7 +148,10 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
route.component = loadCommonView(route.component) route.component = loadCommonView(route.component)
}else{ }else if(route.erpComponent){
route.component = loadErpView(route.component)
}
else{
route.component = loadView(route.component) route.component = loadView(route.component)
} }
...@@ -239,6 +244,16 @@ export const loadCommonView = (view) => { ...@@ -239,6 +244,16 @@ export const loadCommonView = (view) => {
return (resolve) => require([`common/src/views/${view}`], resolve) return (resolve) => require([`common/src/views/${view}`], resolve)
} }
} }
export const loadErpView = (view) => {
/* 改为common路由*/
if (process.env.NODE_ENV === 'development') {
return (resolve) => require([`common/src/erpViews/${view}`], resolve)
} else {
// 使用 import 实现生产环境的路由懒加载
// return () => import(`@/views/${view}`)
return (resolve) => require([`common/src/erpViews/${view}`], resolve)
}
}
export default permission export default permission
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;">
<el-form label-width="80px" :model="form" >
<el-col :span="24">
<el-form-item label="年度" ref="year" prop="year">
<el-input v-model="form.year"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="上一年" ref="year" prop="year">
<el-input v-model="form.previous"></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
this.form= _.cloneDeep(this.app.singleItem)
this.form.previous= parseInt(this.form.year)-1
},
data() {
return {
form:{
year:'',
previous:''
}
}
},
methods: {
save(){
const copyByPrevious=()=>this.$post('jcsj/kjqj/copyByPrevious',this.form)
this.$post('/jcsj/kjqj/check',this.form).then(res=>{
if(res){
if(res.result=='Y'){
/* 弹框*/
this.$confirm('该年度已有数据,是否覆盖?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(()=>{
copyByPrevious().then(res=>{
if(res.success){
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
})
})
}else{
copyByPrevious().then(res=>{
if(res.success){
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
})
}
// this.$success('操作成功')
// this.app.showDialog=false
// this.app.refresh()
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '类别编码',
prop: 'code',
span: 12,
type: 'input',
},
{
label: '类别名称',
prop: 'name',
span: 12,
type: 'input',
},
{
label: '增值税率(%)',
prop: 'zzsl',
span: 12,
type: 'inputNumber',
},
{
label: '价外税',
prop: 'jws',
span: 12,
type: 'checkbox',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
}
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config" >
<template #dialog="ctx" >
<Normal v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='按照自然年月生成'" :app='ctx.basePage' />
<Copy v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='复刻上一年'" :app='ctx.basePage' />
</template>
<template #toolbar="ctx" >
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="create(ctx.basePage)" size='mini' type="primary">按照自然年月生成</el-button>
<el-button @click="copyLast(ctx.basePage)" size='mini' type="primary">复刻上一年</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
import Normal from './normal.vue'
import Copy from './copy.vue'
export default{
data(){
return{
config:{
url:'jcsj/kjqj',
tableTitle: [
{title: "年度", field: "year", fieldType:"int"},
{title: "期号", field: "month", fieldType:"int", width: 100},
{title: "开始日期", field: "ksrq", fieldType:"ftDate"},
{title: "结束日期", field: "jsrq", fieldType:"ftDate"},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
],
queryParams:[
[
{
label: '年度',
prop: 'year',
span: 6,
type: 'year',
value:''
}
]
]
}
}
},
methods: {
/* 示例*/
create(ctx){
if(ctx.singleItem.id){
ctx.DialogWidth="400px"
ctx.showDialog=true
ctx.DialogTitle="按照自然年月生成"
}else{
this.$warning('请选中一条数据')
}
},
copyLast(ctx){
if(ctx.singleItem.id){
ctx.DialogWidth="400px"
ctx.showDialog=true
ctx.DialogTitle="复刻上一年"
}else{
this.$warning('请选中一条数据')
}
}
},
components:{
Edit,Normal,Copy
}
}
</script>
<style>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;">
<el-form label-width="80px" :model="form" >
<el-col :span="24">
<el-form-item label="年度" ref="year" prop="year">
<el-input v-model="form.year"></el-input>
</el-form-item>
</el-col>
</el-form>
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
this.form= _.cloneDeep(this.app.singleItem)
},
data() {
return {
form:{
year:''
}
}
},
methods: {
save(){
this.$post('/jcsj/kjqj/autoByYear',this.form).then(res=>{
if(res.success){
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</div>
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</DefaultDialog>
</template>
<script>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage :power="power" class="min_full" :config="config" >
<template #dialog="ctx" >
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
power:{
delButton:false,
editButton:true,
operateButtons:true
},
config:{
/* 基本配置*/
url:'jcsj/cwck',
tableTitle: [
{title:"仓库ID",field:"id",width:120,hidden:true},
{title:"仓库编码",field:"code",width:120},
{title:"仓库名称",field:"name",width:140},
{title:"会计单位ID",field:"kjdwid",width:140,hidden:true},
{title:"会计单位编码",field:"kjdwcode",width:120},
{title:"会计单位",field:"kjdwname",width:140},
{title:"计价方法", field: "cbjjff", width: 120,transform:{
url:'jcsj/cwck/init/jjff',label:'name',value:'id'
}
},
{title:"核算对象", field: "cbhsdx", width: 120, fieldType:"tybz"},
{title:"入库单前缀",field:"cwrkdqz",width:120},
{title:"出库单前缀",field:"cwckdqz",width:120},
{title:"调拨过账方式",field:"dbgzfs", width:120},
{title:"过账",field:"gzbz",width:80, fieldType:'tybz'},
{title: "状态",field: "tybz"},
{title: "停用日期",field: "tyrq", fieldType:'ftDate'},
{title:"备注",field:"bz",width:240},
{title:"维护人",field:"whr"},
{title:"维护时间",field:"whsj",fieldType:'ftDateTime'}
],
queryParams:[[
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value:''
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
value:''
}
]],
/* 默认启停用 */
showqt:true,
// qtUrl:'',
/* 树的支持*/
// hasTree:false,
// treeTitle:'',
// treeDefaultProps: {
// children: 'children',
// label: 'name',
// fatherId: 'pid',
// sonId: 'id',
// rootName: "全部",
// rootId:'root'
// },
// treeQueryParams:{
// },
// treeUrl:''
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components:{
Edit
}
}
</script>
<style>
</style>
const config={
'215060100':{
'index':{
config:{
url:'jcsj/fpfl',
tableTitle: [
{title: "类别编码", field: "code", fieldType:"upper", width:120},
{title: "类别名称", field: "name", fieldType:"ftString",width:160},
{title: "增值税率(%)", field: "zzsl", fieldType:"zzsl",width:100},
{"title":"价外税","field":"jws","align":'center',"width":80,fieldType:"yn"},
{title: "备注", field: "bz", width:250},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
],
queryParams:[]
}
},
'edit':{
editColItemList: [
{
label: '类别编码',
prop: 'code',
span: 12,
type: 'input',
},
{
label: '类别名称',
prop: 'name',
span: 12,
type: 'input',
},
{
label: '增值税率(%)',
prop: 'zzsl',
span: 12,
type: 'inputNumber',
},
{
label: '价外税',
prop: 'jws',
span: 12,
type: 'checkbox',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
}
]
}
},
/* 简单模板*/
'215060300':{
'index':{
config:{
url:'jcsj/kjdw',
tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 160},
{title: "名称", field: "name", width: 160},
{title: "全称", field: "fullname", width: 200},
{title: "地址", field: "address", width: 200},
{title: "开户行", field: "bank", width: 200},
{title: "账号", field: "account", width: 200},
{title: "税号", field: "taxid", width: 200},
{title: "法人代表", field: "ceo",width: 140},
{title: "财务主管", field: "cfo",width: 140},
{title: "电话", field: "tel", width: 140},
{title: "传真", field: "fax", width: 140},
{title: "邮箱", field: "email",width: 140},
{title: "停用", field: "tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "备注", field: "bz", width: 250},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
],
queryParams:[
[
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
},
{
label: '名称',
prop: 'name',
span: 6,
type: 'input',
}
]
],
showqt:true,
qtUrl:'jcsj/kjdw/record/qt'
}
},
'edit':{
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true
},
{
label: '全称',
prop: 'fullname',
span: 12,
type: 'input',
},
{
label: '地址',
prop: 'address',
span: 12,
type: 'input',
},
{
label: '开户行',
prop: 'bank',
span: 12,
type: 'input',
},
{
label: '账号',
prop: 'account',
span: 12,
type: 'input',
},
{
label: '税号',
prop: 'taxid',
span: 12,
type: 'input',
},
{
label: '法人代表',
prop: 'ceo',
span: 12,
type: 'input',
},
{
label: '财务主管',
prop: 'cfo',
span: 12,
type: 'input',
},
{
label: '电话',
prop: 'tel',
span: 12,
type: 'input',
},
{
label: '传真',
prop: 'fax',
span: 12,
type: 'input',
},
{
label: '邮箱',
prop: 'email',
span: 12,
type: 'input',
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
}
]
}
}
}
export default config
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<router-view />
</transition>
</section>
</template>
<script>
export default {
name: 'dictionary',
computed: {
cachedViews() {
return this.$store.state.tagsView.cachedViews
},
key() {
return this.$route.path
}
}
}
</script>
<style lang="scss" scoped>
.app-main {
/* 50= navbar 50 */
min-height: calc(100vh - 50px);
width: 100%;
position: relative;
overflow: hidden;
}
.fixed-header+.app-main {
padding-top: 50px;
}
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
}
.fixed-header+.app-main {
padding-top: 84px;
}
}
</style>
<style lang="scss">
// fix css style bug in open el-dialog
.el-popup-parent--hidden {
.fixed-header {
padding-right: 17px;
}
}
</style>
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import config from '../config.js';
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
created() {
const mkid=this.$route.meta.mkid
this.editColItemList=config[mkid].edit.editColItemList
}
}
</script>
<script>
import config from '../config.js';
import Edit from './edit.vue'
export default{
created() {
const mkid=this.$route.meta.mkid
this.config=config[mkid].index.config
},
components:{
Edit
},
render(h) {
return h('BasePage', {
class: 'min_full',
props: {
config: this.config
},
scopedSlots: {
dialog: ctx => h('template'),
toolbar: ctx => h('template')
}
})
},
}
</script>
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