Commit 1facc496 authored by rex's avatar rex

Merge branch 'dev' into 'master'

Dev

See merge request !3
parents f049cbf9 d55887d4
......@@ -8,7 +8,11 @@ export const customer = {
updateUrl: '/customer/update',
deleteUrl: '/customer/delete',
}
//查询省级供应商待审批列表
export const province = {
searchUrl: '/customer/searchProcessCustomer',
}
// 查询全部代理商数据
export function getAllData(data) {
return request({
......@@ -17,6 +21,52 @@ export function getAllData(data) {
data
})
}
// 新增代理商
export function customerCreate(data) {
return request({
url: '/customer/create',
method: 'post',
data
})
}
// 查询省
export function provinceSearch(data) {
return request({
url: '/province/searchAll',
method: 'post',
data
})
}
// 查询市
export function citySearch(data){
return request({
url: '/city/searchAll',
method: 'post',
data
})
}
// 查询市
export function districtSearch(data){
return request({
url: '/district/searchAll',
method: 'post',
data
})
}
// 客户发布记录
// 签约产品组
export function searchProduct(data) {
return request({
method: 'post',
url: '/commonSession/searchAll',
data
})
}
// // 客户发布记录
// export const releaseRecord = {
// createUrl: '/releaserecord/create',
......@@ -65,13 +115,6 @@ export function getAllData(data) {
// })
// }
// // 一级分类
// export function fetchFirstLevelClassification() {
// return request({
// method: 'post',
// url: '/levelClassification/searchAllOne'
// })
// }
// // 二级分类
// export function fetchSecondLevelClassification(data) {
......@@ -91,14 +134,14 @@ export function getAllData(data) {
// })
// }
// // 客户项目信息
// export const project = {
// createUrl: '/project/create',
// searchUrl: '/project/search',
// detailUrl: '/project/getOne',
// updateUrl: '/project/update',
// deleteUrl: '/project/delete'
// }
// 客户项目信息
export const project = {
createUrl: '/address/create',
searchUrl: '/address/search',
detailUrl: '/address/getOne',
updateUrl: '/address/update',
deleteUrl: '/address/delete'
}
// // 客户市场信息
// export const market = {
......@@ -211,15 +254,14 @@ export function getAllData(data) {
// updateUrl: '/paymentTerm/updateDetail'
// }
// // 客户附件
// export const file = {
// createUrl: '/file/create',
// searchUrl: '/file/search',
// detailUrl: '/file/getOne',
// updateUrl: '/file/update',
// deleteUrl: '/file/delete',
// deleteDetailUrl: '/file/deleteDetail'
// }
// 客户附件
export const file = {
createUrl: '/create',
searchUrl: '/search',
detailUrl: '/getOne',
updateUrl: '/update',
deleteUrl: '/delete',
}
// export const businessLog = {
// searchUrl: '/businessLog/search'
......
......@@ -424,6 +424,7 @@ export default {
'module': 'OpportunityPhaseTask'
},
flowDefinitions: 'flow/definition/getAllEnum',
flowNodesByDefinition: 'flow/node/getAllEnumByDefinitionId?definitionId=1424712643570155522',
......
......@@ -173,5 +173,26 @@ export default {
layout: 12
}
}
},
// 公司企称
qcc: {
searchUrl: '/qcc/search',
formDesc: {
Name: {
label: '公司名称',
type: 'input',
layout: 12
},
OperName: {
label: '法人',
type: 'input',
layout: 12
},
CreditCode: {
label: '社会统一信用代码',
type: 'input',
layout: 12
}
}
}
}
......@@ -11,3 +11,7 @@ export const Country = {
export const Customer = {
searchUrl: '/customer/create',
}
export const Common = {
searchUrl: '/commonSession/searchAll',
}
\ No newline at end of file
......@@ -248,7 +248,7 @@ export default {
const params = this.$translateToC4CData(data)
delete params.total
this.$request(url, params).then(res => {
this.tableData = res.results || []
this.tableData = res.results.Result || []
this.pageData.total = Number(res.totalSize || 0)
this.loading = false
})
......
import LovComponent from './index.vue'
const Lovs = {
install: function(Vue) {
Vue.component(LovComponent.name, LovComponent)
}
}
export default Lovs
<template>
<div
class="lovs"
style="width: 100%"
>
<el-input
v-model="text"
:readonly="true"
:disabled="disabled"
:placeholder="placeholder ? placeholder : '请选择'"
style="width: 100%"
@mouseenter.native="hovering = true"
@mouseleave.native="hovering = false"
@focus="focused = true"
@blur="focused = false"
>
<i
v-if="clearable && showClear"
slot="suffix"
class="el-input__icon el-icon-circle-close el-input__clear"
@click="clear"
/>
<i
v-if="!disabled"
slot="suffix"
class="el-input__icon el-icon-search"
@click="createLovTable"
/>
</el-input>
<el-dialog
v-el-drag-dialog
:visible.sync="dialogTableVisible"
:title="'请选择'+label"
width="50%"
class="lov-dialog"
:append-to-body="true"
:before-close="handleClose"
@opened="onPreviewDialogOpened"
@dragDialog="handleDrag"
>
<el-row class="rowbig">
<el-col
:span="16"
class="dynamic-class"
>
<ele-form
v-model="searchData"
v-bind="formConfig"
/>
</el-col>
<el-col :span="8">
<div style="display:flex;justify-content: flex-end;">
<el-button
type="primary"
@click="handleSearch"
>查询</el-button>
<el-button
plain
@click="handleReset"
>重置</el-button>
<el-button
v-if="multi"
plain
@click="handleMultiSelect"
>选择</el-button>
</div>
</el-col>
</el-row>
<div>
<el-table
v-loading="loading"
:data="tableData"
fit
highlight-current-row
:header-cell-style="dialogHeaderCellStyle"
style="width: 100%;"
@row-dblclick="handleSelect"
@selection-change="(rows) => (selectedRows = rows)"
>
<el-table-column
v-if="multi"
type="selection"
width="55"
align="center"
/>
<el-table-column
v-for="(item, key) in formConfig.formDesc"
:key="key"
:label="item.label"
:width="item.width"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">{{ item.value ? scope.row[item.value] : scope.row[key] }}</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="pageData.total > 0"
style="padding-bottom:8px"
:total="pageData.total"
:page.sync="pageData.currentPage"
:limit.sync="pageData.pageSize"
@pagination="fetchTable"
/>
</el-dialog>
</div>
</template>
<script>
/* eslint-disable no-eval */
import Pagination from '@/components/Pagination'
import elDragDialog from '@/directive/el-drag-dialog'
import lovData from '@/api/lov-data'
const isNumber = require('is-number')
function isNil(value) {
return value == null
}
export default {
name: 'Lovs',
directives: { elDragDialog },
components: {
Pagination
},
filters: {
dialogWidthFilter(width) {
if (isNil(width) || !isNumber(width)) {
return '60%'
} else {
return `${width}%`
}
}
},
props: {
code: {
type: String,
default: ''
},
searchUrl: {
type: String,
default: ''
}, // 请求地址,请求地址为空时候使用`/${code}/search`查询
label: {
type: String,
default: ''
}, // 作为标题
initialParams: {
type: Object,
default: () => { }
}, // 初始搜索条件
displayKey: {
type: String,
default: ''
}, // 展示在页面的属性值,若无则使用表格第一列数据
/* eslint-disable */
returnFn: [Function], // 处理返回值函数,使其符合接口要求
/* eslint-enable */
value: {
type: String,
default: ''
},
multi: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
/* eslint-disable */
beforeSelected: [Function],
/* eslint-enable */
clearable: {
type: Boolean,
default: false
},
placeholder: {
type: String,
default: ''
}
},
data: function() {
return {
defaultFormConfig: {
isShowSubmitBtn: false,
isShowBackBtn: false,
labelPosition: 'left'
},
formConfig: {
formDesc: {}
},
dialogTableVisible: false,
searchData: {},
tableData: [],
pageData: {
total: 0,
currentPage: 0,
pageSize: 10
},
text: this.value,
selectedRows: [],
hovering: false,
focused: false,
loading: true
}
},
computed: {
showClear() {
return this.focused || this.hovering
}
},
watch: {
value(val) {
this.text = val
}
},
methods: {
clear() {
this.text = '' // 清空显示文本
const val = this.translateRow({})
this.$emit('handleSelected', val)
},
// v-el-drag-dialog onDrag callback function
handleDrag() {
// this.$refs.select.blur()
},
createLovTable() {
var formConfig = Object.assign(this.defaultFormConfig, lovData[this.code])
this.formConfig = formConfig
this.dialogTableVisible = true
this.handleSearch()
},
handleSearch() {
this.pageData.currentPage = 1
this.fetchTable()
},
handleReset() {
this.searchData = {}
this.handleSearch()
},
fetchTable() {
this.loading = true
const url = this.searchUrl ? this.searchUrl : `/${this.code}/search`
const data = Object.assign({}, this.initialParams, this.searchData, this.pageData)
const params = this.$translateToC4CData(data)
delete params.total
this.$request(url, params).then(res => {
this.tableData = res.results.Result || []
this.pageData.total = Number(res.totalSize || 0)
this.loading = false
})
},
handleSelect(row) {
if (typeof this.beforeSelected === 'function') {
this.beforeSelected(this.setValue, row)
} else {
this.setValue(row)
}
},
setValue(row) {
// 展示的key值,如果没有传值进来则使用表格第一列的值
const key = this.displayKey ? this.displayKey : Object.keys(this.formConfig.formDesc)[0]
this.text = row[key]
const val = this.translateRow(row)
this.$emit('handleSelected', val)
this.dialogTableVisible = false
},
translateRow(row) {
var result
if (this.returnFn && typeof this.returnFn === 'function') {
result = this.returnFn(row)
if (Object.prototype.toString.call(result) !== '[object Object]') {
throw Error('lov配置中returnFn的返回值不是object')
}
} else {
result = this.text
}
return result
},
handleMultiSelect() {
if (this._.isEmpty(this.selectedRows)) {
this.$notify({
title: '警告',
message: '未选择',
type: 'warning',
duration: 2000
})
} else {
const values = this.selectedRows.map((r) => r[this.lovData.valueField])
const texts = this.selectedRows.map((r) => r[this.lovData.textField])
this.$emit('handleSelected', this.selectedRows)
this.text = this._.toString(texts)
// this.$emit('update:text', this._.toString(texts))
this.$parent.$emit('el.form.change', [values])
this.dialogTableVisible = false
}
},
onPreviewDialogOpened() { },
handleClose(done) {
done()
},
dialogHeaderCellStyle() {
return 'background-color: #f7f8fa;'
}
}
}
</script>
<style lang="scss">
.lov-dialog {
.el-dialog__header {
padding: 16px 20px;
border-bottom: 1px solid #f4f4f4;
}
.el-dialog__body {
padding: 16px 20px;
}
}
</style>
......@@ -185,7 +185,8 @@ export default {
takeEffect: '生效',
invalid: '失效',
baseInfo: '基础信息',
viewAttachments: '查看附件'
viewAttachments: '查看附件',
approve:'审批'
},
example: {
warning: '创建和编辑页面是不能被 keep-alive 缓存的,因为keep-alive 的 include 目前不支持根据路由来缓存,所以目前都是基于 component name 来进行缓存的。如果你想类似的实现缓存效果,可以使用 localStorage 等浏览器缓存方案。或者不要使用 keep-alive 的 include,直接缓存所有页面。详情见'
......
......@@ -55,7 +55,7 @@
</ul>
</li>
<!-- 消息三小列表 -->
<li
<!-- <li
v-for="route in topRoutes.slice(-1)"
:key="route.meta.title"
class="nav-item"
......@@ -72,7 +72,7 @@
/>
<span>{{ route.meta.topTitle }}</span>
<el-badge :value="2" class="item" />
</li>
</li> -->
</ul>
<!-- <div class="Mymessage">
<router-link to="/message/index">
......
......@@ -15,6 +15,7 @@ import EleSearch from '@/components/EleSearch'
import TableBtns from '@/components/TableBtns'
import FormTitle from '@/components/FormTitle'
import Lov from '@/components/Lov'
import Lovs from '@/components/Lovs'
import BusinessTable from '@/components/BusinessTable'
import DetailTable from '@/components/DetailTable'
import DescriptionTable from '@/components/DescriptionTable'
......@@ -60,6 +61,7 @@ Vue.use(EleSearch)
Vue.use(TableBtns)
Vue.use(FormTitle)
Vue.use(Lov)
Vue.use(Lovs)
Vue.use(BusinessTable)
Vue.use(DetailTable)
Vue.use(DescriptionTable)
......
/*
* @Descripttion:
* @Author: 薛泽展
* @Date: 2021-10-12 12:29:05
* @Since: JDK1.8
*/
import router from './router'
import store from './store'
import { Message } from 'element-ui'
......@@ -8,7 +14,7 @@ import getPageTitle from '@/utils/get-page-title'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login', '/auth-redirect'] // no redirect whitelist
const whiteList = ['/prov-register', '/city-register', '/login', '/auth-redirect'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
......@@ -63,15 +69,25 @@ router.beforeEach(async(to, from, next) => {
}
} else {
/* has no token*/
console.info('=========================111' + to.path)
if (whiteList.indexOf(to.path) !== -1) {
// in the free login whitelist, go directly
console.info('=========================2222')
next()
} else {
console.info('=========================3333')
// other pages that do not have permission to access are redirected to the login page.
if (to.path === '/city-register') {
next({ path: '/city-register'})
} else if (to.path === '/prov-register') {
next({ path : '/prov-register'})
} else {
next(`/login?redirect=${to.path}`)
NProgress.done()
}
// next(`/login?redirect=${to.path}`)
// NProgress.done()
}
}
})
......
......@@ -11,7 +11,7 @@ function fetchDictionary(data) {
return enums[code]
}
return request({
url: '/enum/queryAll',
url: '/commonSession/searchAll',
method: 'post',
data
}).then((res) => {
......
// import dictionary from '@/api/dictionary'
const adressConfig = {
labelPosition: 'left',
isShowBackBtn: false,
isShowSubmitBtn: true,
formDesc: {
Name: {
type: 'select',
label: '省份',
layout: 24
},
ExtSecondName_SDK: {
type: 'input',
label: '城市',
layout: 12,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '县市',
layout: 12
},
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 12,
},
}
}
export default { adressConfig }
<template>
<div>
<!-- <Title :title="title">
<span>*</span>为必填项
</Title> -->
<div class="form-container">
<form-title :title="formTitle" />
<ele-form
ref="form"
v-model="formData"
v-bind="basicConfig"
>
<template v-slot:form-btn>
<el-button
type="primary"
icon="el-icon-right"
:loading="loading"
@click="handleSubmit"
>保存提交</el-button>
</template>
</ele-form>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import formConfig from './constant'
export default {
components: {
Title
},
props: {
// 状态判断是由那个页面跳转
status: {
type: String,
default: ''
},
formList: {
type: Object,
default: Function
}
},
data() {
return {
// title: '报价申请',
formTitle: '基础信息',
loading: false,
formData: {},
basicConfig: formConfig.basicConfig,
adressConfig: formConfig.adressConfig
}
},
// watch: {
// formList() {
// this.formData = this.formList
// },
// status: {
// handler(newVal) {
// console.log(newVal)
// },
// immediate: true,
// deep: true
// }
// },
// mounted() {
// // 判断是有那个页面跳转,一个是从报价新增按钮一个是从商机
// if (this.status === '新增') {
// this.formData = {
// Ext_QuoteType_KUT: '预备货报价',
// Ext_QuoteStatus_KUT: '101'
// }
// this.formConfig.formDesc.ProductRecipientPartyName.disabled = false
// } else {
// this.formData = {
// Ext_QuoteType_KUT: '普通报价',
// Ext_QuoteStatus_KUT: '101'
// }
// }
// },
methods: {
// handleSubmit() {
// // console.log('跳转')
// this.stepBmit()
// },
// stepBmit() {
// // 将表单中的存储的数据返回
// this.$emit('changeComponent', 'productInforma', this.formData)
// }
}
}
</script>
<style>
</style>
\ No newline at end of file
// import dictionary from '@/api/dictionary'
const basicConfig = {
labelPosition: 'left',
isShowBackBtn: false,
isShowSubmitBtn: true,
formDesc: {
Name: {
type: 'lov',
label: '公司企称',
layout: 24
},
ExtSecondName_SDK: {
type: 'input',
label: '公司企称曾用名',
layout: 12,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '社会统一信用代码',
layout: 12
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
layout: 12,
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
layout: 12,
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 12
// },
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 12,
},
}
}
export default { basicConfig }
<template>
<div>
<!-- <Title :title="title">
<span>*</span>为必填项
</Title> -->
<div class="form-container">
<form-title :title="formTitle" />
<ele-form
ref="form"
v-model="formData"
v-bind="basicConfig"
>
<template v-slot:form-btn>
<el-button
type="primary"
icon="el-icon-right"
:loading="loading"
@click="handleSubmit"
>保存提交</el-button>
</template>
</ele-form>
</div>
</div>
</template>
<script>
import Title from '@/components/Title'
import formConfig from './constant'
export default {
components: {
Title
},
props: {
// 状态判断是由那个页面跳转
status: {
type: String,
default: ''
},
formList: {
type: Object,
default: Function
}
},
data() {
return {
// title: '报价申请',
formTitle: '基础信息',
loading: false,
formData: {},
basicConfig: formConfig.basicConfig,
adressConfig: formConfig.adressConfig
}
},
// watch: {
// formList() {
// this.formData = this.formList
// },
// status: {
// handler(newVal) {
// console.log(newVal)
// },
// immediate: true,
// deep: true
// }
// },
// mounted() {
// // 判断是有那个页面跳转,一个是从报价新增按钮一个是从商机
// if (this.status === '新增') {
// this.formData = {
// Ext_QuoteType_KUT: '预备货报价',
// Ext_QuoteStatus_KUT: '101'
// }
// this.formConfig.formDesc.ProductRecipientPartyName.disabled = false
// } else {
// this.formData = {
// Ext_QuoteType_KUT: '普通报价',
// Ext_QuoteStatus_KUT: '101'
// }
// }
// },
methods: {
// handleSubmit() {
// // console.log('跳转')
// this.stepBmit()
// },
// stepBmit() {
// // 将表单中的存储的数据返回
// this.$emit('changeComponent', 'productInforma', this.formData)
// }
}
}
</script>
<style>
</style>
\ No newline at end of file
import { project } from '@/api/customers'
const tableConfig = {
tableTitle: '上传附件',
url: project.searchUrl,
showPagination: false,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
Name: {
label: '联系人',
},
Phone: {
label: '电话'
},
Detail: {
label: '地址详细信息'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index)
},
class: 'el-icon-edit',
props: {
type: 'text'
}
},
'编辑')
}
}
}
}
const formConfig = {
labelPosition: 'left',
submitBtnText: '保存',
formDesc: {
Name: {
type: 'input',
layout: 12,
label: '联系人'
},
Phone: {
label: '电话',
type: 'input',
layout: 12,
},
Detail: {
label: '地址详细信息',
type: 'input',
layout: 12,
},
}
}
export default {
tableConfig,
formConfig,
...project
}
<template>
<div v-if="addBtnStart">
<FileTable :type-code="typeCode" :objectID='objectId' />
</div>
</template>
<script>
import { uploadCode } from '@/api/upload'
import FileTable from '@/views/public/file-info'
export default {
components: {
FileTable
},
props: {
addBtnStart: {
type: Boolean,
default: false
},
objectId: {
type: String,
default: ''
}
},
data() {
return {
typeCode: uploadCode.customer
}
},
watch: {
addBtnStart: {
handler(newVal) {
console.log(newVal)
},
immediate: true,
deep: true
},
objectId: {
handler(newVal) {
console.log(newVal)
},
immediate: true,
deep: true
}
}
}
</script>
<style>
</style>
\ No newline at end of file
import { project } from '@/api/customers'
const tableConfig = {
tableTitle: '收货地址',
url: project.searchUrl,
showPagination: false,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
Name: {
label: '联系人',
},
Phone: {
label: '电话'
},
Detail: {
label: '地址详细信息'
},
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row, scope.$index)
},
class: 'el-icon-edit',
props: {
type: 'text'
}
},
'编辑')
}
}
}
}
const formConfig = {
labelPosition: 'left',
submitBtnText: '保存',
formDesc: {
Name: {
type: 'input',
layout: 12,
label: '联系人'
},
Phone: {
label: '电话',
type: 'input',
layout: 12,
},
Detail: {
label: '地址详细信息',
type: 'input',
layout: 12,
},
}
}
export default {
tableConfig,
formConfig,
...project
}
<template>
<div v-if="addBtnStart">
<BusinessTable v-bind="constant"/>
</div>
</template>
<script>
import constant from './constant'
export default {
props: {
addBtnStart: {
type: Boolean,
default: false
},
objectId: {
type: String,
default: ''
}
},
data() {
return {
constant: {}
}
},
watch: {
addBtnStart: {
handler(newVal) {
console.log(newVal)
},
immediate: true,
deep: true
},
objectId: {
handler(newVal) {
constant.tableConfig.initialParams = {
BusinessObjectID: newVal
}
},
immediate: true,
deep: true
}
},
created() {
// 设置表单的初始搜索条件,该条件一般不会发生改变
constant.tableConfig.initialParams = {
BusinessObjectID: this.objectId
}
this.constant = constant
}
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="form-container">
<Title :title="title">
<span>*</span>为必填项
</Title>
<div>
<ele-form-section
v-model="formData"
:request-fn="handleSubmit"
:rules="rules"
:sections="sections"
@request-success="handleSuccess"
/>
</div>
<customerAddAddress :addBtnStart='addBtnStart' :objectId='objectId'/>
<customerAddAccessory :addBtnStart='addBtnStart' :objectId='objectId'/>
<!-- <div class="btn">
<el-button type="primary">提交保存</el-button>
</div> -->
</div>
</template>
<script>
import basicConfig from './components/basic-config/index'
import Title from '@/components/Title'
import { customerCreate, provinceSearch, citySearch, districtSearch } from '@/api/customers';
import customerAddAddress from './components/customersAdd-adress/index'
import customerAddAccessory from './components/customersAdd-accessory/index'
// import dictionary from '@/api/dictionary'
export default {
components: {
Title,
customerCreate,
customerAddAddress,
customerAddAccessory,
provinceSearch,
citySearch,
districtSearch
},
data () {
return {
title: '代理商新增',
addBtnStart: true,
objectId: '',
formData: {},
province: [],
sections: [
{
title: '基本信息',
formDesc: {
Name: {
type: 'lov',
label: '公司企称',
layout: 24,
code: 'qcc',
returnFn: function(row) {
return {
Name: row.Name,
ExtSocialUnifiedCreditCode_SDK: row.CreditCode,
ExtCorporateName_SDK: row.OperName
}
},
},
ExtSecondName_SDK: {
type: 'input',
label: '公司企称曾用名',
layout: 12,
},
ExtSocialUnifiedCreditCode_SDK: {
type: 'input',
label: '社会统一信用代码',
layout: 12
},
ExtRegisteredCapital_SDK: {
type: 'input',
label: '注册资本(万元)',
layout: 12,
},
ExtCorporateName_SDK: {
type: 'input',
label: '法人',
layout: 12,
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '税务登记编号',
// layout: 12
// },
}
},
{
title: '地址信息',
formDesc: {
ExtProvinceCode_SDK: {
type: 'select',
label: '省份',
layout: 12,
options: async data => {
const res = await provinceSearch({})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtCityCode_SDK: {
type: 'select',
label: '城市',
layout: 12,
isOptions: true,
optionsLinkageFields: ['ExtProvinceCode_SDK'],
options: async data => {
if (!data.ExtProvinceCode_SDK) {
return []
}
const res = await citySearch({
provinceCode: data.ExtProvinceCode_SDK
})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtDistrictCode_SDK: {
type: 'select',
label: '县市',
layout: 12,
isOptions: true,
optionsLinkageFields: ['ExtProvinceCode_SDK', 'ExtCityCode_SDK'],
options: async data => {
if (!data.ExtCityCode_SDK) {
return []
}
const res = await districtSearch({
cityCode: data.ExtCityCode_SDK
})
var result = res.results.map(item => {
return {
text: item.Name,
value: item.Code
}
})
return result
},
},
ExtAddressDetail_SDK: {
type: 'input',
label: '详细经营地址',
layout: 12,
},
}
},
{
title: '联系信息',
formDesc: {
ExtLeader_SDK: {
type: 'input',
label: '公司负责人姓名',
layout: 12
},
ExtLeaderPhone_SDK: {
type: 'input',
label: '公司负责人联系方式',
layout: 12
},
ExtLeaderEmail_SDK: {
type: 'input',
label: '公司负责人邮箱',
layout: 12
},
ExtUnis_SDK: {
type: 'input',
layout: 12,
label: 'Unis业务负责人姓名'
},
ExtUnisPhone_SDK: {
type: 'input',
layout: 12,
label: 'Unis业务负责人联系方式'
},
ExtUnisEmail_SDK: {
type: 'input',
label: 'Unis业务负责人邮箱',
layout: 12
},
ExtBusiness_SDK: {
type: 'input',
layout: 12,
label: '商务负责人姓名'
},
ExtBusinessPhone_SDK: {
type: 'input',
layout: 12,
label: '商务负责人联系方式'
},
ExtBusinessEmail_SDK: {
type: 'input',
label: '商务负责人邮箱',
layout: 12
},
}
}
],
// 同 vue-ele-form
rules: {
Name: {required: true, message: '名称必填'},
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' },
ExtSocialUnifiedCreditCode_SDK: { required: true, message: '名称必填' },
ExtRegisteredCapital_SDK: {required: true, message: '名称必填' },
ExtCorporateName_SDK: { required: true, message: '名称必填' },
}
}
},
methods: {
handleSubmit (data) {
console.log(data)
// this.addBtnStart = true
customerCreate(this.paramsToFormData(data)).then(res => {
// console.log(res)
this.addBtnStart = true
this.objectId = res.results
this.$message.success('创建成功')
})
// return Promise.resolve()
},
handleSuccess () {
// this.$message.success('创建成功')
},
// 对象格式转化为键值对
paramsToFormData(obj) {
const formData = new FormData();
Object.keys(obj).forEach((key) => {
if (obj[key] instanceof Array) {
obj[key].forEach((item) => {
formData.append(key, item);
});
return;
}
formData.append(key, obj[key]);
});
return formData;
},
}
}
</script>
<style>
<style lang="scss" scoped>
::v-deep .el-row--flex {
display: -webkit-box;
.el-col-14 {
width: 90%;
}
}
::v-deep .ele-form-btns{
.el-form-item__content {
margin-left: 45% !important;
}
}
.btn {
margin-left: 45%;
}
</style>
......@@ -31,7 +31,8 @@ const tableConfig = {
},
Name: {
label: '公司名称',
type: 'input'
type: 'input',
showInSearch: true,
},
ExtCorporateName_SDK: {
label: '法定人代表',
......
import dictionary from '@/api/dictionary'
import { customer } from '@/api/customers'
import i18n from '@/lang'
import { province,searchProduct } from '@/api/customers'
// 潜在客户主列表配置
const tableConfig = {
url: customer.searchUrl,
initialParams: {
roleCode: 'BUP002'
},
url: province.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
searchColums:{
Name: {
label: '客户名称',
label: '公司名称',
showInSearch: true,
type: 'input',
fixed: 'left',
renderItem: (h, scope, listeners) => {
return h(
'el-button',
{
return h('el-button', {
on: {
click: (e) => listeners.handleCheck(scope.row)
click: (e) => listeners.handleDetails(scope.row)
},
props: {
type: 'text'
}
}, scope.row.ID)
}
},
scope.row.Name)
ExtProductGroup_SDK: {
label: '签约产品组',
showInSearch: true,
type: 'select',
fixed: 'left',
isOptions:'true',
options: async data => {
const res = await searchProduct({code:'ExtProductGroup_SDK',module:'Customer'})
var result = res.map(item => {
return {
text: item.content,
value: item.keyword
}
})
return result
},
showInSearch: true
},
Ext_CustomerType_KUT: {
label: '客户类型',
type: 'select',
value: 'Ext_CustomerType_KUTText',
showInSearch: true,
options: dictionary.customerType
},
Ext_CustomerStatus_KUT: {
label: '客户状态',
type: 'select',
value: 'Ext_CustomerStatus_KUTText',
showInSearch: true,
options: dictionary.customerStatus
columns: {
ExtCustomerID_SDK: {
label: '代理商编码',
type: 'input'
},
Ext_CustomerMainContactName_KUT: {
label: '联系人',
Name: {
label: '公司名称',
type: 'input'
},
Ext_CustomerMainContactPhone_KUT: {
label: '手机号码',
ExtCorporateName_SDK: {
label: '法定人代表',
type: 'input'
},
Ext_CustomerFollowUpDate_KUT: {
label: '最后跟进',
ExtSocialUnifiedCreditCode_SDK: {
label: '统一社会信用代码',
type: 'input'
},
Ext_CustomerForm_KUT: {
label: '来源',
value: 'Ext_CustomerForm_KUTText',
CreationOn: {
label: '注册时间',
type: 'input'
},
// Ext_QuoteOppotunity_KUT: {
// type: 'input',
// label: '代理商类型',
// showInSearch: true
// },
handle: {
label: '操作',
hideInFilter: true,
fixed: 'right',
minWidth: 100,
hideInFilter: true,
renderItem: (h, scope, listeners) => {
return h('div', {}, [
h(
'el-button',
{
on: {
click: (e) => listeners.handleEdit(scope.row)
},
class: 'el-icon-edit',
props: {
type: 'text'
}
},
'编辑'),
scope.row.Ext_CustomerStatus_KUTText === '草稿' && h(
'el-button',
{
return h('div', [
h('el-button', {
on: {
click: (e) => listeners.handleDelete(scope.row)
click: (e) => listeners.handleEdit(scope.row, 'approve')
},
class: 'el-icon-delete',
props: {
type: 'text'
type: 'text',
label:'审批'
}
},
'删除')
}, i18n.t('table.approve')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleTakeEffect(scope.row, 'takeEffect')
// },
// props: {
// icon: 'el-icon-circle-check',
// type: 'text'
// }
// }, i18n.t('table.takeEffect')),
// h('el-button', {
// on: {
// click: (e) => listeners.handleInvalid(scope.row, 'invalid')
// },
// props: {
// icon: 'el-icon-circle-check',
// type: 'text'
// }
// }, i18n.t('table.invalid'))
])
}
}
}
}
// 注销客户弹框配置
const CancellationFormConfig = {
title: '注销原因',
createUrl: customer.updateUrl,
labelPosition: 'left',
submitBtnText: '确定',
span: 22,
formDesc: {
Ext_CustomerStatus_KUT: {
type: 'input',
label: '客户状态',
default: '131',
vif: false,
layout: 24
},
Ext_CustomerCancellationReasons_KUT: {
type: 'textarea',
label: '注销原因',
layout: 24
}
}
}
// 激活客户弹框配置
const ActivationFormConfig = {
title: '激活原因',
createUrl: customer.updateUrl,
labelPosition: 'left',
submitBtnText: '确定',
span: 22,
formDesc: {
Ext_CustomerStatus_KUT: {
type: 'input',
label: '客户状态',
default: '111',
vif: false,
layout: 24
},
Ext_CustomerActivationReasons_KUT: {
type: 'textarea',
label: '激活原因',
layout: 24
}
}
}
// 移入资源池弹框配置
const ResourcePoolFormConfig = {
title: '移入资源池',
createUrl: customer.toPoolUrl,
labelPosition: 'left',
submitBtnText: '确定',
span: 22,
formDesc: {
Ext_CustomerActivationReasons_KUT: {
type: 'textarea',
label: '移入资源池原因',
layout: 24
}
}
}
export default {
tableConfig,
ActivationFormConfig,
CancellationFormConfig,
ResourcePoolFormConfig
}
export default tableConfig
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
:columns="tableConfig.searchColums"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-dropdown
style="margin-right: 10px;"
@command="handleAdd"
>
<el-button
type="primary"
icon="el-icon-plus"
>
添加
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="1">创建个人客户</el-dropdown-item>
<el-dropdown-item :command="2">创建企业客户</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button
plain
icon="el-icon-refresh"
@click="handleShowDialog(config.followTask)"
>分配</el-button>
<el-button
plain
icon="el-icon-user"
@click="handleShowDialog(config.resourcePool)"
>转资源池</el-button>
<el-button
plain
icon="el-icon-document"
@click="handleShowDialog(config.supervise)"
>
督办
</el-button>
<export-btn
:expand-params="expandParams"
config-code="customer"
/>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
<!-- 弹框部分 -->
<ele-form-dialog
:title="dialogTitle"
:form-data="formData"
:request-fn="handleSave"
:visible.sync="dialogFormVisible"
v-bind="formConfig"
:loading="loading"
/>
</div>
</div>
......@@ -71,125 +22,33 @@
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
import followTask from '../important-customers/components/record-info/components/follow-task/constant'
import supervise from '../important-customers/components/record-info/components/supervise/constant'
import { customer } from '@/api/customers'
export default {
mixins: [tableMixin],
inject: ['reload'],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant.tableConfig,
enterpriseUrl: '/customers/enterprise',
individualUrl: '/customers/individual',
enterpriseDetailUrl: '/customers/enterprise-detail',
individualDetailUrl: '/customers/individual-detail',
selection: [],
config: {
followTask,
supervise,
resourcePool: constant.ResourcePoolFormConfig
},
dialogTitle: '',
dialogFormVisible: false,
formData: {},
formConfig: {
formDesc: {}
},
loading: false
tableConfig: constant
}
},
created() {
this.tableListeners = {
handleCheck: this.handleCheck,
handleEdit: this.handleEdit,
handleDelete: this.handleDelete
// handleDetails: this.handleDetails, // 添加
// handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit: this.handleEdit, // 编辑
// handleInvalid: this.handleInvalid // 失效
}
},
methods: {
handleAdd(type) {
if (type === 1) {
this.$router.push({ path: this.individualUrl })
} else {
this.$router.push({ path: this.enterpriseUrl })
}
},
handleCheck(row) {
if (row.Ext_CustomerType_KUT === '121') {
this.$router.push({
path: this.individualDetailUrl,
query: { objectID: row.ObjectID }
})
} else if (row.Ext_CustomerType_KUT === '131') {
this.$router.push({
path: this.enterpriseDetailUrl,
query: { objectID: row.ObjectID }
})
}
},
handleEdit(row) {
if (row.Ext_CustomerType_KUT === '121') {
this.$router.push({
path: this.individualUrl,
query: { objectID: row.ObjectID }
})
} else if (row.Ext_CustomerType_KUT === '131') {
this.$router.push({
path: this.enterpriseUrl,
query: { objectID: row.ObjectID }
})
}
// 编辑
handleEdit(val) {
this.$router.push({ path: '/customersAdd',query:{id:val.ObjectID} })
},
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
},
handleShowDialog(obj) {
if (this.selection.length === 0) {
this.$message.warning('请先选择一个客户')
return
}
this.dialogTitle = obj.title ? obj.title : '添加' + obj.tableConfig.tableTitle
this.postUrl = obj.createUrl
this.formData = {
objectID: this.selection[0].ObjectID,
roleCode: this.selection[0].roleCode
}
this.formConfig = obj.formConfig || obj
this.dialogFormVisible = true
},
handleSave(data) {
this.loading = true
data = this.$translateToC4CData(data)
this.$request(this.postUrl, [data]).then(res => {
this.loading = false
this.dialogFormVisible = false
}).catch(() => {
this.loading = false
})
},
handleDelete(row) {
this.$confirm('此操作将删除该客户, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const data = {
objectID: row.ObjectID,
ext_CustomerStatus_KUT: '191'
}
this.$request(customer.updateUrl, data).then(res => {
this.$message.success('删除成功')
this.handleSearch()
})
})
}
}
}
</script>
<style lang="scss" scoped>
<style>
</style>
......@@ -32,7 +32,7 @@ export default {
}
},
created() {
this.getTableData()
// this.getTableData()
},
mounted() {
},
......
......@@ -9,7 +9,6 @@
</div>
<div class="two-column">
<div class="left" />
<ComplaintsAndSuggestions />
</div>
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
......@@ -83,7 +82,7 @@
<script>
import SystemNotice from './components/SystemNotice'
import ComplaintsAndSuggestions from './components/ComplaintsAndSuggestions'
// import ComplaintsAndSuggestions from './components/ComplaintsAndSuggestions'
import PanelGroup from './components/PanelGroup'
import LineChart from './components/LineChart'
import RaddarChart from './components/RaddarChart'
......@@ -116,7 +115,7 @@ export default {
name: 'DashboardAdmin',
components: {
SystemNotice,
ComplaintsAndSuggestions,
// ComplaintsAndSuggestions,
PanelGroup,
LineChart,
RaddarChart,
......
const applyConfig = {
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
numberID: {
type: 'input',
label: '序号'
},
GoodsORTaxableServicesName: {
type: 'input',
label: '货物或应税劳务、服务名称'
},
SpecificationModel: {
type: 'input',
label: '规格型号'
},
Unit: {
type: 'input',
label: '单位'
},
Quantity: {
type: 'input',
label: '数量'
},
UnitPrice: {
type: 'input',
label: '单价'
},
Money: {
type: 'input',
label: '金额'
},
TaxRate: {
type: 'input',
label: '税率'
},
TaxAmount: {
type: 'input',
label: '税额'
}
}
}
export default applyConfig
<template>
<div class="apply">
<Title :title="apply" />
<ele-table
ref="eleTable"
v-bind="applyConfig"
/>
</div>
</template>
<script>
import constant from './constant'
import Title from '@/components/Title'
export default {
components: {
Title
},
data() {
return {
apply: '开票申请信息',
applyConfig: constant
}
}
}
</script>
<style>
</style>
const tableConfig = {
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
BillOfParcels: {
type: 'input',
label: '订单行',
fixed: 'left'
},
OrderID: {
type: 'input',
label: '订单编号'
},
OrderType: {
type: 'input',
label: '订单类型'
},
CustomerID: {
type: 'input',
label: '客户编号'
},
CustomerName: {
type: 'input',
label: '客户名称'
},
ReceiptPlace: {
type: 'input',
label: '收获地点'
},
ShippingTime: {
type: 'input',
label: '出货时间'
},
MaterialCode: {
type: 'input',
label: '物料编码'
},
MaterialCodeDescription: {
type: 'input',
label: '物料编码说明'
},
Quantity: {
type: 'input',
label: '数量'
},
Unit: {
type: 'input',
label: '单位'
},
UnitPrice: {
type: 'input',
label: '单价'
},
Money: {
type: 'input',
label: '金额'
},
InvoiceSource: {
type: 'input',
label: '发票来源'
},
Currency: {
type: 'input',
label: '币种'
},
ExchangeRate: {
type: 'input',
label: '汇率'
},
IsInformationComplete: {
type: 'input',
label: '资料是否齐全'
},
IsCustomsDeclaration: {
type: 'input',
label: '是否有报关单'
},
CustomsDeclarationID: {
type: 'input',
label: '报关单号'
},
CheckFeedback: {
type: 'input',
label: '审核反馈'
},
TwiceCheckFeedback: {
type: 'input',
label: '复核反馈'
},
ConfirmStatus: {
type: 'input',
label: '状态'
},
handle: {
label: '操作',
fixed: 'right',
minWidth: 200,
hideInFilter: true,
renderItem: (h, scope, listeners) => {
return h('div', [
h('el-button', {
on: {
click: (e) => listeners.handleEdit(scope.row)
},
props: {
icon: 'el-icon-success',
type: 'text'
}
}, '通过'),
h('el-button', {
on: {
click: (e) => listeners.handleTakeEffect(scope.row)
},
props: {
icon: 'el-icon-error',
type: 'text'
}
}, '未通过')
])
}
}
}
}
export default tableConfig
<template>
<div class="list">
<Title :title="list" />
<div class="listHanle">
<div class="listHanle_title">
<span><i class="el-icon-pie-chart" />行数:10</span>
<span>数量:1000</span>
<span>金额:1000</span>
</div>
</div>
<ele-table
ref="eleTable"
v-bind="tableConfig"
/>
</div>
</template>
<script>
import constant from './constant'
import Title from '@/components/Title'
export default {
components: {
Title
},
data() {
return {
tableConfig: constant,
list: '开票清单信息'
}
}
}
</script>
<style lang='scss' scoped>
.listHanle{
height: 60px;
line-height: 60px;
.listHanle_title {
float: right;
span{
padding-right: 20px;
}
}
}
</style>
const formConfigNote = {
isShowBackBtn: false,
isShowSubmitBtn: true,
detailUrl: '/invoiceApply/getOne',
formDesc: {
SpecialInstructions: {
type: 'input',
label: '特殊说明',
disabled: true,
layout: 12
},
ReferenceNote: {
type: 'input',
label: '参考备注',
disabled: true,
layout: 12
},
ActualNote: {
type: 'input',
label: '实际备注',
disabled: true,
layout: 12
}
}
}
export default formConfigNote
<template>
<div class="remarks">
<Title :title="remarks" />
<div class="remarks-btn">
<div class="addBtn">
<el-button type="text" @click="handleAdd">编辑</el-button>
</div>
</div>
<detail-table :table-config="formConfigNote" :table-data="tableData" />
</div>
</template>
<script>
import DetailTable from '@/components/DetailTable'
import constant from './constant'
import Title from '@/components/Title'
import { invoiceApplyUpdate, invoiceApplyGetOne } from '@/api/invoice'
export default {
components: {
DetailTable,
Title
},
props: {
objectId: {
type: Object,
default: () => {}
}
},
data() {
return {
remarks: '特殊开票及备注说明',
formConfigNote: constant,
tableData: {}
}
},
watch: {
objectId: {
handler(newVal) {
console.log(newVal)
},
deep: true,
immediate: true
}
},
methods: {
handleAdd() {
this.$prompt('实际备注', '编辑实际备注', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
// console.log(value, this.objectId)
invoiceApplyUpdate({ objectID: this.objectId.objectID, actualNote: value }).then(res => {
this.$message({
type: 'success',
message: '修改成功'
})
this.toUpdate()
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
})
})
},
toUpdate() {
invoiceApplyGetOne(this.objectId).then(res => {
console.log(res.results[0])
this.tableData = res.results[0]
})
}
}
}
</script>
<style lang='scss' scoped>
.remarks-btn{
height: 30px;
line-height: 30px;
padding: 0 20px;
.addBtn{
float: right;
}
}
</style>
const formConfig = {
isShowBackBtn: false,
isShowSubmitBtn: true,
detailUrl: '/invoiceApply/getOne',
formDesc: {
CustomerName: {
type: 'input',
label: '客户名称',
disabled: true,
layout: 12
},
DetailedAddress: {
type: 'input',
label: '地址',
disabled: true,
layout: 12
},
TaxpayerIdentificationNumber: {
type: 'input',
label: '纳税人识别号',
disabled: true,
layout: 12
},
DepositBank: {
type: 'input',
layout: 12,
label: '开户行'
},
BankNumber: {
type: 'input',
label: '账户',
disabled: true,
layout: 12
},
Phone: {
type: 'input',
label: '电话',
disabled: true,
layout: 12
},
BillingType: {
type: 'input',
label: '开票类型',
disabled: true,
layout: 12
},
Currency: {
type: 'input',
label: '币种',
disabled: true,
layout: 12
}
}
}
export default formConfig
<template>
<div class="rise">
<Title :title="rise" />
<detail-table :table-config="formConfig" :table-data="tableData" />
</div>
</template>
<script>
import DetailTable from '@/components/DetailTable'
import constant from './constant'
import Title from '@/components/Title'
export default {
components: {
DetailTable,
Title
},
props: {
objectId: {
type: Object,
default: () => {}
}
},
data() {
return {
formConfig: constant,
rise: '客户抬头信息',
tableData: {}
}
}
}
</script>
<style>
</style>
<template>
<div v-loading="loading" class="app-container">
<div class="detail-header-container">
<div class="detail-header-title">
<h3>深圳市深蓝集团</h3>
<div class="detail-header-info">
<div>
<i class="el-icon-c-scale-to-original" />
<span>申请编码:{{ tableData.ID }}</span>
</div>
<div>
<i class="el-icon-c-scale-to-original" />
<span>申请状态:{{ tableData.Ext_QuoteStatus_KUT }}</span>
</div>
</div>
</div>
<div class="detail-header-info">
<div><span>申请总金额:{{ tableData.RequisitionTotalAmount }}</span></div>
<div><span>申请人:{{ tableData.RequisitionPerson }}</span></div>
<div><span>开票时间:{{ tableData.BillingTime }}</span></div>
<div><span>是否同步ERP:{{ tableData.IsToERP? '是':'否' }}</span></div>
<div><span>同步状态:{{ tableData.CreationDateTime? '同步成功':'同步失败' }}</span></div>
</div>
</div>
<div class="detail-content-container">
<Remarks :object-id="objectID" />
<Rise />
<Apply :object-id="objectID" />
<List :object-id="objectID" />
<div class="floor-btn">
<div class="btn">
<el-button
type="primary"
size="medium"
>
<i class="el-icon-error" />
不同意开票
</el-button>
<el-button
type="primary"
size="medium"
>
<i class="el-icon-success" />
同意开票
</el-button>
</div>
</div>
</div>
</div>
</template>
<script>
import { invoiceApplyGetOne } from '@/api/invoice'
import Remarks from './components/remarks-invoice/index'
import Rise from './components/rise-invoice/index'
import Apply from './components/apply-invoice/index'
import List from './components/list-invoice/index'
export default {
components: {
Remarks,
Rise,
Apply,
List
},
data() {
return {
tableData: {},
objectID: '',
loading: false
}
},
created() {
this.getTableData()
},
methods: {
getTableData() {
this.objectID = this.$route.query
this.loading = true
invoiceApplyGetOne(this.objectID).then(res => {
console.log(res)
this.tableData = res.results[0]
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .apply .el-table--border{
margin-top: 40px;
}
.listHanle{
height: 60px;
line-height: 60px;
.listHanle_title {
float: right;
span{
padding-right: 20px;
}
}
}
.floor-btn{
height: 200px;
line-height: 200px;
.btn{
float: right;
}
}
.remarks-btn{
height: 30px;
line-height: 30px;
padding: 0 20px;
.addBtn{
float: right;
}
}
</style>
import { billingMessage } from '@/api/invoice'
const tableConfig = {
url: billingMessage.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
InvoiceNo: {
type: 'input',
showInSearch: true,
fixed: 'left',
label: '发票号码'
},
InvoicingRequisitionNo: {
type: 'input',
label: '申请单号'
},
InvoiceCode: {
type: 'input',
label: '发票代码'
},
InvoiceType: {
type: 'input',
showInSearch: true,
label: '发票类型'
},
InvoiceAmount: {
type: 'input',
label: '发票金额'
},
BillingTime: {
type: 'input',
label: '开票时间'
},
SignStatus: {
type: 'input',
label: '开票状态'
},
SignTime: {
type: 'input',
label: '签收时间'
},
SignBack: {
type: 'input',
label: '签收回执'
},
CourierCompany: {
type: 'input',
label: '快递公司'
},
CourierNumber: {
type: 'input',
label: '快递单号'
},
handle: {
label: '操作',
fixed: 'right',
minWidth: 200,
hideInFilter: true,
renderItem: (h, scope, listeners) => {
return h('div', [
h('el-button', {
on: {
click: (e) => listeners.enterInvoice(scope.row, '录入发票')
},
props: {
icon: 'el-icon-full-screen',
type: 'text'
}
}, '录入发票'),
h('el-button', {
on: {
click: (e) => listeners.uploadReceipt(scope.row, '上传回执')
},
props: {
icon: 'el-icon-circle-check',
type: 'text'
}
}, '上传回执')
])
}
}
}
}
export default tableConfig
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-button
type="primary"
icon="el-icon-success"
@click="confirmReceipt"
>确认收票</el-button>
<el-button
type="primary"
icon="el-icon-edit-outline"
@click="fillLogistics"
>填写物流</el-button>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
import { billingMessageUpdate } from '@/api/invoice'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant,
selection: []
}
},
created() {
this.tableListeners = {
enterInvoice: this.enterInvoice, // 录入发票
uploadReceipt: this.uploadReceipt // 上传回执
}
},
methods: {
// 录入发票
enterInvoice(row) {
console.log('录入发票', row)
},
// 上传回执
uploadReceipt(row) {
console.log('上传回执', row)
},
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
},
confirmReceipt() {
console.log(this.selection)
if (this.selection.length === 0) {
this.$message({
type: 'warning',
message: '请选择需要收票的发票'
})
} else {
this.$confirm(' 是否确定签收发票?', '确定提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
billingMessageUpdate(this.selection).then(res => {
this.$message({
type: 'success',
message: '签收成功!'
})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
})
})
}
},
fillLogistics() {
console.log('确认物流')
}
}
}
</script>
<style>
</style>
<template>
<div>
<h2>发票总览</h2>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
// import { invoiceApply } from '@/api/invoice'
const tableConfig = {
// url: invoiceApply.billingMessageSearchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
BillOfParcels: {
type: 'input',
fixed: 'left',
label: '订单行'
},
OrderID: {
type: 'input',
showInSearch: true,
label: '订单编号'
},
OrderType: {
type: 'input',
label: '订单类型'
},
InvoicingRequisitionNo: {
type: 'input',
label: '开票申请单号'
},
CustomerID: {
type: 'input',
label: '客户编号'
},
CustomerName: {
type: 'input',
showInSearch: true,
label: '客户名称'
},
ReceiptPlace: {
type: 'input',
label: '收货地点'
},
ShippingTime: {
type: 'input',
label: '出货时间'
},
MaterialCode: {
type: 'input',
label: '物料编码'
},
MaterialCodeDescription: {
type: 'input',
label: '物料编码说明'
},
Quantity: {
type: 'input',
label: '数量'
},
Unit: {
type: 'input',
label: '单位'
},
UnitPrice: {
type: 'input',
label: '单价'
},
Money: {
type: 'input',
label: '金额'
},
InvoiceSource: {
type: 'input',
label: '发票来源'
},
Currency: {
type: 'input',
label: '币种'
},
ExchangeRate: {
type: 'input',
label: '汇率'
},
// InvoiceCode: {
// type: 'input',
// label: '发票代码'
// },
InvoiceNo: {
type: 'input',
label: '发票号码'
},
IsInformationComplete: {
type: 'input',
label: '资料是否齐全'
},
IsEmbedded: {
type: 'input',
label: '是否嵌入式'
},
IsCustomsDeclaration: {
type: 'input',
label: '是否有报关单'
},
CustomsDeclarationID: {
type: 'input',
label: '报关单号'
},
CheckFeedback: {
type: 'input',
label: '审核反馈'
},
ConfirmStatus: {
type: 'input',
label: '确认状态'
},
SignStatus: {
type: 'input',
label: '状态',
fixed: 'right'
}
}
}
export default tableConfig
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-button
type="primary"
icon="el-icon-success"
size="medium"
@click="handleAdd"
>开票申请</el-button>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant
}
},
created() {
this.tableListeners = {
handleDetails: this.handleDetails, // 添加
handleTakeEffect: this.handleTakeEffect, // 生效
handleEdit: this.handleEdit // 编辑
}
},
methods: {
// 新增报价,报价申请
handleAdd() {
},
// 报价编辑
handleEdit(row) {
console.log('编辑页面', row)
},
// 报价单详情页
handleDetails(row) {
console.log(row)
},
// 报价单生效
handleTakeEffect() {
console.log('生效')
},
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
}
}
}
</script>
<style>
</style>
import { invoiceApply } from '@/api/invoice'
const tableConfig = {
url: invoiceApply.searchUrl,
defaultColumns: {
minWidth: 120,
showOverflowTooltip: true,
align: 'center'
},
columns: {
InvoicingRequisitionNo: {
type: 'input',
label: '申请单号',
showInSearch: true,
fixed: 'left'
},
RequisitionType: {
type: 'input',
label: '申请类型'
},
SignStatusText: {
type: 'input',
label: '开票状态',
showInSearch: true
},
RequisitionTotalAmount: {
type: 'input',
label: '申请总金额'
},
CustomerName: {
type: 'input',
label: '客户名称',
showInSearch: true
},
CreateName: {
type: 'input',
label: '申请人'
},
CreateOn: {
type: 'input',
label: '申请时间'
},
ReferenceNote: {
type: 'input',
label: '参考备注'
},
ActualNote: {
type: 'input',
label: '实际备注'
},
DisagreementReasons: {
type: 'input',
label: '不同意原因'
},
TwiceCheckNoPastReasons: {
type: 'input',
label: '复核未通过原因'
},
IsToERP: {
type: 'input',
label: '是否同步ERP'
},
Total_invoice_price: {
label: '操作',
fixed: 'right',
minWidth: 200,
hideInFilter: true,
renderItem: (h, scope, listeners) => {
return h('div', [
h('el-button', {
on: {
click: (e) => listeners.handleDetails(scope.row)
},
props: {
icon: 'el-icon-d-arrow-right',
type: 'text'
}
}, '详情')
])
}
}
}
}
export default tableConfig
<template>
<div class="app-container">
<ele-search
:columns="tableConfig.columns"
@handleSearch="handleSearch"
@handleReset="handleReset"
@handleFilter="handleFilter"
/>
<div class="table-container">
<TableBtns>
<template v-slot:left>
<el-button
icon="el-icon-upload2"
@click="handleAdd"
>导出申请</el-button>
<el-button
type="primary"
icon="el-icon-sort"
@click="handleSynchronization"
>ERP同步</el-button>
</template>
</TableBtns>
<ele-table
ref="eleTable"
v-bind="tableConfig"
:expand-params="expandParams"
:listeners="tableListeners"
@handleSelectionChange="handleSelectionChange"
/>
</div>
</div>
</template>
<script>
import constant from './constant'
import tableMixin from '@/mixins/table'
export default {
mixins: [tableMixin],
data() {
return {
expandParams: {}, // 筛选条件
tableListeners: {}, // 事件监听对象,供ele-table内部调用
tableConfig: constant
}
},
created() {
this.tableListeners = {
handleDetails: this.handleDetails // 详情
}
},
methods: {
// 详情页
handleDetails(row) {
console.log(row)
this.$router.push({ path: '/invoiceDetails', query: { objectID: row.ObjectID } })
},
handleSelectionChange(selection) {
console.log(selection)
this.selection = selection
}
}
}
</script>
<style>
</style>
<template>
<h2>复刻</h2>
</template>
<script>
export default {
}
</script>
<style>
</style>
This diff is collapsed.
This diff is collapsed.
......@@ -111,7 +111,7 @@ export default {
created() {
this.tableConfig.columns.handle.vif = this.isShowEditBtn
constant.tableConfig.initialParams = {
AccountID: this.objectID || this.$route.query.objectID,
BusinessObjectID: this.objectID || this.$route.query.objectID,
TypeCode: this.typeCode
}
if (this.moduleType) {
......
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