Commit d9f69453 authored by 李苏's avatar 李苏 💬

定制页面同步

parent cef25d85
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||{}
})
}
......@@ -316,8 +316,8 @@ export const powerRoutes = [
path: "khfl",
},
{
erpComponent: true,
component: 'jcsj/kh/khxx/index',
erpComponent: false,
component: 'ccgl/jcsj/kh/khxx/index',
hidden: false,
meta: {
"title": "客户信息",
......@@ -344,8 +344,8 @@ export const powerRoutes = [
path: "gysfl",
},
{
erpComponent: true,
component: 'jcsj/gys/gys/index',
erpComponent: false,
component: 'ccgl/jcsj/gys/gys/index',
hidden: false,
meta: {
"title": "供应商信息",
......
<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">
<Tb v-if='showDialog' :app='this' />
<!-- 查询条件-->
<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>
<el-button @click="tb()" size='mini' type="primary" style="margin-left: 10px;">同步</el-button>
<!-- <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/supplier/info.js';
/* edit页面*/
import Edit from './edit'
import Tb from './tb.vue'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'supplierInfo',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogTitle: '同步',
DialogWidth:'30vw',
// 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: {
tb(){
this.showDialog=true
},
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,Tb
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row v-if="loading" :gutter="20" :app="this" class="editRow">
<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" v-if="(item.show==false)?false:true"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</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>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
/* 初始化数据 */
this.$post('common/datetime',{}).then(res=>{
let nowTime=res.data.data||new Date().getTime()
/* 初始赋值*/
this.nowTime=nowTime
// this.editColItemList[0].value=nowTime-24*60*60*1000
this.editColItemList[0].value=nowTime
this.loading=true
})
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
{
label: '时间',
prop: 'time',
span: 24,
type: 'datetime',
value: '',
"required": true,
},
{
label: '供应商编码',
prop: 'code',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/jcsj/gys/sync/gys',this.form).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.$refs.TablePager.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
}
}
}
</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: '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: 'AuxInput',
typeConfig: {
code: 'SALESPERSON',
label: 'username',
transform: {
value: 'userid',
label: 'username'
}
}
},
{
"label": "销售员",
"prop": "xsyid",
"span": 12,
"type": "AuxInput",
"value": "",
"required": true,
"typeConfig": {
"isRequest": false,
"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>
\ No newline at end of file
<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>
<el-button @click="tb()" size='mini' type="primary" style="margin-left: 10px;">同步</el-button>
<!-- <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/custom/info.js';
/* edit页面*/
import Edit from './edit'
import Tb from './tb.vue'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'customInfo',
/* 初始额外赋值*/
async mounted() {
this.$refs['TablePager'].pageQuery()
},
data() {
return {
/*需要的额外参数 */
showDialog: false,
DialogTitle: '同步',
DialogWidth:'30vw',
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: {
tb(){
this.showDialog=true
},
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
},
/* 基础查询*/
query: doQuery,
/* 基础增*/
apiAdd: doAdd,
/* 基础更新*/
apiUpdate: doUpdate,
/* 删除操作*/
apiDelete: doDelete,
/* 初始化赋值操作*/
// init() {
// }
},
components: {
Edit,Tb
}
}
</script>
<style scoped>
</style>
<template>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row v-if="loading" :gutter="20" :app="this" class="editRow">
<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" v-if="(item.show==false)?false:true"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</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>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
/* 初始化数据 */
this.$post('common/datetime',{}).then(res=>{
let nowTime=res.data.data||new Date().getTime()
/* 初始赋值*/
this.nowTime=nowTime
// this.editColItemList[0].value=nowTime-24*60*60*1000
this.editColItemList[0].value=nowTime
this.loading=true
})
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
{
label: '时间',
prop: 'time',
span: 24,
type: 'datetime',
value: '',
"required": true,
},
{
label: '客户',
prop: 'code',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/jcsj/kh/sync/kh',this.form).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.$refs.TablePager.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
}
}
}
</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