Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
cfcfa44c
Commit
cfcfa44c
authored
Sep 14, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单报价单等优化和修复bug
parent
9e08d3dc
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
505 additions
and
461 deletions
+505
-461
index.vue
src/components/ChooseContactDialog/index.vue
+1
-1
index.vue
src/components/CustomerContactSelector/index.vue
+8
-24
index.vue
src/components/DictSelector/index.vue
+3
-2
index.vue
src/components/ProductSelector/index.vue
+5
-11
index.vue
src/components/QuickCreateCustomer/index.vue
+10
-9
index.vue
src/components/SupplierSelector/index.vue
+10
-7
edit.vue
src/views/ecw/coupon/edit.vue
+33
-5
edit.vue
src/views/ecw/offer/edit.vue
+337
-316
edit.vue
src/views/ecw/order/edit.vue
+87
-81
edit.vue
src/views/ecw/supplier/edit.vue
+11
-5
No files found.
src/components/ChooseContactDialog/index.vue
View file @
cfcfa44c
<
template
>
<el-dialog
title=
"选择联系人"
visible
:before-close=
"closeDialog"
:close-on-click-modal=
"false"
>
<div
class=
"header mb-10"
>
<div
class=
"header mb-10
flex-center
"
>
<div
class=
"flex-center"
>
关键字:
</div>
<el-input
v-model=
"form.searchKey"
placeholder=
""
class=
"w-200"
></el-input>
<el-button
type=
"primary"
class=
"ml-10"
@
click=
"handleQuery"
>
搜索
</el-button>
...
...
src/components/CustomerContactSelector/index.vue
View file @
cfcfa44c
...
...
@@ -16,7 +16,7 @@
:value="index">
</el-option>
</el-select>
<
el-button
v-if=
"quickable"
type=
"text"
@
click=
"showQuickCreate=true"
class=
"ml-10"
>
{{
$t
(
'
快速新建
'
)
}}
</el-button
>
<
!--
<el-button
v-if=
"quickable"
type=
"text"
@
click=
"showQuickCreate=true"
class=
"ml-10"
>
{{
$t
(
'
快速新建
'
)
}}
</el-button>
--
>
<!--
<quick-create
v-if=
"showQuickCreate"
@
success=
"onQuickCreateSuccess"
@
close=
"showQuickCreate=false"
:default=
"
{type}">
</quick-create>
-->
</div>
...
...
@@ -33,7 +33,7 @@ export default {
type
:
Boolean
,
default
:
true
},
type
:
[
String
,
Number
]
,
// 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
type
:
String
,
// 客户类别,新建时指定默认类别,也可以根据需要筛选联系人所属的客户类别
},
data
(){
return
{
...
...
@@ -78,19 +78,10 @@ export default {
const
QuickCreateComp
=
Vue
.
extend
(
QuickCreateCustomer
)
const
dialog
=
new
QuickCreateComp
({
propsData
:{
default
:
{
type
:
this
.
type
}
type
:
this
.
type
},
})
/* dialog.$on = () => {
return {
success: this.onQuickCreateSuccess,
close: () => {
console.log('关闭拉')
this.showQuickCreate = false
}
}
} */
dialog
.
$on
(
'
close
'
,
()
=>
{
console
.
log
(
'
关闭拉
'
)
this
.
showQuickCreate
=
false
...
...
@@ -104,17 +95,8 @@ export default {
dialog
.
$mount
()
console
.
log
({
dialog
,
parent
:
this
})
window
.
dialogComp
=
dialog
document
.
body
.
append
(
dialog
.
$el
)
/* dialog.remove = () => {
console.log('关闭拉11')
document.body.removeChild(dialog.$el)
} */
}
},
created
(){
...
...
@@ -145,9 +127,11 @@ export default {
.
then
(
res
=>
this
.
list
=
res
.
data
)
.
finally
(()
=>
this
.
loading
=
false
)
},
onQuickCreateSuccess
(
id
){
onQuickCreateSuccess
(
data
){
this
.
showQuickCreate
=
false
getCustomerContactsListByCustomer
({
customerId
:
id
}).
then
(
res
=>
{
this
.
list
.
unshift
(
data
)
this
.
index
=
0
/* getCustomerContactsListByCustomer({customerId: id}).then(res => {
if(!res.data || !res.data.length){
return this.$message.error(this.$t('联系人信息获取失败'))
}
...
...
@@ -155,7 +139,7 @@ export default {
data.contactsName = data.name // 字段名跟getCustomerContactsSelect对齐
this.list.unshift(data)
this.index = 0
})
})
*/
}
}
}
...
...
src/components/DictSelector/index.vue
View file @
cfcfa44c
<
template
>
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
:clearable=
"clearable"
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-option
v-for=
"dict in formattedList"
:key=
"dict.value"
:label=
"$l(dict, 'label')"
:value=
"dict.value"
/>
</el-select>
...
...
@@ -52,7 +52,8 @@ export default {
filter
:
{
type
:
Function
,
default
:
()
=>
true
}
},
clearable
:
Boolean
},
data
(){
return
{
...
...
src/components/ProductSelector/index.vue
View file @
cfcfa44c
...
...
@@ -41,7 +41,6 @@ export default {
},
watch
:{
index
(
val
){
let
productId
=
val
!==
''
&&
val
!==
null
?
this
.
list
[
val
].
id
:
null
console
.
log
(
'
index val
'
,
val
,
productId
)
this
.
$emit
(
'
input
'
,
productId
)
...
...
@@ -50,15 +49,7 @@ export default {
},
value
(
val
){
console
.
log
(
'
初始化内容
'
,
val
)
/* let index = this.list.findIndex(item => item.id == val)
if(index < 0){
getProduct(val).then(res => {
this.list.unshift(res.data)
this.index = 0
})
} */
this
.
init
()
}
},
created
(){
...
...
@@ -67,14 +58,17 @@ export default {
},
methods
:{
init
(){
if
(
!
this
.
value
)
return
null
if
(
!
this
.
value
){
this
.
index
=
null
return
}
let
index
=
this
.
list
.
findIndex
(
item
=>
item
.
id
==
this
.
value
)
if
(
index
<
0
){
getProduct
(
this
.
value
).
then
(
res
=>
{
this
.
list
.
unshift
(
res
.
data
)
this
.
index
=
0
})
}
}
else
this
.
index
=
index
},
remoteMethod
(
keyword
){
let
params
=
{
...
...
src/components/QuickCreateCustomer/index.vue
View file @
cfcfa44c
...
...
@@ -73,14 +73,15 @@ export default {
},
// 表单校验
rules
:
{
name
:
[{
required
:
true
,
message
:
"
客户名称不能为空
"
,
trigger
:
"
blur
"
}],
'
customerContacts.0.phoneNew
'
:
[{
required
:
true
,
message
:
"
手机号不能为空
"
,
trigger
:
"
blur
"
}],
type
:
[{
required
:
true
,
message
:
"
客户类别不能为空
"
,
trigger
:
"
blur
"
}],
createTime
:
[{
required
:
true
,
message
:
"
创建时间不能为空
"
,
trigger
:
"
blur
"
}],
source
:
[{
required
:
true
,
message
:
"
客户来源不能为空
"
,
trigger
:
"
blur
"
}],
customerService
:
[{
required
:
true
,
message
:
"
客户经理不能为空
"
,
trigger
:
"
blur
"
}],
status
:
[{
required
:
true
,
message
:
"
客户状态不能为空
"
,
trigger
:
"
blur
"
}],
founder
:
[{
required
:
true
,
message
:
"
创建人不能为空
"
,
trigger
:
"
blur
"
}],
name
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户名称不能为空
"
),
trigger
:
"
blur
"
}],
'
customerContacts.0.phoneNew
'
:
[{
required
:
true
,
message
:
this
.
$t
(
"
手机号不能为空
"
),
trigger
:
"
blur
"
}],
'
customerContacts.0.name
'
:
[{
required
:
true
,
message
:
this
.
$t
(
"
联系人不能为空
"
),
trigger
:
"
blur
"
}],
type
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户类别不能为空
"
),
trigger
:
"
blur
"
}],
createTime
:
[{
required
:
true
,
message
:
this
.
$t
(
"
创建时间不能为空
"
),
trigger
:
"
blur
"
}],
source
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户来源不能为空
"
),
trigger
:
"
blur
"
}],
customerService
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户经理不能为空
"
),
trigger
:
"
blur
"
}],
status
:
[{
required
:
true
,
message
:
this
.
$t
(
"
客户状态不能为空
"
),
trigger
:
"
blur
"
}],
founder
:
[{
required
:
true
,
message
:
this
.
$t
(
"
创建人不能为空
"
),
trigger
:
"
blur
"
}],
},
serviceUserList
:
[],
countryList
:
[],
...
...
@@ -121,7 +122,7 @@ export default {
// 添加的提交
createCustomer
(
this
.
form
).
then
(
res
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
return
getCustomerContactsSelect
({
ids
:
res
.
data
})
return
getCustomerContactsSelect
({
customerId
:
res
.
data
})
}).
then
(
res
=>
{
this
.
$emit
(
'
success
'
,
res
.
data
[
0
])
})
...
...
src/components/SupplierSelector/index.vue
View file @
cfcfa44c
...
...
@@ -11,17 +11,17 @@
<el-option
v-for=
"(item, index) in list"
:key=
"item.id"
:label=
"
`$
{item.name}(${item.number})`
"
:label=
"
$l(item, 'company') + '('+item.companyCode+')'
"
:value=
"index"
>
</el-option>
</el-select>
</
template
>
<
script
>
import
{
getSupplier
,
getSupplierPage
}
from
'
@/api/ecw/supplier
'
// TODO 接口暂不支持关键词搜索,待接口支持后完善
export
default
{
props
:{
product
Type
:
[
String
,
Number
],
company
Type
:
[
String
,
Number
],
value
:
[
String
,
Number
]
},
data
(){
...
...
@@ -41,6 +41,7 @@ export default {
}
},
created
(){
this
.
remoteMethod
(
''
)
this
.
init
()
},
methods
:{
...
...
@@ -52,14 +53,16 @@ export default {
this
.
list
.
unshift
(
res
.
data
)
this
.
index
=
0
})
}
}
else
this
.
index
=
index
},
remoteMethod
(
keyword
){
let
params
=
{}
params
.
searchKey
=
keyword
let
params
=
{
pageSize
:
100
}
params
.
keyword
=
keyword
this
.
loading
=
true
getSupplierPage
(
params
)
.
then
(
res
=>
this
.
list
=
res
.
data
)
.
then
(
res
=>
this
.
list
=
res
.
data
.
list
)
.
finally
(()
=>
this
.
loading
=
false
)
}
}
...
...
src/views/ecw/coupon/edit.vue
View file @
cfcfa44c
...
...
@@ -60,8 +60,8 @@
<!--
<el-select
v-model=
"item.fullCurrencyId"
style=
"width:100px"
>
<el-option
v-for=
"item in currencyList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
-->
<selector
v-if=
"[
2,
4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<selector
v-if=
"form.type ==
3"
v-model=
"item.prodUnit"
:options=
"unitList"
label-field=
"titleZh"
value-field=
"id
"
defaultable
style=
"width:100px"
/>
<selector
v-if=
"[4,5].indexOf(form.type) > -1"
v-model=
"item.fullCurrencyId"
:options=
"currencyList"
label-field=
"titleZh"
value-field=
"id"
defaultable
style=
"width:100px"
/>
<selector
v-if=
"form.type ==
2"
v-model=
"item.combUnit"
:options=
"combUnitList"
label-field=
"label"
value-field=
"value
"
defaultable
style=
"width:100px"
/>
<span
v-if=
"[2].indexOf(form.type) > -1"
>
减
</span>
<span
v-if=
"[4].indexOf(form.type) > -1"
>
折扣率
</span>
...
...
@@ -267,7 +267,12 @@ export default {
status
:
1
,
},
// 表单校验
rules
:
{},
rules
:
{
isCargoControl
:
[{
required
:
true
,
message
:
'
请选择是否控货
'
}],
brand
:
[{
required
:
true
,
message
:
'
请选择品牌
'
}],
orderAttr
:
[{
required
:
true
,
message
:
'
请选择订单属性
'
}],
documentDeclaration
:
[{
required
:
true
,
message
:
'
请选择单证报关
'
}]
},
currencyList
:[],
/* clearanceFeeList:[{},{}],
freightFeeList:[{},{}],
...
...
@@ -317,12 +322,29 @@ export default {
})
}
return
costType
},
// 满减组合单位列表
combUnitList
(){
let
arr
=
[]
this
.
currencyList
.
forEach
(
item
=>
{
arr
.
push
({
label
:
this
.
$l
(
item
,
'
title
'
),
value
:
'
fullCurrencyId_
'
+
item
.
id
})
})
this
.
unitList
.
forEach
(
item
=>
{
arr
.
push
({
label
:
this
.
$l
(
item
,
'
title
'
),
value
:
'
prodUnit_
'
+
item
.
id
})
})
return
arr
}
},
watch
:{
'
form.type
'
(
val
){
// 方数满减3和特价6需要单位
if
((
val
==
3
||
val
==
6
)
&&
!
this
.
unitList
.
length
){
if
((
val
==
3
||
val
==
6
||
val
==
2
)
&&
!
this
.
unitList
.
length
){
this
.
getUnitList
()
}
...
...
@@ -429,7 +451,13 @@ export default {
return
this
.
$message
(
'
暂无费用设置
'
)
}
// 非有优惠券需要把运费和清关费一起提交
let
discountDetailedVOs
=
this
.
costType
==
3
?
this
.
fee
[
3
]
:
this
.
fee
[
1
].
concat
(
this
.
fee
[
2
])
let
discountDetailedVOs
=
this
.
costType
==
3
?
this
.
fee
[
3
]
:
this
.
fee
[
1
].
concat
(
this
.
fee
[
2
]).
filter
(
item
=>
item
.
netReceiptsAmount
||
item
.
fullAmount
)
discountDetailedVOs
.
map
(
item
=>
{
if
(
item
.
combUnit
){
let
tmp
=
item
.
combUnit
.
split
(
'
_
'
)
item
[
tmp
[
0
]]
=
tmp
[
1
]
}
})
let
data
=
Object
.
assign
({},
this
.
form
,
{
discountDetailedVOs
})
// 开始时间必填
if
(
!
data
.
startTime
)
data
.
startTime
=
'
2022-01-01 00:00:00
'
...
...
src/views/ecw/offer/edit.vue
View file @
cfcfa44c
This diff is collapsed.
Click to expand it.
src/views/ecw/order/edit.vue
View file @
cfcfa44c
This diff is collapsed.
Click to expand it.
src/views/ecw/supplier/edit.vue
View file @
cfcfa44c
...
...
@@ -3,16 +3,22 @@
<el-form
ref=
"elForm"
:model=
"formData"
:rules=
"rules"
size=
"small"
label-width=
"100px"
label-position=
"left"
>
<el-form-item
:label=
"$t('公司全称')"
prop=
"companyZh"
>
<el-input
v-model=
"formData.companyZh"
:placeholder=
"$t('请输入公司全称')"
show-word-limit
clearable
:style=
"
{width: '100%'}">
</el-input>
<el-input
v-model=
"formData.companyZh"
:placeholder=
"$t('请输入公司全称')"
show-word-limit
clearable
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('英文名称')"
prop=
"companyEn"
>
<el-input
v-model=
"formData.companyZh"
:placeholder=
"$t('请输入公司英文名')"
show-word-limit
clearable
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('代理名称')"
prop=
"agentName"
>
<
!--
<
el-form-item
:label=
"$t('代理名称')"
prop=
"agentName"
>
<el-input
v-model=
"formData.agentName"
:placeholder=
"$t('请输入代理名称')"
clearable
:style=
"
{width: '100%'}">
</el-input>
</el-form-item>
</el-form-item>
-->
<el-form-item
:label=
"$t('公司电话')"
prop=
"tell"
>
<el-input
v-model=
"formData.tell"
:placeholder=
"$t('请输入公司电话')"
clearable
:style=
"
{width: '100%'}"
>
</el-input>
<el-input
v-model=
"formData.tell"
:placeholder=
"$t('请输入公司电话')"
clearable
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('邮件地址')"
prop=
"email"
>
<el-input
v-model=
"formData.email"
:placeholder=
"$t('请输入邮箱地址')"
clearable
></el-input>
</el-form-item>
<el-form-item
:label=
"$t('公司地址')"
prop=
"address"
>
<!--
<el-select
v-model=
"formData.country"
>
<el-option
v-for=
"(item, index) in treeList"
:value=
"item.id"
:label=
"item.titleZh"
:key=
"item.id"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment