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
a2dd3cab
Commit
a2dd3cab
authored
Jun 07, 2022
by
wanglianghe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商品,路线新增字段
parent
01930c27
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
355 additions
and
36 deletions
+355
-36
dict.js
src/utils/dict.js
+3
-0
index.vue
src/views/ecw/product/index.vue
+243
-30
index.vue
src/views/ecw/productPrice/index.vue
+109
-6
No files found.
src/utils/dict.js
View file @
a2dd3cab
...
@@ -64,6 +64,9 @@ export const DICT_TYPE = {
...
@@ -64,6 +64,9 @@ export const DICT_TYPE = {
ECW_TRANSPORT_TYPE
:
'
transport_type
'
,
//货运方式
ECW_TRANSPORT_TYPE
:
'
transport_type
'
,
//货运方式
ECW_CHARGE_TYPE
:
'
warehouse_charge_type
'
,
//仓储收费方式
ECW_CHARGE_TYPE
:
'
warehouse_charge_type
'
,
//仓储收费方式
ECW_SHELF_TYPE
:
'
shelf_type
'
,
//货架类型
ECW_SHELF_TYPE
:
'
shelf_type
'
,
//货架类型
ECW_PRODUCT_MATERIAL
:
'
product_material
'
,
//商品材质
ECW_PACKAGING_TYPE
:
'
packaging_type
'
,
//包装要求
ECW_CONTAINER_LOCATION
:
'
container_location
'
,
//默认货柜位置
//--------ecw---------
//--------ecw---------
CUSTOMER_STATUS
:
'
customer_status
'
,
CUSTOMER_STATUS
:
'
customer_status
'
,
...
...
src/views/ecw/product/index.vue
View file @
a2dd3cab
...
@@ -3,24 +3,36 @@
...
@@ -3,24 +3,36 @@
<!-- 搜索工作栏 -->
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"产品类型"
prop=
"typeId"
>
<el-form-item
label=
"商品编码"
prop=
"productCode"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择产品类型"
clearable
>
<el-input
v-model=
"queryParams.productCode"
placeholder=
"请输入商品编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
>
<el-input
v-model=
"queryParams.customsCode"
placeholder=
"请输入海关编码"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品名称"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入商品名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"商品类型"
prop=
"typeId"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择商品类型"
clearable
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"产品属性"
prop=
"attrId"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择产品属性"
clearable
>
<el-form-item
label=
"商品特性"
prop=
"attrId"
>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择商品特性"
clearable
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"产品名称"
prop=
"titleZh"
>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"请输入产品名称"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"审核状态"
prop=
"auditStatus"
>
<el-form-item
label=
"审核状态"
prop=
"auditStatus"
>
<el-select
v-model=
"queryParams.auditStatus"
placeholder=
"选择审核状态"
clearable
>
<el-select
v-model=
"queryParams.auditStatus"
placeholder=
"选择审核状态"
clearable
>
<el-option
v-for=
"auditStatusItem in auditStatusDictDatas"
:key=
"auditStatusItem.id"
:label=
"auditStatusItem.label"
:value=
"auditStatusItem.value"
/>
<el-option
v-for=
"auditStatusItem in auditStatusDictDatas"
:key=
"auditStatusItem.id"
:label=
"auditStatusItem.label"
:value=
"auditStatusItem.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上架状态"
prop=
"status"
>
<el-form-item
label=
"上架状态"
prop=
"status"
>
<el-select
v-model=
"queryParams.status"
placeholder=
"选择上架状态"
clearable
>
<el-select
v-model=
"queryParams.status"
placeholder=
"选择上架状态"
clearable
>
<el-option
v-for=
"statusItem in statusDictDatas"
:key=
"statusItem.id"
:label=
"statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'"
:value=
"statusItem.value"
/>
<el-option
v-for=
"statusItem in statusDictDatas"
:key=
"statusItem.id"
:label=
"statusItem.value == CommonStatusEnum.ENABLE ? '已上架' : '已下架'"
:value=
"statusItem.value"
/>
...
@@ -45,15 +57,16 @@
...
@@ -45,15 +57,16 @@
<!-- 列表 -->
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"
产
品编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"
商
品编号"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"
产
品类型"
align=
"center"
prop=
"typeId"
>
<el-table-column
label=
"
商
品类型"
align=
"center"
prop=
"typeId"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span>
{{
getTypeName
(
scope
.
row
.
typeId
)
}}
</span>
<span>
{{
getTypeName
(
scope
.
row
.
typeId
)
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"海关编码"
align=
"center"
prop=
"customsCode"
/>
<el-table-column
label=
"中文标题"
align=
"center"
prop=
"titleZh"
/>
<el-table-column
label=
"中文标题"
align=
"center"
prop=
"titleZh"
/>
<el-table-column
label=
"英文标题"
align=
"center"
prop=
"titleEn"
/>
<el-table-column
label=
"英文标题"
align=
"center"
prop=
"titleEn"
/>
<el-table-column
label=
"
产品属
性"
align=
"center"
prop=
"attrId"
>
<el-table-column
label=
"
商品特
性"
align=
"center"
prop=
"attrId"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getAttrName
(
scope
.
row
.
attrId
)
}}
</span>
<span>
{{
getAttrName
(
scope
.
row
.
attrId
)
}}
</span>
</
template
>
</
template
>
...
@@ -80,7 +93,7 @@
...
@@ -80,7 +93,7 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"toPriceManager(scope.row)"
<el-button
size=
"mini"
type=
"text"
@
click=
"toPriceManager(scope.row)"
v-hasPermi=
"['ecw:product-price:query']"
>
价格管理
</el-button>
v-hasPermi=
"['ecw:product-price:query']"
>
路线价格
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:product:update']"
>
修改
</el-button>
...
@@ -94,10 +107,10 @@
...
@@ -94,10 +107,10 @@
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"5
0
0px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"5
5
0px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"110px"
>
<el-form-item
label=
"
产
品类型"
prop=
"typeId"
>
<el-form-item
label=
"
商
品类型"
prop=
"typeId"
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择
产
品类型"
clearable
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择
商
品类型"
clearable
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -105,16 +118,68 @@
...
@@ -105,16 +118,68 @@
<el-form-item
label=
"中文标题"
prop=
"titleZh"
>
<el-form-item
label=
"中文标题"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入中文标题"
/>
<el-input
v-model=
"form.titleZh"
placeholder=
"请输入中文标题"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"英文标题"
prop=
"titleEn"
>
<el-form-item
label=
"英文标题"
prop=
"titleEn"
>
<el-input
v-model=
"form.titleEn"
placeholder=
"请输入英文标题"
/>
<el-input
v-model=
"form.titleEn"
placeholder=
"请输入英文标题"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"产品属性"
prop=
"attrId"
>
<el-form-item
label=
"商品图片"
prop=
"img"
>
<el-select
v-model=
"form.attrId"
placeholder=
"选择产品属性"
clearable
>
<el-col
:span=
"8"
>
<el-input
v-model=
"form.imgs"
placeholder=
"请上传图片"
disabled
/>
</el-col>
<el-upload
action=
"#"
:http-request=
"requestUpload"
:show-file-list=
"false"
:before-upload=
"beforeUpload"
>
<el-button
size=
"small"
>
上传图片
<i
class=
"el-icon-upload el-icon--right"
></i>
</el-button>
</el-upload>
</el-form-item>
<el-form-item
label=
"商品编码"
prop=
"productCode"
>
<el-input
v-model=
"form.productCode"
placeholder=
"请输入商品编码"
/>
</el-form-item>
<el-form-item
label=
"海关编码"
prop=
"customsCode"
>
<el-input
v-model=
"form.customsCode"
placeholder=
"请输入海关编码"
/>
</el-form-item>
<el-form-item
label=
"商品特性"
prop=
"attrArray"
>
<el-select
v-model=
"form.attrArray"
placeholder=
"选择商品特性"
clearable
multiple
>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
<el-option
v-for=
"attr in attrList"
:key=
"attr.id"
:label=
"attr.attrName"
:value=
"attr.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品材质"
prop=
"materialType"
>
<el-select
v-model=
"form.materialType"
placeholder=
"选择商品材质"
clearable
>
<el-option
v-for=
"materialItem in materialList"
:key=
"materialItem.value"
:label=
"materialItem.label"
:value=
"materialItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"出运要求"
prop=
"requirements"
>
<el-checkbox
v-model=
"form.requirements"
:checked=
"form.requirements===1? true:false"
:true-label=
"1"
:false-label=
"0"
>
证书要求(支持多证书)
</el-checkbox>
</el-form-item>
<el-form-item
label=
"包装要求"
prop=
"packaging"
>
<el-select
v-model=
"form.packaging"
placeholder=
"选择包装要求"
clearable
>
<el-option
v-for=
"packageItem in packagingList"
:key=
"packageItem.value"
:label=
"packageItem.label"
:value=
"packageItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"默认货柜位置"
prop=
"containerLocation"
>
<el-select
v-model=
"form.containerLocation"
placeholder=
"选择货柜位置"
clearable
>
<el-option
v-for=
"locationItem in locationList"
:key=
"locationItem.value"
:label=
"locationItem.label"
:value=
"locationItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"默认方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
>
<!-- <template slot="append">立方米</template> -->
</el-input>
</el-form-item>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
...
@@ -125,6 +190,32 @@
...
@@ -125,6 +190,32 @@
<
template
slot=
"append"
>
立方米
</
template
>
<
template
slot=
"append"
>
立方米
</
template
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"默认重货标准"
prop=
"zhongLinjie"
>
<el-row
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-input
v-model.number=
"form.zhongLinjie"
type=
"number"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-col>
<el-col
:span=
"10"
>
<el-switch
v-model=
"zhongLinjieFlag"
@
change=
"zhongpaoChange('zhong')"
></el-switch>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"默认泡货标准"
prop=
"paoLinjie"
>
<el-row
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-input
v-model.number=
"form.paoLinjie"
type=
"number"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-col>
<el-col
:span=
"10"
>
<el-switch
v-model=
"paoLinjieFlag"
@
change=
"zhongpaoChange('pao')"
></el-switch>
</el-col>
</el-row>
</el-form-item>
</el-form>
</el-form>
...
@@ -141,7 +232,9 @@ import { createProduct, updateProduct, deleteProduct, getProduct, getProductPage
...
@@ -141,7 +232,9 @@ import { createProduct, updateProduct, deleteProduct, getProduct, getProductPage
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductAttrList
}
from
"
@/api/ecw/productAttr
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getProductTypeList
}
from
"
@/api/ecw/productType
"
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
getDictDatas
,
DICT_TYPE
}
from
'
@/utils/dict
'
;
import
{
CommonStatusEnum
,
AuditStatusEnum
}
from
'
@/utils/constants
'
import
{
CommonStatusEnum
,
AuditStatusEnum
}
from
'
@/utils/constants
'
;
import
{
getZhongPaoPage
}
from
"
@/api/ecw/zhongPao
"
;
import
{
uploadFile
}
from
"
@/api/infra/file
"
;
export
default
{
export
default
{
name
:
"
ProductList
"
,
name
:
"
ProductList
"
,
...
@@ -149,8 +242,22 @@ export default {
...
@@ -149,8 +242,22 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
//特性列表
attrList
:[],
attrList
:[],
//类型列表
typeList
:[],
typeList
:[],
//材质列表
materialList
:[],
//包装列表
packagingList
:[],
//货柜位置
locationList
:[],
//重货默认开启状态
zhongLinjieFlag
:
true
,
//泡货默认开启状态
paoLinjieFlag
:
true
,
//重泡货默认配置
zhongPaoInfo
:
{},
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
...
@@ -182,17 +289,26 @@ export default {
...
@@ -182,17 +289,26 @@ export default {
form
:
{},
form
:
{},
// 表单校验
// 表单校验
rules
:
{
rules
:
{
typeId
:
[{
required
:
true
,
message
:
"
产
品类型不能为空
"
,
trigger
:
"
change
"
}],
typeId
:
[{
required
:
true
,
message
:
"
商
品类型不能为空
"
,
trigger
:
"
change
"
}],
attr
Id
:
[{
required
:
true
,
message
:
"
产品属
性不能为空
"
,
trigger
:
"
change
"
}],
attr
Array
:
[{
required
:
true
,
message
:
"
商品特
性不能为空
"
,
trigger
:
"
change
"
}],
titleZh
:
[{
required
:
true
,
message
:
"
中文标题不能为空
"
,
trigger
:
"
blur
"
}],
titleZh
:
[{
required
:
true
,
message
:
"
中文标题不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文标题不能为空
"
,
trigger
:
"
blur
"
}],
titleEn
:
[{
required
:
true
,
message
:
"
英文标题不能为空
"
,
trigger
:
"
blur
"
}],
materialType
:[{
required
:
true
,
message
:
"
商品材质不能为空
"
,
trigger
:
"
blur
"
}],
packaging
:[{
required
:
true
,
message
:
"
包装要求不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:[{
required
:
true
,
message
:
"
默认货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:[{
required
:
true
,
message
:
"
默认方数不能为空
"
,
trigger
:
"
blur
"
}],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
},
CommonStatusEnum
:
CommonStatusEnum
,
CommonStatusEnum
:
CommonStatusEnum
,
AuditStatusEnum
:
AuditStatusEnum
,
AuditStatusEnum
:
AuditStatusEnum
,
statusDictDatas
:
getDictDatas
(
DICT_TYPE
.
COMMON_STATUS
),
statusDictDatas
:
getDictDatas
(
DICT_TYPE
.
COMMON_STATUS
),
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
)
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
),
materialList
:
getDictDatas
(
DICT_TYPE
.
ECW_PRODUCT_MATERIAL
),
packagingList
:
getDictDatas
(
DICT_TYPE
.
ECW_PACKAGING_TYPE
),
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
)
};
};
},
},
...
@@ -209,13 +325,19 @@ export default {
...
@@ -209,13 +325,19 @@ export default {
},
},
getAttrName
()
{
getAttrName
()
{
return
attrId
=>
{
return
attrIds
=>
{
for
(
let
index
in
this
.
attrList
)
{
let
productAttrArray
=
[];
let
attrItem
=
this
.
attrList
[
index
];
let
attrArray
=
attrIds
.
split
(
'
,
'
);
if
(
attrItem
.
id
==
attrId
)
{
for
(
let
attrIndex
in
attrArray
)
{
return
attrItem
.
attrName
;
let
attrId
=
attrArray
[
attrIndex
];
for
(
let
index
in
this
.
attrList
)
{
let
attrItem
=
this
.
attrList
[
index
];
if
(
attrItem
.
id
==
attrId
)
{
productAttrArray
.
push
(
attrItem
.
attrName
);
}
}
}
}
}
return
productAttrArray
.
join
(
'
,
'
);
}
}
},
},
},
},
...
@@ -229,8 +351,27 @@ export default {
...
@@ -229,8 +351,27 @@ export default {
this
.
getAttrList
();
this
.
getAttrList
();
this
.
getTypeList
();
this
.
getTypeList
();
this
.
getList
();
this
.
getList
();
this
.
getZhongPaoInfo
();
},
},
methods
:
{
methods
:
{
/**获取重泡货默认配置 */
getZhongPaoInfo
()
{
getZhongPaoPage
({}).
then
(
response
=>
{
let
list
=
response
.
data
.
list
;
if
(
list
&&
list
.
length
>
0
)
{
this
.
zhongPaoInfo
=
list
[
0
];
}
})
},
zhongpaoChange
(
type
)
{
if
(
type
==
'
zhong
'
)
{
this
.
setZhongValue
();
}
else
if
(
type
==
'
pao
'
)
{
this
.
setPaoValue
();
}
},
/** 获取产品属性列表 */
/** 获取产品属性列表 */
getAttrList
()
{
getAttrList
()
{
getProductAttrList
().
then
(
response
=>
{
getProductAttrList
().
then
(
response
=>
{
...
@@ -290,11 +431,13 @@ export default {
...
@@ -290,11 +431,13 @@ export default {
this
.
form
=
{
this
.
form
=
{
id
:
undefined
,
id
:
undefined
,
typeId
:
undefined
,
typeId
:
undefined
,
attrArray
:
undefined
,
attrId
:
undefined
,
attrId
:
undefined
,
titleZh
:
undefined
,
titleZh
:
undefined
,
titleEn
:
undefined
,
titleEn
:
undefined
,
auditStatus
:
undefined
,
auditStatus
:
undefined
,
status
:
undefined
,
status
:
undefined
,
requirements
:
0
,
};
};
this
.
resetForm
(
"
form
"
);
this
.
resetForm
(
"
form
"
);
},
},
...
@@ -313,10 +456,12 @@ export default {
...
@@ -313,10 +456,12 @@ export default {
handleAdd
()
{
handleAdd
()
{
this
.
reset
();
this
.
reset
();
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
添加
产
品
"
;
this
.
title
=
"
添加
商
品
"
;
if
(
this
.
queryParams
.
typeId
)
{
if
(
this
.
queryParams
.
typeId
)
{
this
.
form
.
typeId
=
this
.
queryParams
.
typeId
;
this
.
form
.
typeId
=
this
.
queryParams
.
typeId
;
}
}
this
.
setZhongValue
();
this
.
setPaoValue
();
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
@@ -324,10 +469,42 @@ export default {
...
@@ -324,10 +469,42 @@ export default {
const
id
=
row
.
id
;
const
id
=
row
.
id
;
getProduct
(
id
).
then
(
response
=>
{
getProduct
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
form
=
response
.
data
;
let
attrArray
=
this
.
form
.
attrId
.
split
(
'
,
'
);
for
(
let
index
in
attrArray
)
{
let
value
=
attrArray
[
index
];
attrArray
[
index
]
=
parseInt
(
value
);
}
this
.
form
.
attrArray
=
attrArray
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改产品
"
;
this
.
title
=
"
修改商品
"
;
if
(
!
this
.
form
.
zhongLinjie
)
{
this
.
setZhongValue
();
}
if
(
!
this
.
form
.
paoLinjie
)
{
this
.
setPaoValue
();
}
});
});
},
},
setZhongValue
()
{
if
(
this
.
zhongLinjieFlag
&&
this
.
zhongPaoInfo
.
zhongLinjie
)
{
this
.
form
.
zhongLinjie
=
parseFloat
(
this
.
zhongPaoInfo
.
zhongLinjie
);
}
else
{
// this.form.zhongLinjie = null;
}
},
setPaoValue
()
{
if
(
this
.
paoLinjieFlag
&&
this
.
zhongPaoInfo
.
paoLinjie
)
{
this
.
form
.
paoLinjie
=
parseFloat
(
this
.
zhongPaoInfo
.
paoLinjie
);
}
else
{
// this.form.paoLinjie = null;
}
},
/** 提交按钮 */
/** 提交按钮 */
submitForm
()
{
submitForm
()
{
console
.
log
(
this
.
form
);
console
.
log
(
this
.
form
);
...
@@ -335,6 +512,9 @@ export default {
...
@@ -335,6 +512,9 @@ export default {
if
(
!
valid
)
{
if
(
!
valid
)
{
return
;
return
;
}
}
//商品特性转字符串
this
.
form
.
attrId
=
this
.
form
.
attrArray
.
join
(
'
,
'
);
// 修改的提交
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateProduct
(
this
.
form
).
then
(
response
=>
{
updateProduct
(
this
.
form
).
then
(
response
=>
{
...
@@ -355,7 +535,7 @@ export default {
...
@@ -355,7 +535,7 @@ export default {
/** 删除按钮操作 */
/** 删除按钮操作 */
handleDelete
(
row
)
{
handleDelete
(
row
)
{
const
id
=
row
.
id
;
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除
产
品编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
'
是否确认删除
商
品编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
return
deleteProduct
(
id
);
return
deleteProduct
(
id
);
}).
then
(()
=>
{
}).
then
(()
=>
{
this
.
getList
();
this
.
getList
();
...
@@ -370,14 +550,47 @@ export default {
...
@@ -370,14 +550,47 @@ export default {
params
.
pageSize
=
undefined
;
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有
产
品数据项?
'
).
then
(()
=>
{
this
.
$modal
.
confirm
(
'
是否确认导出所有
商
品数据项?
'
).
then
(()
=>
{
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportProductExcel
(
params
);
return
exportProductExcel
(
params
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
},
// 覆盖默认的上传行为
requestUpload
()
{
},
// 上传预处理
beforeUpload
(
file
)
{
if
(
file
.
type
.
indexOf
(
"
image/
"
)
==
-
1
)
{
this
.
$modal
.
msgError
(
"
文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。
"
);
}
else
{
//上传
let
formData
=
new
FormData
();
formData
.
append
(
"
file
"
,
file
);
formData
.
append
(
"
path
"
,
this
.
uuid
());
uploadFile
(
formData
).
then
(
response
=>
{
this
.
$set
(
this
.
form
,
'
imgs
'
,
response
.
data
);
// this.form.img = response.data;
})
}
},
uuid
()
{
var
s
=
[];
var
hexDigits
=
"
0123456789abcdef
"
;
for
(
var
i
=
0
;
i
<
36
;
i
++
)
{
s
[
i
]
=
hexDigits
.
substr
(
Math
.
floor
(
Math
.
random
()
*
0x10
),
1
);
}
s
[
14
]
=
"
4
"
;
// bits 12-15 of the time_hi_and_version field to 0010
s
[
19
]
=
hexDigits
.
substr
((
s
[
19
]
&
0x3
)
|
0x8
,
1
);
// bits 6-7 of the clock_seq_hi_and_reserved to 01
s
[
8
]
=
s
[
13
]
=
s
[
18
]
=
s
[
23
]
=
"
-
"
;
var
uuid
=
s
.
join
(
""
);
return
uuid
;
},
}
}
};
};
</
script
>
</
script
>
src/views/ecw/productPrice/index.vue
View file @
a2dd3cab
...
@@ -105,16 +105,16 @@
...
@@ -105,16 +105,16 @@
<!-- 对话框(添加 / 修改) -->
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"900px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
11
0px"
>
<el-form-item
label=
"
产
品类型"
prop=
"typeId"
>
<el-form-item
label=
"
商
品类型"
prop=
"typeId"
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择产品类型"
disabled
>
<el-select
v-model=
"form.typeId"
placeholder=
"选择产品类型"
disabled
>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
<el-option
v-for=
"type in typeList"
:key=
"type.id"
:label=
"type.titleZh"
:value=
"type.id"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
产
品名称"
prop=
"titleZh"
>
<el-form-item
label=
"
商
品名称"
prop=
"titleZh"
>
<el-input
v-model=
"form.titleZh"
disabled
/>
<el-input
v-model=
"form.titleZh"
disabled
/>
</el-form-item>
</el-form-item>
...
@@ -218,6 +218,60 @@
...
@@ -218,6 +218,60 @@
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<div
style=
"font-size:20px;"
>
基础信息
</div>
<el-form-item
label=
"需要预约入仓"
prop=
"needBook"
>
<el-radio
v-model.number=
"form.needBook"
:label=
"1"
>
是
</el-radio>
<el-radio
v-model.number=
"form.needBook"
:label=
"0"
>
否
</el-radio>
</el-form-item>
<el-form-item
label=
"每日入仓上限"
prop=
"dayLimit"
>
<el-input
v-model.number=
"form.dayLimit"
type=
"number"
>
<
template
slot=
"append"
>
立方米
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"货柜位置"
prop=
"containerLocation"
>
<el-select
v-model=
"form.containerLocation"
placeholder=
"选择货柜位置"
clearable
>
<el-option
v-for=
"locationItem in locationList"
:key=
"locationItem.value"
:label=
"locationItem.label"
:value=
"locationItem.value"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"方数要求"
prop=
"square"
>
<el-input
v-model.number=
"form.square"
type=
"number"
>
<!-- <template slot="append">立方米</template> -->
</el-input>
</el-form-item>
<el-form-item
label=
"重货标准"
prop=
"zhongLinjie"
>
<el-row
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-input
v-model.number=
"form.zhongLinjie"
type=
"number"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-col>
<el-col
:span=
"10"
>
<el-switch
v-model=
"zhongLinjieFlag"
@
change=
"zhongpaoChange('zhong')"
></el-switch>
</el-col>
</el-row>
</el-form-item>
<el-form-item
label=
"泡货标准"
prop=
"paoLinjie"
>
<el-row
class=
"mb8"
>
<el-col
:span=
"12"
>
<el-input
v-model.number=
"form.paoLinjie"
type=
"number"
>
<
template
slot=
"append"
>
kg/cbm
</
template
>
</el-input>
</el-col>
<el-col
:span=
"10"
>
<el-switch
v-model=
"paoLinjieFlag"
@
change=
"zhongpaoChange('pao')"
></el-switch>
</el-col>
</el-row>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
@@ -255,6 +309,13 @@ export default {
...
@@ -255,6 +309,13 @@ export default {
routeParams
:{},
//路线搜索条件
routeParams
:{},
//路线搜索条件
isUpdate
:
false
,
//更新操作
isUpdate
:
false
,
//更新操作
//货柜位置
locationList
:[],
//重货默认开启状态
zhongLinjieFlag
:
true
,
//泡货默认开启状态
paoLinjieFlag
:
true
,
// 遮罩层
// 遮罩层
loading
:
true
,
loading
:
true
,
// 导出遮罩层
// 导出遮罩层
...
@@ -297,12 +358,18 @@ export default {
...
@@ -297,12 +358,18 @@ export default {
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
transportPrice
:
[{
required
:
true
,
message
:
"
海运费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
clearancePrice
:
[{
required
:
true
,
message
:
"
清关费不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
advanceStatus
:
[{
required
:
true
,
message
:
"
是否预付不能为空
"
,
trigger
:
"
blur
"
}],
containerLocation
:[{
required
:
true
,
message
:
"
货柜位置不能为空
"
,
trigger
:
"
blur
"
}],
square
:[{
required
:
true
,
message
:
"
方数不能为空
"
,
trigger
:
"
blur
"
}],
// zhongLinjie:[{ required: true, message: "默认重货标准不能为空", trigger: "blur" }],
// paoLinjie:[{ required: true, message: "默认泡货标准不能为空", trigger: "blur" }],
needBook
:[{
required
:
true
,
message
:
"
预约入仓不能为空
"
,
trigger
:
"
blur
"
}],
},
},
transportDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
transportDatas
:
getDictDatas
(
DICT_TYPE
.
ECW_TRANSPORT_TYPE
),
advanceStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
ADVANCE_STATUS
),
advanceStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
ADVANCE_STATUS
),
AuditStatusEnum
:
AuditStatusEnum
,
AuditStatusEnum
:
AuditStatusEnum
,
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
),
auditStatusDictDatas
:
getDictDatas
(
DICT_TYPE
.
AUDIT_STATUS
),
locationList
:
getDictDatas
(
DICT_TYPE
.
ECW_CONTAINER_LOCATION
),
lineList
:
[]
lineList
:
[]
};
};
},
},
...
@@ -365,7 +432,10 @@ export default {
...
@@ -365,7 +432,10 @@ export default {
},
},
created
()
{
created
()
{
// this.transportDatas = getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE);
// console.log(this.transportDatas);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
let
productJson
=
localStorage
.
getItem
(
'
product
'
);
// console.log(productJson);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
this
.
product
=
eval
(
'
(
'
+
productJson
+
'
)
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
let
typeListJson
=
localStorage
.
getItem
(
'
typeList
'
);
...
@@ -517,6 +587,14 @@ export default {
...
@@ -517,6 +587,14 @@ export default {
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
typeId
=
this
.
product
.
typeId
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
form
.
needBook
=
this
.
product
.
needBook
;
this
.
form
.
dayLimit
=
this
.
product
.
dayLimit
;
this
.
form
.
containerLocation
=
this
.
product
.
containerLocation
;
this
.
form
.
square
=
this
.
product
.
square
;
this
.
form
.
paoLinjie
=
this
.
product
.
paoLinjie
;
this
.
form
.
zhongLinjie
=
this
.
product
.
zhongLinjie
;
if
(
this
.
currecyList
)
{
if
(
this
.
currecyList
)
{
let
priceUnitId
=
this
.
currecyList
[
0
].
id
;
let
priceUnitId
=
this
.
currecyList
[
0
].
id
;
this
.
form
.
transportPriceUnit
=
priceUnitId
;
this
.
form
.
transportPriceUnit
=
priceUnitId
;
...
@@ -529,7 +607,9 @@ export default {
...
@@ -529,7 +607,9 @@ export default {
}
}
this
.
isUpdate
=
false
;
this
.
isUpdate
=
false
;
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
添加产品价格
"
;
this
.
title
=
"
添加路线价格
"
;
this
.
setZhongValue
();
this
.
setPaoValue
();
},
},
/** 修改按钮操作 */
/** 修改按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
...
@@ -545,8 +625,10 @@ export default {
...
@@ -545,8 +625,10 @@ export default {
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleZh
=
this
.
product
.
titleZh
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
form
.
titleEn
=
this
.
product
.
titleEn
;
this
.
isUpdate
=
true
;
this
.
isUpdate
=
true
;
// console.log(this.form);
this
.
open
=
true
;
this
.
open
=
true
;
this
.
title
=
"
修改
产品
价格
"
;
this
.
title
=
"
修改
路线
价格
"
;
});
});
},
},
...
@@ -627,7 +709,28 @@ export default {
...
@@ -627,7 +709,28 @@ export default {
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
$download
.
excel
(
response
,
'
${table.classComment}.xls
'
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
},
zhongpaoChange
(
type
)
{
if
(
type
==
'
zhong
'
)
{
this
.
setZhongValue
();
}
else
if
(
type
==
'
pao
'
)
{
this
.
setPaoValue
();
}
},
setZhongValue
()
{
// console.log(this.product);
if
(
this
.
zhongLinjieFlag
&&
this
.
product
.
zhongLinjie
)
{
this
.
form
.
zhongLinjie
=
parseFloat
(
this
.
product
.
zhongLinjie
);
}
},
setPaoValue
()
{
if
(
this
.
paoLinjieFlag
&&
this
.
product
.
paoLinjie
)
{
this
.
form
.
paoLinjie
=
parseFloat
(
this
.
product
.
paoLinjie
);
}
},
}
}
};
};
</
script
>
</
script
>
...
...
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