|
|
@ -11,23 +11,23 @@ |
|
|
|
label-width="80px" |
|
|
|
label-suffix=":" |
|
|
|
> |
|
|
|
<el-form-item label="模糊查询"> |
|
|
|
<el-input |
|
|
|
v-model="query.search" |
|
|
|
clearable |
|
|
|
style="width: 300px" |
|
|
|
size="mini" |
|
|
|
placeholder="输入客户编码或客户名称" |
|
|
|
prefix-icon="el-icon-search" |
|
|
|
class="filter-item" |
|
|
|
/> |
|
|
|
<el-form-item :label="$t('customer.placeholder.select')"> |
|
|
|
<el-input |
|
|
|
v-model="query.search" |
|
|
|
clearable |
|
|
|
style="width: 300px" |
|
|
|
size="mini" |
|
|
|
:placeholder="$t('customer.placeholder.input')" |
|
|
|
prefix-icon="el-icon-search" |
|
|
|
class="filter-item" |
|
|
|
/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="是否启用"> |
|
|
|
<el-form-item :label="$t('customer.placeholder.is_enable')"> |
|
|
|
<el-select |
|
|
|
v-model="query.is_used" |
|
|
|
clearable |
|
|
|
size="mini" |
|
|
|
placeholder="请选择" |
|
|
|
:placeholder="$t('customer.placeholder.please_select')" |
|
|
|
class="filter-item" |
|
|
|
@change="crud.toQuery" |
|
|
|
> |
|
|
@ -55,59 +55,59 @@ |
|
|
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="140px"> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户编码" prop="cust_code"> |
|
|
|
<el-form-item :label="$t('customer.dialog.code')" prop="cust_code"> |
|
|
|
<el-input v-model="form.cust_code" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户名称 " prop="cust_name"> |
|
|
|
<el-form-item :label="$t('customer.dialog.name')" prop="cust_name"> |
|
|
|
<el-input v-model="form.cust_name" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="客户简称 " prop="cust_simple_name"> |
|
|
|
<el-form-item :label="$t('customer.dialog.simple_name')" prop="cust_simple_name"> |
|
|
|
<el-input v-model="form.cust_simple_name" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="20"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="公司地址"> |
|
|
|
<el-form-item :label="$t('customer.dialog.address')"> |
|
|
|
<el-input v-model="form.corp_address" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="公司电话"> |
|
|
|
<el-form-item :label="$t('customer.dialog.telephone')"> |
|
|
|
<el-input v-model="form.corp_tele_no" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="是否启用" prop="is_used"> |
|
|
|
<el-radio v-model="form.is_used" label="0">否</el-radio> |
|
|
|
<el-radio v-model="form.is_used" label="1">是</el-radio> |
|
|
|
<el-form-item :label="$t('customer.placeholder.is_enable')" prop="is_used"> |
|
|
|
<el-radio v-model="form.is_used" label="0">{{ $t('customer.dialog.no') }}</el-radio> |
|
|
|
<el-radio v-model="form.is_used" label="1">{{ $t('customer.dialog.yes') }}</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="24"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="送货单打印模板路径"> |
|
|
|
<el-form-item :label="$t('customer.dialog.shd_print_no')"> |
|
|
|
<el-input v-model="form.shd_print_no" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="送货单明细数"> |
|
|
|
<el-input-number v-model="form.shd_dtl_num" :min="1" :max="100" :precision="0" :controls="true" style="width: 200px;"/> |
|
|
|
<el-form-item :label="$t('customer.dialog.dtl_num')"> |
|
|
|
<el-input-number v-model="form.shd_dtl_num" :min="1" :max="100" :precision="0" :controls="true" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="24"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="包装打印模板:"> |
|
|
|
<el-form-item :label="$t('customer.dialog.bz_print_no')"> |
|
|
|
<el-select |
|
|
|
v-model="form.bz_print_no" |
|
|
|
clearable |
|
|
|
size="mini" |
|
|
|
placeholder="请选择" |
|
|
|
:placeholder="$t('customer.placeholder.please_select')" |
|
|
|
class="filter-item" |
|
|
|
style="width: 210px" |
|
|
|
> |
|
|
@ -121,25 +121,25 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="是否自动贴标" prop="is_auto_table"> |
|
|
|
<el-radio v-model="form.is_auto_table" label="0">否</el-radio> |
|
|
|
<el-radio v-model="form.is_auto_table" label="1">是</el-radio> |
|
|
|
<el-form-item :label="$t('customer.dialog.is_auto_table')" prop="is_auto_table"> |
|
|
|
<el-radio v-model="form.is_auto_table" label="0">{{ $t('customer.dialog.no') }}</el-radio> |
|
|
|
<el-radio v-model="form.is_auto_table" label="1">{{ $t('customer.dialog.yes') }}</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="业务员" prop="sales_owner"> |
|
|
|
<el-form-item :label="$t('customer.dialog.sales_owner')" prop="sales_owner"> |
|
|
|
<el-input v-model="form.sales_owner" style="width: 200px;" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="24"> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="内标打印模板:"> |
|
|
|
<el-form-item :label="$t('customer.dialog.bz_print_within')"> |
|
|
|
<el-select |
|
|
|
v-model="form.bz_print_within" |
|
|
|
clearable |
|
|
|
size="mini" |
|
|
|
placeholder="请选择" |
|
|
|
:placeholder="$t('customer.placeholder.please_select')" |
|
|
|
class="filter-item" |
|
|
|
style="width: 210px" |
|
|
|
> |
|
|
@ -155,15 +155,15 @@ |
|
|
|
</el-row> |
|
|
|
<el-row :gutter="24"> |
|
|
|
<el-col :span="16"> |
|
|
|
<el-form-item label="备注"> |
|
|
|
<el-form-item :label="$t('customer.dialog.remark')"> |
|
|
|
<el-input v-model="form.remark" style="width: 550px;" type="textarea" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="text" @click="crud.cancelCU">取消</el-button> |
|
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button> |
|
|
|
<el-button type="text" @click="crud.cancelCU">{{ $t('customer.dialog.cancel') }}</el-button> |
|
|
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('customer.dialog.confirm') }}</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!--表格渲染--> |
|
|
@ -175,20 +175,20 @@ |
|
|
|
style="width: 100%;" |
|
|
|
@selection-change="crud.selectionChangeHandler" |
|
|
|
> |
|
|
|
<el-table-column prop="cust_code" label="客户编码" :min-width="flexWidth('cust_code',crud.data,'客户编码')" /> |
|
|
|
<el-table-column prop="cust_name" label="客户名称 " show-overflow-tooltip width="150px" /> |
|
|
|
<el-table-column prop="cust_simple_name" label="客户简称 " :min-width="flexWidth('cust_simple_name',crud.data,'客户简称')" /> |
|
|
|
<el-table-column prop="sales_owner" label="业务员 " :min-width="flexWidth('sales_owner',crud.data,'业务员')" /> |
|
|
|
<el-table-column prop="corp_tele_no" label="公司电话" :min-width="flexWidth('corp_tele_no',crud.data,'公司电话')" /> |
|
|
|
<el-table-column prop="corp_address" label="公司地址" width="150px" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="bz_print_no" label="包装打印模板" :formatter="printTemple" :min-width="flexWidth('bz_print_within',crud.data,'内标打印模板')" /> |
|
|
|
<el-table-column prop="bz_print_within" label="内标打印模板" :formatter="printTemple2" :min-width="flexWidth('bz_print_within',crud.data,'内标打印模板')" /> |
|
|
|
<el-table-column prop="shd_print_no" label="送货单打印模板路径" :min-width="flexWidth('shd_print_no',crud.data,'送货单打印模板路径')"/> |
|
|
|
<el-table-column prop="shd_dtl_num" label="送货单明细数" :min-width="flexWidth('shd_dtl_num',crud.data,'送货单明细数')" /> |
|
|
|
<el-table-column prop="is_auto_table" label="是否自动贴标" :min-width="flexWidth('is_auto_table',crud.data,'是否自动贴标')" :formatter="autoTable"/> |
|
|
|
<el-table-column prop="update_name" label="修改者" :min-width="flexWidth('update_name',crud.data,'修改者')"/> |
|
|
|
<el-table-column prop="update_time" label="修改时间" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> |
|
|
|
<el-table-column label="启用" align="center" prop="is_used"> |
|
|
|
<el-table-column prop="cust_code" :label="$t('customer.dialog.code')" :min-width="flexWidth('cust_code',crud.data,'客户编码')" /> |
|
|
|
<el-table-column prop="cust_name" :label="$t('customer.dialog.name')" show-overflow-tooltip width="150px" /> |
|
|
|
<el-table-column prop="cust_simple_name" :label="$t('customer.dialog.simple_name')" :min-width="flexWidth('cust_simple_name',crud.data,'客户简称')" /> |
|
|
|
<el-table-column prop="sales_owner" :label="$t('customer.dialog.sales_owner')" :min-width="flexWidth('sales_owner',crud.data,'业务员')" /> |
|
|
|
<el-table-column prop="corp_tele_no" :label="$t('customer.dialog.telephone')" :min-width="flexWidth('corp_tele_no',crud.data,'公司电话')" /> |
|
|
|
<el-table-column prop="corp_address" :label="$t('customer.dialog.address')" width="150px" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="bz_print_no" :label="$t('customer.dialog.bz_print_no')" :formatter="printTemple" :min-width="flexWidth('bz_print_within',crud.data,'内标打印模板')" /> |
|
|
|
<el-table-column prop="bz_print_within" :label="$t('customer.dialog.bz_print_within')" :formatter="printTemple2" :min-width="flexWidth('bz_print_within',crud.data,'内标打印模板')" /> |
|
|
|
<el-table-column prop="shd_print_no" :label="$t('customer.dialog.shd_print_no')" :min-width="flexWidth('shd_print_no',crud.data,'送货单打印模板路径')" /> |
|
|
|
<el-table-column prop="shd_dtl_num" :label="$t('customer.dialog.dtl_num')" :min-width="flexWidth('shd_dtl_num',crud.data,'送货单明细数')" /> |
|
|
|
<el-table-column prop="is_auto_table" :label="$t('customer.dialog.is_auto_table')" :min-width="flexWidth('is_auto_table',crud.data,'是否自动贴标')" :formatter="autoTable" /> |
|
|
|
<el-table-column prop="update_name" :label="$t('customer.dialog.update_name')" :min-width="flexWidth('update_name',crud.data,'修改者')" /> |
|
|
|
<el-table-column prop="update_time" :label="$t('customer.dialog.update_time')" :min-width="flexWidth('update_time',crud.data,'修改时间')" /> |
|
|
|
<el-table-column :label="$t('customer.dialog.enable')" align="center" prop="is_used"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-switch |
|
|
|
v-model="scope.row.is_used" |
|
|
@ -202,7 +202,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-permission="['admin','customerbase:edit','customerbase:del']" |
|
|
|
label="操作" |
|
|
|
:label="$t('customer.dialog.operate')" |
|
|
|
width="150px" |
|
|
|
align="center" |
|
|
|
> |
|
|
@ -227,6 +227,7 @@ import rrOperation from '@crud/RR.operation' |
|
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
import udOperation from '@crud/UD.operation' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import i18n from '@/i18n' |
|
|
|
|
|
|
|
const defaultForm = { |
|
|
|
cust_id: null, |
|
|
@ -258,7 +259,7 @@ export default { |
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
|
|
|
cruds() { |
|
|
|
return CRUD({ |
|
|
|
title: '客户基础表', |
|
|
|
title: i18n.t('customer.title'), |
|
|
|
url: 'api/customerbase', |
|
|
|
optShow: { |
|
|
|
add: true, |
|
|
@ -278,16 +279,16 @@ export default { |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
cust_id: [ |
|
|
|
{ required: true, message: '客户标识不能为空', trigger: 'blur' } |
|
|
|
{ required: true, message: this.$t('customer.msg.isNotEmpty'), trigger: 'blur' } |
|
|
|
], |
|
|
|
cust_code: [ |
|
|
|
{ required: true, message: '客户编码不能为空', trigger: 'blur' } |
|
|
|
{ required: true, message: this.$t('customer.msg.isNotEmpty'), trigger: 'blur' } |
|
|
|
], |
|
|
|
cust_name: [ |
|
|
|
{ required: true, message: '客户名称 不能为空', trigger: 'blur' } |
|
|
|
{ required: true, message: this.$t('customer.msg.isNotEmpty'), trigger: 'blur' } |
|
|
|
], |
|
|
|
is_used: [ |
|
|
|
{ required: true, message: '是否启用不能为空', trigger: 'blur' } |
|
|
|
{ required: true, message: this.$t('customer.msg.isNotEmpty'), trigger: 'blur' } |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|