Commit 2c9b7871 authored by 李苏's avatar 李苏 💬

调整

parent df3347c2
export default (item)=>{
/* 默认路径为原路径*/
if(item.meta&&item.meta.mkid){
if(item.meta.mkid=='215020200'){
item.erpComponent=false
}
}
}
...@@ -158,6 +158,35 @@ export const powerRoutes=[ ...@@ -158,6 +158,35 @@ export const powerRoutes=[
name: 'pcsxsz', name: 'pcsxsz',
path: "pcsxsz", path: "pcsxsz",
}, },
{
erpComponent: false,
component: 'jcsj/wl/wlxx/index',
hidden: false,
meta: {
"title": "物料维护",
"icon": "",
"noCache": false,
"link": null,
"mkid": 920010900,
},
name: 'wlxx',
path: "wlxx",
},
{
erpComponent: false,
component: 'ccgl/jcsj/swlx/index',
hidden: false,
meta: {
"title": "事务类型",
"icon": "",
"noCache": false,
"link": null,
"mkid": 920011300,
},
name: 'swlx',
path: "swlx",
},
], ],
}, },
/* 入库管理 */ /* 入库管理 */
......
...@@ -8,7 +8,8 @@ import views from 'common' ...@@ -8,7 +8,8 @@ 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" import erpList from "common/src/erpList"
/* 引入common */ /* 过滤mkid相同的定制路由 */
import filterRoutes from '@/router/filterRoutes.js'
const permission = { const permission = {
...@@ -103,6 +104,7 @@ const permission = { ...@@ -103,6 +104,7 @@ const permission = {
function filter (data) { function filter (data) {
var newData = data.filter( var newData = data.filter(
(item)=>{ (item)=>{
filterRoutes(item)
let hasMkid=false let hasMkid=false
asymenus.forEach(e=>{ asymenus.forEach(e=>{
if((e.mkid==item.meta.mkid)||(item.meta.mkid=='test')){ if((e.mkid==item.meta.mkid)||(item.meta.mkid=='test')){
......
<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 :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="系统类型" ref="xtswlxid" prop="xtswlxid">
<!-- <el-input :readonly="readonly" v-model="form.name" ></el-input> -->
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='jcsj/swlx/getXtswlx' :match="{value:'id',label:'name'}" v-model='form.xtswlxid' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
xtswlxid:"",
code:'',
name:'',
bz:''
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div class="min_full">
<!-- 查询条件-->
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" fixed="right" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
qt
} from 'common/src/erpApi/baseData/store/actionType.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'storeActionType',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'jcsj/swlx',
/* 查询参数*/
queryParams: {
},
/* 表格标题对应参数*/
tableTitle: [
{title:"编码",field:"code",width:100},
{title:"名称",field:"name",width:120},
{title:"系统类型",field:"xtswlxName",width:120},
{title:"状态",field: "tybz",
formatter:function(a,b,c){
let map={
Y:'禁用',
N:'正常'
}
return map[c]
}
},
{title:"停用日期",field: "tyrq",fieldType:'ftDate'},
{title:"备注",field:"bz",width:240},
{title:"维护人",field:"whr"},
{title:"维护时间",field:"whsj",fieldType:'ftDateTime'},
{title: "创建人",field:"cjr", hidden:true},
{title: "创建时间",field:"cjsj",fieldType:'ftDateTime', hidden:true}
]
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qt(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<TreeBase :dgtype='5' :app='app' @selected='selectedTree'></TreeBase>
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">信息:</span>
<el-input v-model="queryParams.info"></el-input>
</div>
</el-col>
<el-col :span="4" class="search-col">
<div class="search-item">
<span class="search-span">选择:</span>
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryGs' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.gsid'></RelSelect>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<!-- <AttachFileButton :app='app' ></AttachFileButton> -->
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</div>
</template>
<script>
import {
apiTreeQuery
// doQuery,
// doAdd,
// doUpdate,
// doDelete
} from 'common/src/api/documentManagement/folder.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: '功能名称',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/* 树的标题 */
treeTitle: '文件管理',
treeDefaultProps: {
/* 构建递归的children */
children: 'children',
/* 展示的参数 */
label: 'name',
/* 父id */
fatherId: 'pid',
/* 子id */
sonId: 'id',
/* 无父节点构建root 的属性 type=5生效 */
rootName: "根节点",
rootId:'root'
},
treeQueryParams: {
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: '请填写',
/* 查询参数*/
queryParams: {
info: '',
gsid: ''
},
/* 表格标题对应参数*/
tableTitle: [{
label: "备注",
prop: "bz",
fieldType: "ftString",
width: 300
}]
}
},
methods: {
selectedTree(e) {
console.log(e)
// this.queryParams.bmid=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
// /* 基础查询*/
query: apiTreeQuery,
// /* 基础增*/
// apiAdd: doAdd,
// /* 基础更新*/
// apiUpdate: doUpdate,
// /* 删除操作*/
// apiDelete: doDelete,
apiTreeQuery: apiTreeQuery,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
...@@ -23,11 +23,11 @@ ...@@ -23,11 +23,11 @@
<div class="search-item"> <div class="search-item">
<span class="search-span">唯一码:</span> <span class="search-span">唯一码:</span>
<AuxInput :transform="{ <AuxInput :transform="{
value:'id', value:'packid',
label:'code'}" :match="{ label:'packCode'}" :match="{
label:'packcode', label:'packCode',
value:'packid' value:'packid'
}" code='WMSBCGL' :form='form' /> }" code='WMSBZGLMX' :form='form' />
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
...@@ -157,12 +157,12 @@ ...@@ -157,12 +157,12 @@
}, },
search() { search() {
/* 卡下数据*/ /* 卡下数据*/
if (this.form.packid&&this.form.rqid) { if (this.form.packCode&&this.form.rqid) {
// this.$refs.basePage.queryParams.code = this.form.packcode // this.$refs.basePage.queryParams.code = this.form.packCode
// this.$refs.basePage.refresh() // this.$refs.basePage.refresh()
/* 查询*/ /* 查询*/
let params={ let params={
code:this.form.packcode code:this.form.packCode
} }
this.$post('wms/common/queryPackmxByCode',params).then(res=>{ this.$post('wms/common/queryPackmxByCode',params).then(res=>{
if(res.success){ if(res.success){
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
this.form['rqCode']='' this.form['rqCode']=''
this.form['rqid']='' this.form['rqid']=''
this.form['packid']='' this.form['packid']=''
this.form['packcode']='' this.form['packCode']=''
this.$forceUpdate() this.$forceUpdate()
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
queryDetail: true, queryDetail: true,
/* 基本配置*/ /* 基本配置*/
url: 'wms/rkgl/rktz', url: 'wms/rkgl/rktz',
queryUrl:'wms/rkgl/sjtz/query/rktz',
tableTitle: [{ tableTitle: [{
title: "状态", title: "状态",
field: "zt", field: "zt",
......
<template>
<RelDialog width="80%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<!-- 填写表单内容,slot=form必写-->
<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],
mounted() {
/* 动态生成物料属性*/
this.$post('jcsj/common/wlsx/query').then(res => {
let list = res.data.records || []
/* 构建editColItemList*/
let map = {
S: 'input',
F: 'inputNumber',
I: 'inputNumber',
D: 'date',
}
list.forEach(item=>{
let colItem={
label: item.name,
prop: item.field,
span: 6,
type: map[item.type]||'input',
}
if(item.show=='Y'){
this.editColItemList.push(colItem)
}
})
})
},
data() {
return {
editColItemList: [{
label: '物料编码',
prop: 'code',
span: 6,
type: 'input',
},
{
label: '物料名称',
prop: 'name',
span: 6,
type: 'input',
required: true,
},
{
label: '物料分类',
prop: 'flid',
span: 6,
type: 'RelSelect',
typeConfig: {
src: "jcsj/wlxx/init/wlfl"
}
},
{
label: '规格',
prop: 'gg',
span: 6,
type: 'input'
},
{
label: '计量单位',
prop: 'jldw',
span: 6,
type: 'RelSelect',
typeConfig: {
src: "jcsj/jldw/query"
},
required: true,
},
{
label: '辅计量单位',
prop: 'fjldw',
span: 6,
type: 'RelSelect',
typeConfig: {
src: "jcsj/jldw/query"
},
},
{
label: '批号管理',
prop: 'phgl',
span: 6,
type: 'checkbox',
value: 'N'
},
{
label: '库存期限',
prop: 'kcqx',
span: 6,
type: 'input'
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div style="display: flex;">
<div class="min_full" style="width: 200px;border-right: 0px;">
<LazyTree treeTitle='物料分类' @selected='selectedTree' url='jcsj/wlfl/queryroot' />
</div>
<div class="min_full" style="width: calc(100% - 200px)">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">条件:</span>
<el-input v-model="queryParams.condition"></el-input>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<ToolButton :app='app'></ToolButton>
<ViewButton ref="view" :app='app'></ViewButton>
<AddButton ref="add" :app='app'></AddButton>
<CopyButton ref="copy" :app='app'></CopyButton>
<EditButton ref="edit" :app='app'></EditButton>
<AttachFileButton :app='app' ></AttachFileButton>
<ExportTempButton :url="'jcsj/wlxx/excel/export'" :exportName="'物料信息导入模板.xlsx'" ></ExportTempButton>
<ImportTempButton @success="()=>{
$refs['TablePager'].pageQuery()
}" :url="'jcsj/wlxx/import'"></ImportTempButton>
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
<template slot="tabCustom">
<el-table-column label="启用/停用" width="90" header-align="center" fixed="right" >
<template slot-scope="scope">
<el-switch @click.native="setEnable(scope.row.id)" :value='tybz(scope)' style="width: 80px;justify-content: center;"
active-color="#13ce66" inactive-color="#eee">
</el-switch>
</template>
</el-table-column>
</template>
</TablePager>
</div>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
apiTreeQuery,
qt
} from 'common/src/erpApi/baseData/material/info.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'materialInfo',
/* 初始额外赋值*/
async mounted() {
// this.$refs['TablePager'].pageQuery()
},
data() {
return {
/* 树的标题 */
treeTitle: '物料分类',
treeDefaultProps: {
/* 构建递归的children */
children: 'children',
/* 展示的参数 */
label: 'name',
/* 父id */
fatherId: 'pid',
/* 子id */
sonId: 'id',
/* 无父节点构建root 的属性 type=5生效 */
rootName: "全部",
rootId:'root'
},
treeQueryParams: {
},
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'jcsj/wlxx',
/* 查询参数*/
queryParams: {
condition:''
},
/* 表格标题对应参数*/
tableTitle: [
{title:"物料编码",field:"code",width:120},
{title:"物料名称",field:"name",width:160},
{title:"规格",field:"gg",width:120},
{title:"计量单位",field:"jldwname",width:80},
{title:"辅计量单位",field:"fjldwname",width:80,align:"center"},
// {title:"采购计量单位",field:"cgjldwname",width:80,align:"center"},
{title:"增值税率(%)",field:"zzsl", fieldType:"zzsl", width: 100},
{title:"批号管理",field:"phgl",width:80,formatter(a,b,v){
let map={
Y:'停用',
N:'正常'
}
return map[v]
}},
{title:"单件管理",field:"djgl",width:80,formatter(a,b,v){
let map={
Y:'停用',
N:'正常'
}
return map[v]
}},
{title:"产品条码规则",field:"coderulename",width:160},
{title:"缺省仓库",field:"ckname", width:120},
{title:"计划部门",field:"jhbmmc",width:120},
{title:"产品结构号",field:"bomcode", width:120},
{title:"工艺路线号",field:"gylxcode", width:120},
{title:"状态",field:"tybz",width:80,formatter(a,b,v){
let map={
Y:'停用',
N:'正常'
}
return map[v]
}},
{title:"停用日期",field:"tyrq",fieldType:'ftDate'},
{title:"备注",field:"bz",width:200},
{title:"维护人",field:"whr"},
{title:"维护时间",field:"whsj",fieldType:'ftDateTime'}
]
}
},
methods: {
setEnable(id) {
this.$confirm('是否启用/停用, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {
id: id
}
qt(params).then(res => {
if (res.success) {
this.$success('操作成功')
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '操作失败')
}
})
})
},
tybz(a) {
let nTy = false
nTy = (a.row.tybz == 'N' ? true : false)
return nTy
},
selectedTree(e) {
this.queryParams.flbm=e.id||'root'
this.$refs['TablePager'].pageQuery()
},
// /* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
apiTreeQuery: apiTreeQuery,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</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