Commit 88e29042 authored by 李苏's avatar 李苏 💬

基础数据部分

parent c71e3edc
...@@ -5,7 +5,7 @@ VUE_APP_TITLE = Gavel ...@@ -5,7 +5,7 @@ VUE_APP_TITLE = Gavel
ENV = 'production' ENV = 'production'
# gavelErp/生产环境 # gavelErp/生产环境
VUE_APP_BASE_API = '/dev-api' VUE_APP_BASE_API = '/wmsapp/wmsappServie'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
\ No newline at end of file
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/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||{}
})
}
...@@ -148,6 +148,218 @@ export const powerRoutes=[ ...@@ -148,6 +148,218 @@ export const powerRoutes=[
] ]
}, },
/* 客户分类*/
{
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",
}
]
}
] ]
} }
......
<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: 'usercode',
span: 12,
type: 'input',
required:'true',
},
{
label: '姓名',
prop: 'username',
span: 12,
type: 'input',
required:true,
},
{
label: '手机号',
prop: 'phone',
span: 12,
type: 'inputNumber',
rule:'phone'
},
{
label: '部门',
prop: 'bmid',
span: 12,
type: 'RelSelect',
typeConfig:{
match:{
key:'bmid',
value:'bmmc',
},
src:'/kzzx/bm/query'
}
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="min_full">
<!-- 查询条件-->
<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>
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryXsckBm' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">人员信息:</span>
<el-input v-model="queryParams.userinfo"></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>
<ImportPersonnelButton @save="save" />
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
importXsry
} from '@/api/baseData/custom/attribute.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'customAttribute',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
// showDialog: false,
// DialogName: '',
// type: '',
// DialogTitle: '',
/* 基础url*/
baseUrl: 'csj/xsry',
/* 查询参数*/
queryParams: {
userinfo: '',
bmid: ''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "人员编码",field: "usercode",width:140},
{title: "姓名", field: "username",width:140},
{title: "人员编码", field: "userid", fieldType:"ftString",width:140,hidden:true},
{title: "部门编码", field: "bmid", fieldType:"ftString",width:140,hidden:true},
{title: "部门名称", field: "bmName", fieldType:"ftString",width:140},
{title: "备注", field: "bz", fieldType:"ftString",width:240},
{title: "维护人", field: "whr", fieldType:"username"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
]
}
},
methods: {
save(list){
importXsry({
userList:list
}).then(res=>{
if(res.success){
this.$success('添加成功')
this.$refs['TablePager'].pageQuery()
}
})
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
// init() {
// }
},
components: {
Edit,
}
}
</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>
<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'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete
} from '@/api/baseData/custom/classification.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'customClassification',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogName: '',
type: '',
DialogTitle: '',
/* 基础url*/
baseUrl: 'jcsj/khfl',
/* 查询参数*/
queryParams: {
info: '',
gsid: ''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "编码", field: "code", fieldType:"upper",width: 140},
{title: "名称", field: "name", width: 160},
{title: "停用", field: "tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "备注", field: "bz",width: 250},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
]
}
},
methods: {
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
init() {
}
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
<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 {
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: 'fullname',
span: 12,
type: 'input',
},
{
label: '联系人',
prop: 'lxr',
span: 12,
type: 'input',
},
{
label: '电话',
prop: 'tel',
span: 12,
type: 'input',
},
{
label: '邮箱',
prop: 'email',
span: 12,
type: 'input',
},
{
label: '传真',
prop: 'fax',
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: 'xsyid',
// span: 12,
// type: 'input',
// },
{
label: '销售员',
prop: 'xsyid',
span: 12,
type: 'AuxInput',
typeConfig:{
code:'SALESPERSON',
label:'username',
transform:{
value:'userid',
label:'username'
}
}
},
{
label: '客户分类',
prop: 'khflid',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'/jcsj/khfl/query'
}
},
{
label: '开票单位',
prop: 'kpkhid',
span: 12,
type: 'AuxInput',
typeConfig:{
code:'CUSTOM',
label:'kpdwname',
transform:{
value:'id',
label:'name'
}
}
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="min_full">
<!-- 查询条件-->
<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.code"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">联系人:</span>
<el-input v-model="queryParams.lxr"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">选择:</span>
<RelSelect style="width: 100%;" src='jcsj/common/tybz/query' filterable clearable
:match="{value:'id',label:'name'}" v-model='queryParams.tybz'></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>
<ExportTempButton :url="'jcsj/kh/excel/export'" :exportName="'客户信息导入模板.xlsx'" ></ExportTempButton>
<ImportTempButton @success="()=>{
$refs['TablePager'].pageQuery()
}" :url="'jcsj/kh/import'"></ImportTempButton>
<!-- <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 '@/api/baseData/custom/info.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'customInfo',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
// showDialog: false,
// DialogName: '',
// type: '',
// DialogTitle: '',
/* 基础url*/
baseUrl: 'jcsj/kh',
/* 查询参数*/
queryParams: {
code: '',
lxr: '',
tybz:''
},
/* 表格标题对应参数*/
tableTitle: [ {title: "客户编码", field: "code", fieldType:"upper", width: 120},
{title: "客户名称", field: "name", width: 140},
{title: "联系人", field: "lxr", width: 140},
{title: "电话", field: "tel", width: 120},
{title: "邮箱", field: "email", width: 120},
{title: "地址", field: "address", width: 200},
{title: "开票单位ID", field: "kpkhid", hidden:true},
{title: "开票单位", field: "kpdwname", width: 160},
{title: "开户银行", field: "bank", width: 140},
{title: "账号", field: "account", width: 140},
{title: "税号", field: "taxid", width: 140},
{title: "法人代表", field: "ceo", width: 140},
{title: "财务主管", field: "cfo", width: 140},
{title: "销售员", field: "username", width: 140},
{title: "附件数", field: "attachcount", fieldType:"int"},
{title: "状态", field: "tybz", fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "备注", field: "bz", width: 240},
{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 == 'Y' ? true : false)
return nTy
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
// init() {
// }
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<!-- 填写表单内容,slot=form必写--> <!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this"> <el-row :gutter="20" :app="this">
<EditColItem :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" /> <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-row>
</el-form> </el-form>
</RelDialog> </RelDialog>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
prop: 'name', prop: 'name',
span: 6, span: 6,
type: 'input', type: 'input',
rule:'required', required:true,
}, },
{ {
label: '物料分类', label: '物料分类',
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
typeConfig:{ typeConfig:{
src:"jcsj/jldw/query" src:"jcsj/jldw/query"
}, },
rule:'required', required:true,
}, },
{ {
...@@ -131,8 +131,25 @@ ...@@ -131,8 +131,25 @@
type: 'RelSelect', type: 'RelSelect',
typeConfig:{ typeConfig:{
src:"jcsj/gys/query" src:"jcsj/gys/query"
}
}, },
}, /* 测试*/
// {
// label: '供应商',
// prop: 'gysid',
// span: 6,
// type: 'AuxInput',
// typeConfig:{
// isRequest:true,
// code:'METERIALINFOEDIT_TEST',
// label:'gysname',
// transform:{
// value:'GYS_ID',
// label:'GYS_NAME'
// }
// },
// },
{ {
label: '物料形态', label: '物料形态',
prop: 'wlxt', prop: 'wlxt',
...@@ -168,13 +185,32 @@ ...@@ -168,13 +185,32 @@
label: '产品结构号', label: '产品结构号',
prop: 'bomid', prop: 'bomid',
span: 6, span: 6,
type: 'input' type: 'AuxInput',
typeConfig:{
isRequest:true,
code:'METERIALINFOEDIT_BOMID',
label:'BOMID',
transform:{
value:'BOMID',
label:'BOMID'
}
},
}, },
{ {
label: '工艺路线号', label: '工艺路线号',
prop: 'gylxid', prop: 'gylxid',
span: 6, span: 6,
type: 'input' type: 'AuxInput',
typeConfig:{
isRequest:true,
code:'METERIALINFOEDIT_BOMID',
label:'BOMID',
transform:{
value:'BOMID',
label:'BOMID'
}
}
}, },
{ {
label: '库存期限', label: '库存期限',
...@@ -182,23 +218,37 @@ ...@@ -182,23 +218,37 @@
span: 6, span: 6,
type: 'input' type: 'input'
}, },
/* 开始*/
{ {
label: '订货部门', label: '订货部门',
prop: 'dhbmid', prop: 'dhbmid',
span: 6, span: 6,
type: 'input' type: 'RelSelect',
typeConfig:{
src:"jcsj/common/bm/query",
match:{
key:'bmid',
value:"bmmc"
}
},
}, },
{ {
label: '计划方法', label: '计划方法',
prop: 'jhff', prop: 'jhff',
span: 6, span: 6,
type: 'input' type: 'RelSelect',
typeConfig:{
src:"jcsj/wlxx/init/jhff",
},
}, },
{ {
label: '订货类型', label: '订货类型',
prop: 'dhlx', prop: 'dhlx',
span: 6, span: 6,
type: 'input' type: 'RelSelect',
typeConfig:{
src:"jcsj/wlxx/init/dhlx",
},
}, },
{ {
label: '条码规则', label: '条码规则',
...@@ -210,19 +260,28 @@ ...@@ -210,19 +260,28 @@
label: '计划部门', label: '计划部门',
prop: 'jhbmid', prop: 'jhbmid',
span: 6, span: 6,
type: 'input' type: 'RelSelect',
typeConfig:{
src:"jcsj/common/bm/query",
match:{
key:'bmid',
value:"bmmc"
}
}
}, },
{ {
label: '主生产计划 ', label: '主生产计划 ',
prop: 'mps', prop: 'mps',
span: 6, span: 6,
type: 'input' type: 'checkbox',
value:'N'
}, },
{ {
label: '定制生产', label: '定制生产',
prop: 'dzsc', prop: 'dzsc',
span: 6, span: 6,
type: 'input' type: 'checkbox',
value:'N'
}, },
{ {
label: '单件净重', label: '单件净重',
......
<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 {
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: 'hl',
span: 12,
type: 'inputNumber',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config" >
<template #dialog="ctx" >
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="setting(ctx.basePage)" size='mini' type="primary">设置本位币</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
config:{
/* 基本配置*/
url:'jcsj/hb',
tableTitle: [
{title: "货币编码", field: "code", fieldType:"upper", width: 120},
{title: "货币名称", field: "name", width: 120},
{title: "本位币", field: "bwb", width: 100,fieldType:"yn"},
{title: "汇率", field: "hl",width: 100, fieldType:"float"},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "备注", field: "bz", width: 260},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
],
queryParams:[],
}
}
},
methods: {
/* 示例*/
setting(basePage){
if (basePage.selectOne || basePage.clickOne) {
this.$post('jcsj/hb/setbwb',basePage.singleItem).then(e=>{
if(e.success){
basePage.$success('操作成功')
basePage.$refs['TablePager'].reLoad()
}
})
} else {
basePage.$warning('请选中一行操作');
}
}
},
components:{
Edit
}
}
</script>
<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: 'type',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'jcsj/fzjldw/init/type'
},
required:true,
},
{
label: '控制方式',
prop: 'kzfs',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'jcsj/fzjldw/init/kzfs'
},
required:true,
},
{
label: '计量单位',
prop: 'jldw',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'/jcsj/jldw/query'
},
required:true,
},
{
label: '替代计量单位',
prop: 'fjldw',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'/jcsj/jldw/query'
},
required:true,
},
{
label: '数量',
prop: 'sl',
span: 12,
type: 'inputNumber',
required:true,
},
{
label: '换算数量',
prop: 'hssl',
span: 12,
type: 'inputNumber',
required:true,
},
{
label: '换算系数',
prop: 'hsxs',
span: 12,
type: 'inputNumber',
},
{
label: '物料编码',
prop: 'wlid',
span: 12,
type: 'AuxInput',
typeConfig:{
code:'MATERIAL',
label:'wlmc',
transform:{
value:'id',
label:'name'
}
},
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage 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{
config:{
/* 基本配置*/
url:'/jcsj/fzjldw',
tableTitle: [
{"title": "替代类型", "field": "type", "width": 100,
transform:{
url:'jcsj/fzjldw/init/type',label:'name',value:'id'
}
},
{"title":"物料名称","field":"wlmc","width":140},
{"title":"数量","field":"sl",fieldType:"float","width":80},
{"title":"计量单位","field":"jldwname","width":100,align:"center"},
{"title":"换算数量","field":"hssl",fieldType:"float","width":80},
{"title":"替代计量单位","field":"fjldwname","width":100,align:"center"},
{"title":"换算系数","field":"hsxs","width":100, fieldType:"price"},
{"title": "控制方式", "field": "kzfs", "width": 100, align: "center",
transform:{
url:'jcsj/fzjldw/init/kzfs',label:'name',value:'id'
}
},
{"title":"备注","field":"bz","width":200},
{"title":"维护人","field":"whr"},
{"title":"维护时间","field":"whsj",fieldType:'ftDateTime'}
],
queryParams:[[
{
label: '替代类型',
prop: 'type',
span: 6,
type: 'RelSelect',
typeConfig:{
src:'jcsj/fzjldw/init/type'
}
}
]],
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components:{
Edit
}
}
</script>
<style>
</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: 'name',
span: 24,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<BasePage class="min_full" :config="config">
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
data() {
return {
config: {
/* 基本配置*/
url: 'jcsj/jldw',
tableTitle: [{
"title": "计量单位",
"field": "name",
"width": 140
},
{
"title": "备注",
"field": "bz",
"width": 200
},
{
"title": "维护人",
"field": "whr"
},
{
"title": "维护时间",
"field": "whsj",
fieldType: 'ftDateTime'
}
],
queryParams: [
[{
label: '计量单位',
prop: 'name',
span: 6,
type: 'input',
value: ''
}]
],
}
}
},
components: {
Edit
}
}
</script>
<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: 'usercode',
span: 12,
type: 'input',
required:'true',
},
{
label: '姓名',
prop: 'username',
span: 12,
type: 'input',
required:true,
},
{
label: '手机号',
prop: 'phone',
span: 12,
type: 'inputNumber',
rule:'phone'
},
{
label: '部门',
prop: 'bmid',
span: 12,
type: 'RelSelect',
typeConfig:{
match:{
key:'bmid',
value:'bmmc',
},
src:'/kzzx/bm/query'
}
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="min_full">
<!-- 查询条件-->
<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>
<RelSelect style="width: 100%;" src='jcsj/common/bm/queryXsckBm' filterable clearable
:match="{value:'id',label:'bmmc'}" v-model='queryParams.bmid'></RelSelect>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">人员信息:</span>
<el-input v-model="queryParams.userinfo"></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>
<ImportPersonnelButton :query="getCgryForImp" @save="save" />
<!-- 额外按钮-->
<!-- 表头设置 -->
<!-- 权限-->
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
import {
doQuery,
doAdd,
doUpdate,
doDelete,
importCgry,
getCgryForImp
} from '@/api/baseData/supplier/attribute.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'supplierAttribute',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
getCgryForImp:getCgryForImp,
/*需要的额外参数 */
// showDialog: false,
// DialogName: '',
// type: '',
// DialogTitle: '',
/* 基础url*/
baseUrl: 'csj/cgry',
/* 查询参数*/
queryParams: {
userinfo: '',
bmid: ''
},
/* 表格标题对应参数*/
tableTitle: [
{title: "人员编码",field: "usercode",width:140},
{title: "姓名", field: "username",width:140},
{title: "人员编码", field: "userid", fieldType:"ftString",width:140,hidden:true},
{title: "部门编码", field: "bmid", fieldType:"ftString",width:140,hidden:true},
{title: "部门名称", field: "bmName", fieldType:"ftString",width:140},
{title: "备注", field: "bz", fieldType:"ftString",width:240},
{title: "维护人", field: "whr", fieldType:"username"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"}
]
}
},
methods: {
save(list){
importCgry({
userList:list
}).then(res=>{
if(res.success){
this.$success('添加成功')
this.$refs['TablePager'].pageQuery()
}
})
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
// init() {
// }
},
components: {
Edit,
}
}
</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 class="min_full" :config="config" >
<template #dialog="ctx" >
</template>
<template #toolbar="ctx" >
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
config:{
/* 基本配置*/
url:'jcsj/gysfl',
tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 140},
{title: "名称", field: "name", width: 140},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{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,
}
}
},
methods: {
},
components:{
Edit
}
}
</script>
<style>
</style>
<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 {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '供应商编码',
prop: 'code',
span: 12,
type: 'input',
},
{
label: '供应商名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '简称',
prop: 'fullname',
span: 12,
type: 'input',
},
{
label: '联系人',
prop: 'lxr',
span: 12,
type: 'input',
},
{
label: '电话',
prop: 'tel',
span: 12,
type: 'input',
},
{
label: '邮箱',
prop: 'email',
span: 12,
type: 'input',
},
{
label: '传真',
prop: 'fax',
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: 'cgyid',
span: 12,
type: 'AuxInput',
typeConfig:{
code:'PURCHASER',
label:'username',
transform:{
value:'userid',
label:'username'
}
}
},
{
label: '供应商分类',
prop: 'gysflid',
span: 12,
type: 'RelSelect',
typeConfig:{
src:'/jcsj/gysfl/query'
}
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="min_full">
<!-- 查询条件-->
<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.code"></el-input>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">名称:</span>
<el-input v-model="queryParams.name"></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>
<ExportTempButton :url="'jcsj/gys/excel/export'" :exportName="'供应商信息导入模板.xlsx'" ></ExportTempButton>
<ImportTempButton @success="()=>{
$refs['TablePager'].pageQuery()
}" :url="'jcsj/gys/import'"></ImportTempButton>
<!-- <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 '@/api/baseData/supplier/info.js';
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'supplierInfo',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
// showDialog: false,
// DialogName: '',
// type: '',
// DialogTitle: '',
/* 基础url*/
baseUrl: 'jcsj/gys',
/* 查询参数*/
queryParams: {
code: '',
name: '',
},
/* 表格标题对应参数*/
tableTitle: [
{title: "供应商编码", field: "code", fieldType:"upper", width: 140},
{title: "供应商名称", field: "name", width: 140},
{title: "简称", field: "fullname", width: 160},
{title: "联系人", field: "lxr", width: 160},
{title: "电话", field: "tel", width: 120},
{title: "邮箱", field: "email", width: 120},
{title: "传真", field: "fax", width: 120},
{title: "地址", field: "address", width: 120},
{title: "开户银行", field: "bank", width: 120},
{title: "账号", field: "account", width: 120},
{title: "税号", field: "taxid", width: 120},
{title: "法人代表", field: "ceo", width: 120},
{title: "财务主管", field: "cfo", width: 120},
{title: "采购员", field: "username", width: 120},
{title: "附件数", field: "attachcount", fieldType:"int"},
{title: "状态", field: "tybz",fieldType:'tybz'},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "备注", field: "bz", width: 250},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
{title: "创建人",field:"cjr", hidden:true},
{title: "创建时间",field:"cjsj",fieldType:'ftDateTime', hidden:true}
]
}
},
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 == 'Y' ? true : false)
return nTy
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
// init() {
// }
},
components: {
Edit,
}
}
</script>
<style scoped>
</style>
...@@ -138,6 +138,15 @@ module.exports = { ...@@ -138,6 +138,15 @@ module.exports = {
} }
} }
}) })
// config
// // https://webpack.js.org/configuration/devtool/#development
// .when(process.env.NODE_ENV === 'development',
// config => config.devtool('cheap-source-map') // 公司项目一开始的配置,一开始源码映射调试是没问题的,不知从什么时候起就失效了 // 亲测无效
// config => config.devtool('eval-source-map') // 亲测可用
// config => config.devtool('source-map') // 亲测可用
// config => config.devtool('cheap-module-source-map') // 亲测可用
// config => config.devtool('cheap-module-eval-source-map') // 亲测可用(荐)
// )
config.optimization.runtimeChunk('single'), config.optimization.runtimeChunk('single'),
{ {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
......
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