Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2a38fe9d
authored
May 21, 2021
by
肖康
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
x
parent
7ea16fd5
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
115 additions
and
110 deletions
src/components/menu.vue
src/views/Goods/brand.vue
src/views/Goods/goods.vue
src/views/Index/index.vue
src/views/Info/message.vue
src/views/List/inquire.vue
src/views/List/inquireDetail.vue
src/views/List/quote.vue
src/views/Store/enter.vue
src/views/Store/list.vue
src/views/Store/listDetail.vue
src/views/User/login.vue
view/app.d798c12a0562670b797e.js → view/app.d8cc6b26c012e569520d.js
view/index.html
view/js/12.js
view/js/13.js
view/js/14.js
view/js/15.js
view/js/16.js
view/js/17.js
view/js/18.js
view/js/19.js
view/js/2.js
view/js/20.js
view/js/21.js
view/js/22.js
src/components/menu.vue
View file @
2a38fe9d
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
Dialog
,
Dialog
,
Button
Button
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Menu
).
use
(
MenuItem
).
use
(
MenuItemGroup
).
use
(
Submenu
).
use
(
Form
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Button
).
use
(
Vue
.
use
(
Menu
).
use
(
MenuItem
).
use
(
MenuItemGroup
).
use
(
Submenu
).
use
(
Form
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Button
).
use
(
Input
);
Input
);
...
@@ -334,7 +334,7 @@
...
@@ -334,7 +334,7 @@
if
(
valid
)
{
if
(
valid
)
{
this
.
$http
(
'post'
,
"/api/user/setpasswd"
,
this
.
ruleForm
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/user/setpasswd"
,
this
.
ruleForm
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
'修改成功'
);
this
.
$m
essage
(
'修改成功'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
Util
.
delCookie
(
'token'
);
Util
.
delCookie
(
'token'
);
window
.
location
.
href
=
'/#/login'
;
window
.
location
.
href
=
'/#/login'
;
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
history
.
go
(
0
);
history
.
go
(
0
);
},
2000
)
},
2000
)
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
console
.
log
(
err
.
message
);
console
.
log
(
err
.
message
);
...
...
src/views/Goods/brand.vue
View file @
2a38fe9d
...
@@ -110,6 +110,7 @@
...
@@ -110,6 +110,7 @@
Pagination
,
Pagination
,
Autocomplete
Autocomplete
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
).
use
(
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
).
use
(
Autocomplete
)
Autocomplete
)
Vue
.
use
(
TableColumn
).
use
(
Table
)
Vue
.
use
(
TableColumn
).
use
(
Table
)
...
@@ -155,17 +156,17 @@
...
@@ -155,17 +156,17 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
updateBrand
()
{
updateBrand
()
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
M
essage
(
"只能选择一条数据"
)
this
.
$m
essage
(
"只能选择一条数据"
)
return
return
}
}
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
this
.
updateBranddata
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
this
.
updateBranddata
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
...
@@ -179,11 +180,11 @@
...
@@ -179,11 +180,11 @@
}
}
this
.
$http
(
'post'
,
"/api/brand/update_brand"
,
arr_
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/brand/update_brand"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
M
essage
(
"修改成功"
);
this
.
$m
essage
(
"修改成功"
);
this
.
getData
()
this
.
getData
()
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -216,7 +217,7 @@
...
@@ -216,7 +217,7 @@
downOut
()
{
downOut
()
{
if
(
this
.
disabled
)
{
if
(
this
.
disabled
)
{
M
essage
(
"正在导出中,请不要重复点击"
);
this
.
$m
essage
(
"正在导出中,请不要重复点击"
);
return
return
}
}
this
.
$http
(
'post'
,
"/api/brand/export_brand"
,
{
this
.
$http
(
'post'
,
"/api/brand/export_brand"
,
{
...
@@ -226,7 +227,7 @@
...
@@ -226,7 +227,7 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
true
this
.
disabled
=
true
M
essage
(
"正在导出中,请耐心等待"
)
this
.
$m
essage
(
"正在导出中,请耐心等待"
)
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
disabled
)
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
...
@@ -243,25 +244,25 @@
...
@@ -243,25 +244,25 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
false
this
.
disabled
=
false
M
essage
(
"导出成功"
)
this
.
$m
essage
(
"导出成功"
)
this
.
downHref
=
res
.
data
this
.
downHref
=
res
.
data
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
downs
.
click
()
this
.
$refs
.
downs
.
click
()
},
10
)
},
10
)
}
else
if
(
res
.
err_code
==
-
1
)
{
}
else
if
(
res
.
err_code
==
-
1
)
{
//导出失败
//导出失败
M
essage
(
res
.
data
)
this
.
$m
essage
(
res
.
data
)
this
.
disabled
=
false
this
.
disabled
=
false
}
}
},
error
=>
{
},
error
=>
{
M
essage
(
'网络出现问题,请检查网络'
);
this
.
$m
essage
(
'网络出现问题,请检查网络'
);
this
.
disabled
=
false
this
.
disabled
=
false
})
})
},
},
del
()
{
del
()
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
var
arr
=
[];
var
arr
=
[];
...
@@ -277,10 +278,10 @@
...
@@ -277,10 +278,10 @@
id
:
arr
.
join
(
","
)
id
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"删除成功"
);
this
.
$m
essage
(
"删除成功"
);
this
.
getData
()
this
.
getData
()
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
})
})
...
...
src/views/Goods/goods.vue
View file @
2a38fe9d
...
@@ -124,6 +124,7 @@
...
@@ -124,6 +124,7 @@
Autocomplete
,
Autocomplete
,
Cascader
Cascader
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
)
Vue
.
use
(
TableColumn
).
use
(
Table
).
use
(
Cascader
).
use
(
Autocomplete
)
Vue
.
use
(
TableColumn
).
use
(
Table
).
use
(
Cascader
).
use
(
Autocomplete
)
export
default
{
export
default
{
...
@@ -180,7 +181,7 @@
...
@@ -180,7 +181,7 @@
})
})
}
}
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -201,17 +202,17 @@
...
@@ -201,17 +202,17 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
count
)
||
0
;
this
.
total
=
Number
(
res
.
data
.
count
)
||
0
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
updateBrand
()
{
updateBrand
()
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
M
essage
(
"只能选择一条数据"
)
this
.
$m
essage
(
"只能选择一条数据"
)
return
return
}
}
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
this
.
updateGoodsdata
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
this
.
updateGoodsdata
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
...
@@ -224,11 +225,11 @@
...
@@ -224,11 +225,11 @@
}
}
this
.
$http
(
'post'
,
"/api/spu/update_spu"
,
arr_
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/spu/update_spu"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
M
essage
(
"修改成功"
);
this
.
$m
essage
(
"修改成功"
);
this
.
getData
()
this
.
getData
()
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -280,7 +281,7 @@
...
@@ -280,7 +281,7 @@
downOut
()
{
downOut
()
{
if
(
this
.
disabled
)
{
if
(
this
.
disabled
)
{
M
essage
(
"正在导出中,请不要重复点击"
);
this
.
$m
essage
(
"正在导出中,请不要重复点击"
);
return
return
}
}
this
.
$http
(
'post'
,
"/api/spu/export_spu"
,
{
this
.
$http
(
'post'
,
"/api/spu/export_spu"
,
{
...
@@ -293,7 +294,7 @@
...
@@ -293,7 +294,7 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
true
this
.
disabled
=
true
M
essage
(
"正在导出中,请耐心等待"
)
this
.
$m
essage
(
"正在导出中,请耐心等待"
)
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
disabled
)
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
...
@@ -311,18 +312,18 @@
...
@@ -311,18 +312,18 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
false
this
.
disabled
=
false
M
essage
(
"导出成功"
)
this
.
$m
essage
(
"导出成功"
)
this
.
downHref
=
res
.
data
this
.
downHref
=
res
.
data
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
downs
.
click
()
this
.
$refs
.
downs
.
click
()
},
10
)
},
10
)
}
else
if
(
res
.
err_code
==
-
1
)
{
}
else
if
(
res
.
err_code
==
-
1
)
{
//导出失败
//导出失败
M
essage
(
res
.
data
)
this
.
$m
essage
(
res
.
data
)
this
.
disabled
=
false
this
.
disabled
=
false
}
}
},
error
=>
{
},
error
=>
{
M
essage
(
'网络出现问题,请检查网络'
);
this
.
$m
essage
(
'网络出现问题,请检查网络'
);
this
.
disabled
=
false
this
.
disabled
=
false
})
})
...
...
src/views/Index/index.vue
View file @
2a38fe9d
...
@@ -225,6 +225,7 @@
...
@@ -225,6 +225,7 @@
Message
,
Message
,
DatePicker
DatePicker
}
from
'element-ui'
;
}
from
'element-ui'
;
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
DatePicker
);
Vue
.
use
(
Form
).
use
(
FormItem
).
use
(
DatePicker
);
...
@@ -341,7 +342,7 @@
...
@@ -341,7 +342,7 @@
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
this
.
data
=
res
.
data
this
.
data
=
res
.
data
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
}
}
...
...
src/views/Info/message.vue
View file @
2a38fe9d
...
@@ -91,22 +91,21 @@
...
@@ -91,22 +91,21 @@
contacts_name
:
this
.
userinfo
.
contacts_name
contacts_name
:
this
.
userinfo
.
contacts_name
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"提交成功"
);
this
.
$m
essage
(
"提交成功"
);
sessionStorage
.
removeItem
(
'userInfox'
)
sessionStorage
.
removeItem
(
'userInfox'
)
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
handleAvatarSuccess
(
res
,
file
)
{
handleAvatarSuccess
(
res
,
file
)
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
console
.
log
(
66
)
this
.
$message
(
"设置成功"
)
this
.
$message
(
"设置成功"
)
this
.
userinfo
.
avatar
=
URL
.
createObjectURL
(
file
.
raw
);
this
.
userinfo
.
avatar
=
URL
.
createObjectURL
(
file
.
raw
);
sessionStorage
.
removeItem
(
'userInfox'
)
sessionStorage
.
removeItem
(
'userInfox'
)
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
},
},
...
@@ -115,10 +114,10 @@
...
@@ -115,10 +114,10 @@
const
isLt2M
=
file
.
size
/
1024
/
1024
<
5
;
const
isLt2M
=
file
.
size
/
1024
/
1024
<
5
;
if
(
!
isJPG
)
{
if
(
!
isJPG
)
{
M
essage
(
'上传头像图片只能是 JPG、PNG、GIF 格式!'
);
this
.
$m
essage
(
'上传头像图片只能是 JPG、PNG、GIF 格式!'
);
}
}
if
(
!
isLt2M
)
{
if
(
!
isLt2M
)
{
M
essage
(
'上传头像图片大小不能超过 5MB!'
);
this
.
$m
essage
(
'上传头像图片大小不能超过 5MB!'
);
}
}
return
isJPG
&&
isLt2M
;
return
isJPG
&&
isLt2M
;
}
}
...
...
src/views/List/inquire.vue
View file @
2a38fe9d
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
Pagination
,
Pagination
,
Autocomplete
Autocomplete
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
);
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
Vue
.
use
(
VueClipboard
);
Vue
.
use
(
VueClipboard
);
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -138,12 +138,12 @@
...
@@ -138,12 +138,12 @@
detail
()
{
detail
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条询价信息"
);
this
.
$m
essage
(
"请至少选择一条询价信息"
);
return
;
return
;
}
}
if
(
this
.
multipleSelection
.
length
>
1
)
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
M
essage
(
"请选择一条询价信息"
);
this
.
$m
essage
(
"请选择一条询价信息"
);
return
;
return
;
}
}
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
})
})
}
else
{
}
else
{
M
essage
(
"该订单不可报价"
);
this
.
$m
essage
(
"该订单不可报价"
);
return
;
return
;
}
}
...
@@ -165,7 +165,7 @@
...
@@ -165,7 +165,7 @@
exportChange
()
{
exportChange
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
del
()
{
del
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -194,10 +194,10 @@
...
@@ -194,10 +194,10 @@
ids
:
arr
.
join
(
","
)
ids
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"删除成功"
);
this
.
$m
essage
(
"删除成功"
);
this
.
getData
();
this
.
getData
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
})
})
...
@@ -239,7 +239,7 @@
...
@@ -239,7 +239,7 @@
})
})
},
},
onCopy
(
e
)
{
onCopy
(
e
)
{
M
essage
(
'复制成功'
);
this
.
$m
essage
(
'复制成功'
);
},
},
},
},
components
:
{
components
:
{
...
...
src/views/List/inquireDetail.vue
View file @
2a38fe9d
...
@@ -298,7 +298,7 @@
...
@@ -298,7 +298,7 @@
Loading
,
Loading
,
Tooltip
Tooltip
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
).
use
(
Loading
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
).
use
(
Loading
)
.
use
(
Tooltip
);
.
use
(
Tooltip
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
...
@@ -405,7 +405,7 @@
...
@@ -405,7 +405,7 @@
this
.
ruleForm
.
inquiry_items_id
=
res
.
data
.
inquiry_info
.
id
;
this
.
ruleForm
.
inquiry_items_id
=
res
.
data
.
inquiry_info
.
id
;
this
.
getSkulist
();
this
.
getSkulist
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
});
});
},
},
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
}
}
this
.
checkBind
(
id_arr
.
join
(
","
))
this
.
checkBind
(
id_arr
.
join
(
","
))
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -478,7 +478,7 @@
...
@@ -478,7 +478,7 @@
}
}
this
.
checkBind
(
id_arr
.
join
(
","
))
this
.
checkBind
(
id_arr
.
join
(
","
))
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -540,25 +540,25 @@
...
@@ -540,25 +540,25 @@
});
});
this
.
$http
(
'post'
,
"/api/quote/save"
,
this
.
ruleForm
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/quote/save"
,
this
.
ruleForm
).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
M
essage
(
'操作成功'
);
this
.
$m
essage
(
'操作成功'
);
this
.
$http
(
'post'
,
"/api/quote/pin"
,
{
this
.
$http
(
'post'
,
"/api/quote/pin"
,
{
inquiry_items_id
:
this
.
ruleForm
.
inquiry_items_id
,
inquiry_items_id
:
this
.
ruleForm
.
inquiry_items_id
,
pin_type
:(
this
.
active
==
1
?
1
:
2
),
pin_type
:(
this
.
active
==
1
?
1
:
2
),
pin_obj_id
:
this
.
currentDataId
pin_obj_id
:
this
.
currentDataId
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
M
essage
(
'操作成功'
);
this
.
$m
essage
(
'操作成功'
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
window
.
location
.
reload
();
window
.
location
.
reload
();
},
2000
)
},
2000
)
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
loadingInstance
.
close
();
loadingInstance
.
close
();
})
})
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
loadingInstance
.
close
();
loadingInstance
.
close
();
}
}
...
@@ -618,13 +618,13 @@
...
@@ -618,13 +618,13 @@
modify
()
{
modify
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条询价信息"
);
this
.
$m
essage
(
"请至少选择一条询价信息"
);
return
;
return
;
}
}
if
(
this
.
multipleSelection
.
length
>
1
)
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
M
essage
(
"请选择一条询价信息"
);
this
.
$m
essage
(
"请选择一条询价信息"
);
return
;
return
;
}
}
...
@@ -676,12 +676,12 @@
...
@@ -676,12 +676,12 @@
this
.
ruleForm
.
brand_s
=
JSON
.
stringify
(
brand_ss
);
this
.
ruleForm
.
brand_s
=
JSON
.
stringify
(
brand_ss
);
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
}
else
{
}
else
{
M
essage
(
"该订单不可修改"
);
this
.
$m
essage
(
"该订单不可修改"
);
return
;
return
;
}
}
...
@@ -690,7 +690,7 @@
...
@@ -690,7 +690,7 @@
del
()
{
del
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -705,17 +705,17 @@
...
@@ -705,17 +705,17 @@
ids
:
arr
.
join
(
","
)
ids
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"删除成功"
);
this
.
$m
essage
(
"删除成功"
);
this
.
getData
();
this
.
getData
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
})
})
},
},
handle
(
index
,
row
)
{
handle
(
index
,
row
)
{
if
(
row
.
disabled
){
if
(
row
.
disabled
){
M
essage
(
'已绑定,不能重复操作'
)
this
.
$m
essage
(
'已绑定,不能重复操作'
)
return
return
}
}
this
.
currentDataId
=
row
.
id
this
.
currentDataId
=
row
.
id
...
@@ -762,7 +762,7 @@
...
@@ -762,7 +762,7 @@
this
.
ruleForm
.
brand_s
=
JSON
.
stringify
(
brand_ss
);
this
.
ruleForm
.
brand_s
=
JSON
.
stringify
(
brand_ss
);
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
}
}
...
...
src/views/List/quote.vue
View file @
2a38fe9d
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
Autocomplete
,
Autocomplete
,
Tooltip
Tooltip
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
).
use
(
Tooltip
);
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Autocomplete
).
use
(
Tooltip
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
);
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
res
.
data
.
total
;
this
.
total
=
res
.
data
.
total
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
exportChange
()
{
exportChange
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -194,7 +194,7 @@
...
@@ -194,7 +194,7 @@
close
()
{
close
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -206,10 +206,10 @@
...
@@ -206,10 +206,10 @@
ids
:
arr
.
join
(
","
)
ids
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"关闭成功"
);
this
.
$m
essage
(
"关闭成功"
);
this
.
getData
();
this
.
getData
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
...
@@ -218,7 +218,7 @@
...
@@ -218,7 +218,7 @@
del
()
{
del
()
{
var
arr
=
[];
var
arr
=
[];
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
);
this
.
$m
essage
(
"请至少选择一条数据"
);
return
;
return
;
}
}
...
@@ -232,10 +232,10 @@
...
@@ -232,10 +232,10 @@
ids
:
arr
.
join
(
","
)
ids
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"删除成功"
);
this
.
$m
essage
(
"删除成功"
);
this
.
getData
();
this
.
getData
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
})
})
...
...
src/views/Store/enter.vue
View file @
2a38fe9d
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
Upload
,
Upload
,
Pagination
Pagination
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
)
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Upload
)
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Upload
)
export
default
{
export
default
{
...
@@ -134,7 +135,7 @@
...
@@ -134,7 +135,7 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -148,21 +149,21 @@
...
@@ -148,21 +149,21 @@
return
return
}
}
if
(
file
.
response
.
err_code
===
0
)
{
if
(
file
.
response
.
err_code
===
0
)
{
M
essage
(
"导入成功"
)
this
.
$m
essage
(
"导入成功"
)
this
.
page
=
1
;
this
.
page
=
1
;
this
.
getData
();
this
.
getData
();
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
},
},
checkdr
()
{
checkdr
()
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
if
(
this
.
multipleSelection
.
length
>
1
)
{
M
essage
(
"只能选择一条数据导入"
)
this
.
$m
essage
(
"只能选择一条数据导入"
)
return
return
}
}
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据导入"
)
this
.
$m
essage
(
"请至少选择一条数据导入"
)
return
return
}
}
this
.
downHref
=
NODE_ENVS
+
'/api/uploadSku/downResult?id='
+
this
.
multipleSelection
[
0
][
'id'
]
+
'&token='
+
Tool
.
getCookie
(
'token'
)
this
.
downHref
=
NODE_ENVS
+
'/api/uploadSku/downResult?id='
+
this
.
multipleSelection
[
0
][
'id'
]
+
'&token='
+
Tool
.
getCookie
(
'token'
)
...
@@ -173,7 +174,7 @@
...
@@ -173,7 +174,7 @@
},
},
del
()
{
del
()
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
var
arr
=
[];
var
arr
=
[];
...
@@ -189,10 +190,10 @@
...
@@ -189,10 +190,10 @@
log_ids
:
arr
.
join
(
","
)
log_ids
:
arr
.
join
(
","
)
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"删除成功"
);
this
.
$m
essage
(
"删除成功"
);
this
.
getData
()
this
.
getData
()
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
})
})
...
...
src/views/Store/list.vue
View file @
2a38fe9d
...
@@ -231,6 +231,7 @@
...
@@ -231,6 +231,7 @@
Autocomplete
Autocomplete
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
).
use
(
Autocomplete
)
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Tooltip
).
use
(
Autocomplete
)
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
)
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
)
export
default
{
export
default
{
...
@@ -287,7 +288,7 @@
...
@@ -287,7 +288,7 @@
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
count
)
||
0
;
this
.
total
=
Number
(
res
.
data
.
count
)
||
0
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -334,7 +335,7 @@
...
@@ -334,7 +335,7 @@
},
},
downOut
()
{
downOut
()
{
if
(
this
.
disabled
)
{
if
(
this
.
disabled
)
{
M
essage
(
"正在导出中,请不要重复点击"
);
this
.
$m
essage
(
"正在导出中,请不要重复点击"
);
return
return
}
}
this
.
$http
(
'get'
,
"/api/sku/exportSku"
,
{
this
.
$http
(
'get'
,
"/api/sku/exportSku"
,
{
...
@@ -349,7 +350,7 @@
...
@@ -349,7 +350,7 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
true
this
.
disabled
=
true
M
essage
(
"正在导出中,请耐心等待"
)
this
.
$m
essage
(
"正在导出中,请耐心等待"
)
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
if
(
!
this
.
disabled
)
{
if
(
!
this
.
disabled
)
{
clearInterval
(
this
.
timer
)
clearInterval
(
this
.
timer
)
...
@@ -366,7 +367,7 @@
...
@@ -366,7 +367,7 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
this
.
disabled
=
false
this
.
disabled
=
false
M
essage
(
"导出成功"
)
this
.
$m
essage
(
"导出成功"
)
this
.
downHref
=
res
.
data
this
.
downHref
=
res
.
data
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
$refs
.
downs
.
click
()
this
.
$refs
.
downs
.
click
()
...
@@ -375,11 +376,11 @@
...
@@ -375,11 +376,11 @@
//window.location.href = res.data
//window.location.href = res.data
}
else
if
(
res
.
err_code
==
-
1
)
{
}
else
if
(
res
.
err_code
==
-
1
)
{
//导出失败
//导出失败
M
essage
(
res
.
data
)
this
.
$m
essage
(
res
.
data
)
this
.
disabled
=
false
this
.
disabled
=
false
}
}
},
error
=>
{
},
error
=>
{
M
essage
(
'网络出现问题,请检查网络'
);
this
.
$m
essage
(
'网络出现问题,请检查网络'
);
this
.
disabled
=
false
this
.
disabled
=
false
})
})
...
@@ -397,7 +398,7 @@
...
@@ -397,7 +398,7 @@
},
},
handleCommand
(
command
)
{
handleCommand
(
command
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
this
.
selectData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
this
.
selectData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
multipleSelection
));
...
@@ -425,11 +426,11 @@
...
@@ -425,11 +426,11 @@
console
.
log
(
arr_
)
console
.
log
(
arr_
)
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
==
0
)
{
if
(
res
.
err_code
==
0
)
{
M
essage
(
"修改成功"
);
this
.
$m
essage
(
"修改成功"
);
this
.
getData
()
this
.
getData
()
this
.
dialogVisible2
=
false
this
.
dialogVisible2
=
false
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
...
@@ -446,18 +447,18 @@
...
@@ -446,18 +447,18 @@
console
.
log
(
arr_
)
console
.
log
(
arr_
)
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"修改成功"
);
this
.
$m
essage
(
"修改成功"
);
this
.
getData
()
this
.
getData
()
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
changeStatus
(
status
)
{
changeStatus
(
status
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
M
essage
(
"请至少选择一条数据"
)
this
.
$m
essage
(
"请至少选择一条数据"
)
return
return
}
}
var
arr
=
[];
var
arr
=
[];
...
@@ -469,10 +470,10 @@
...
@@ -469,10 +470,10 @@
status
:
status
==
1
?
'passed'
:
'offshelf'
status
:
status
==
1
?
'passed'
:
'offshelf'
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
M
essage
(
"操作成功"
);
this
.
$m
essage
(
"操作成功"
);
this
.
getData
()
this
.
getData
()
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
}
}
...
...
src/views/Store/listDetail.vue
View file @
2a38fe9d
...
@@ -81,6 +81,7 @@
...
@@ -81,6 +81,7 @@
Message
,
Message
,
Pagination
Pagination
}
from
'element-ui'
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
Vue
.
use
(
Pagination
).
use
(
TableColumn
).
use
(
Table
)
Vue
.
use
(
Pagination
).
use
(
TableColumn
).
use
(
Table
)
export
default
{
export
default
{
name
:
"listDetail"
,
name
:
"listDetail"
,
...
@@ -109,7 +110,7 @@
...
@@ -109,7 +110,7 @@
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
this
.
detailInfo
=
res
.
data
this
.
detailInfo
=
res
.
data
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
@@ -137,7 +138,7 @@
...
@@ -137,7 +138,7 @@
this
.
maxPrice
.
push
(
g
)
this
.
maxPrice
.
push
(
g
)
}
}
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
},
},
...
...
src/views/User/login.vue
View file @
2a38fe9d
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
import
Vue
from
'vue'
;
import
Vue
from
'vue'
;
import
{
Loading
,
Message
}
from
'element-ui'
;
import
{
Loading
,
Message
}
from
'element-ui'
;
import
Util
from
"../../tool"
;
import
Util
from
"../../tool"
;
Vue
.
prototype
.
$message
=
Message
export
default
{
export
default
{
name
:
"index"
,
name
:
"index"
,
data
()
{
data
()
{
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
window
.
location
.
href
=
res
.
data
.
wx_login_url
;
window
.
location
.
href
=
res
.
data
.
wx_login_url
;
}
else
{
}
else
{
M
essage
(
res
.
err_msg
);
this
.
$m
essage
(
res
.
err_msg
);
}
}
})
})
}
else
{
}
else
{
...
...
view/app.d
798c12a0562670b797e
.js
→
view/app.d
8cc6b26c012e569520d
.js
View file @
2a38fe9d
File moved
view/index.html
View file @
2a38fe9d
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
>
<link
rel=
"icon"
href=
"http://yunxin.liexindev.net/favicon.ico"
>
<link
rel=
"icon"
href=
"http://yunxin.liexindev.net/favicon.ico"
>
<title>
cloudsystem
</title>
<title>
cloudsystem
</title>
<link
href=
"http://yunxin.liexindev.net/js/0.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/1.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/10.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/11.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/12.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/13.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/14.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/15.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/16.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/17.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/18.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/19.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/2.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/20.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/21.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/22.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/23.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/24.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/25.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/3.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/4.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/5.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/6.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/7.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/8.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/9.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/app.d
798c12a0562670b797e
.js"
rel=
"preload"
as=
"script"
></head>
<link
href=
"http://yunxin.liexindev.net/js/0.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/1.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/10.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/11.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/12.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/13.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/14.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/15.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/16.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/17.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/18.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/19.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/2.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/20.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/21.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/22.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/23.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/24.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/25.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/3.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/4.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/5.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/6.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/7.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/8.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/js/9.js"
rel=
"prefetch"
><link
href=
"http://yunxin.liexindev.net/app.d
8cc6b26c012e569520d
.js"
rel=
"preload"
as=
"script"
></head>
<body>
<body>
<noscript>
<noscript>
<strong>
网络异常,请稍后加载
</strong>
<strong>
网络异常,请稍后加载
</strong>
</noscript>
</noscript>
<div
id=
"app"
></div>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
<!-- built files will be auto injected -->
<script
type=
"text/javascript"
src=
"http://yunxin.liexindev.net/app.d
798c12a0562670b797e
.js"
></script></body>
<script
type=
"text/javascript"
src=
"http://yunxin.liexindev.net/app.d
8cc6b26c012e569520d
.js"
></script></body>
</html>
</html>
view/js/12.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _loading = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\"));\n\nvar _loading2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_loading2.default).use(_tooltip2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"InquireDetail\",\n\n data() {\n return {\n currentDataId: 0,\n active: 0,\n total: 0,\n limit: 10,\n page: 1,\n multipleSelection: [],\n quote_info: {},\n inquiry_info: {},\n quote_list: [],\n title: '新增',\n isModify: false,\n tableData: [],\n historyList: [],\n ruleForm: {\n inquiry_id: '',\n inquiry_sn: '',\n inquiry_items_id: '',\n quote_id: '',\n goods_name: '',\n quote_number: '',\n currency: '1',\n batch: '',\n mpq: '',\n price_other: '',\n unit: '',\n brand: '',\n brand_s: '',\n price_origin: '',\n tax_rate: '13%',\n delivery_time: '',\n delivery_time_val: '',\n delivery_time_unit: '天',\n moq: '',\n expire_time: '',\n remark: ''\n },\n rules: {\n goods_name: [{\n required: true,\n message: '请输入报价型号',\n trigger: 'blur'\n }],\n quote_number: [{\n required: true,\n message: '请输入报价数量',\n trigger: 'blur'\n }],\n currency: [{\n required: true,\n message: '请选择币种',\n trigger: 'blur'\n }],\n batch: [{\n required: true,\n message: '请输入批次',\n trigger: 'blur'\n }],\n brand: [{\n required: true,\n message: '请选择报价品牌'\n }],\n price_origin: [{\n required: true,\n message: '请输入价格',\n trigger: 'blur'\n }],\n delivery_time_val: [{\n required: true,\n message: '请输入货期',\n trigger: 'blur'\n }],\n expire_time: [{\n required: true,\n message: '请输入报价有效期',\n trigger: 'blur'\n }]\n },\n dialogVisible: false,\n brandList: [],\n textArr: ['匹配库存', '历史报价']\n };\n },\n\n created() {\n this.getData();\n },\n\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/detail\", {\n inquiry_item_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.inquiry_info = res.data.inquiry_info;\n this.quote_list = res.data.quote_list;\n this.ruleForm.inquiry_sn = res.data.inquiry_info.inquiry_sn;\n this.ruleForm.inquiry_id = res.data.inquiry_info.inquiry_id;\n this.ruleForm.inquiry_items_id = res.data.inquiry_info.id;\n this.getSkulist();\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n getSkulist() {\n console.log('库存匹配');\n this.$http('get', \"/api/sku/list\", {\n brand_id: this.inquiry_info.brand_id,\n goods_name: 'this.inquiry_info.goods_name',\n goods_status: 1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n var arr_ = this.tableData,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n checkBind(ids) {\n this.$http('get', \"/api/quote/checkpinlist\", {\n inquiry_items_id: this.$route.query.id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_ids: ids\n }).then(res => {\n if (res.err_code === 0) {\n if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {\n var arr_ = this.active == 1 ? this.historyList : this.tableData;\n\n for (var i = 0; i < arr_.length; i++) {\n if (res.data.bind_ids.indexOf(String(arr_[i].id)) != -1) {\n if (this.active == 1) {\n this.historyList[i].disabled = true;\n } else {\n this.tableData[i].disabled = true;\n }\n } else {\n if (this.active == 1) {\n this.historyList[i].disabled = false;\n } else {\n this.tableData[i].disabled = false;\n }\n }\n }\n }\n }\n });\n },\n\n getHistory() {\n console.log('历史报价');\n this.$http('get', \"/api/quote/history\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.inquiry_info.goods_name,\n brand_name: this.inquiry_info.brand_name,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.total = res.data.total;\n this.historyList = res.data.list || [];\n var arr_ = this.historyList,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getHistory();\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n tab(index) {\n this.active = index;\n this.page = 1;\n\n if (index == 1) {\n this.getHistory();\n } else if (index == 1) {\n this.getSkulist();\n }\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n keyup(val) {\n if (this.ruleForm.delivery_time_unit == '天') {\n if (val >= 6) {\n this.ruleForm.delivery_time_val = 6;\n }\n\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n } else if (this.ruleForm.delivery_time_unit == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n }\n },\n\n unitChange(val) {\n if (val == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n } else {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n }\n },\n\n currentChange(val) {\n if (val == 1) {\n this.ruleForm.tax_rate = '13%';\n } else if (val == 2) {\n this.ruleForm.tax_rate = '0';\n }\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (valid) {\n let loadingInstance = _Loading.service({\n background: 'rgba(0, 0, 0, 0)'\n });\n\n this.$http('post', \"/api/quote/save\", this.ruleForm).then(res => {\n if (res.err_code == 0) {\n _Message('操作成功');\n\n this.$http('post', \"/api/quote/pin\", {\n inquiry_items_id: this.ruleForm.inquiry_items_id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_id: this.currentDataId\n }).then(res => {\n if (res.err_code == 0) {\n _Message('操作成功');\n\n setTimeout(() => {\n window.location.reload();\n }, 2000);\n } else {\n _Message(res.err_msg);\n }\n\n loadingInstance.close();\n });\n } else {\n _Message(res.err_msg);\n\n loadingInstance.close();\n }\n }).catch(err => {\n loadingInstance.close();\n });\n } else {\n console.log(this.ruleForm.delivery_time);\n return false;\n }\n });\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.ruleForm.brand\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.ruleForm.brand = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = item.brand_id;\n brand_ss[0].brand_name = item.value;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n },\n\n added() {\n this.title = '新增';\n this.dialogVisible = true;\n this.isModify = false;\n this.ruleForm.brand = '';\n this.ruleForm.tax_rate = '13%';\n this.ruleForm.moq = '';\n this.ruleForm.mpq = '';\n this.ruleForm.price_other = '';\n this.ruleForm.quote_id = '';\n this.$nextTick(() => {\n this.$refs['ruleForm'].resetFields();\n });\n },\n\n modify() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条询价信息\");\n\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n _Message(\"请选择一条询价信息\");\n\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0].status == 5) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.title = '修改';\n this.dialogVisible = true;\n this.ruleForm.quote_id = arr.join(\",\");\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n _Message(res.err_msg);\n }\n });\n } else {\n _Message(\"该订单不可修改\");\n\n return;\n }\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"删除成功\");\n\n this.getData();\n } else {\n _Message(res.err_msg);\n }\n });\n });\n },\n\n handle(index, row) {\n if (row.disabled) {\n _Message('已绑定,不能重复操作');\n\n return;\n }\n\n this.currentDataId = row.id;\n this.title = this.active == 1 ? '确认-历史报价' : '确认-匹配库存';\n this.dialogVisible = true;\n this.ruleForm.quote_id = '';\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: row.id\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n _M
essage(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquireDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _loading = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\"));\n\nvar _loading2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_loading2.default).use(_tooltip2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"InquireDetail\",\n\n data() {\n return {\n currentDataId: 0,\n active: 0,\n total: 0,\n limit: 10,\n page: 1,\n multipleSelection: [],\n quote_info: {},\n inquiry_info: {},\n quote_list: [],\n title: '新增',\n isModify: false,\n tableData: [],\n historyList: [],\n ruleForm: {\n inquiry_id: '',\n inquiry_sn: '',\n inquiry_items_id: '',\n quote_id: '',\n goods_name: '',\n quote_number: '',\n currency: '1',\n batch: '',\n mpq: '',\n price_other: '',\n unit: '',\n brand: '',\n brand_s: '',\n price_origin: '',\n tax_rate: '13%',\n delivery_time: '',\n delivery_time_val: '',\n delivery_time_unit: '天',\n moq: '',\n expire_time: '',\n remark: ''\n },\n rules: {\n goods_name: [{\n required: true,\n message: '请输入报价型号',\n trigger: 'blur'\n }],\n quote_number: [{\n required: true,\n message: '请输入报价数量',\n trigger: 'blur'\n }],\n currency: [{\n required: true,\n message: '请选择币种',\n trigger: 'blur'\n }],\n batch: [{\n required: true,\n message: '请输入批次',\n trigger: 'blur'\n }],\n brand: [{\n required: true,\n message: '请选择报价品牌'\n }],\n price_origin: [{\n required: true,\n message: '请输入价格',\n trigger: 'blur'\n }],\n delivery_time_val: [{\n required: true,\n message: '请输入货期',\n trigger: 'blur'\n }],\n expire_time: [{\n required: true,\n message: '请输入报价有效期',\n trigger: 'blur'\n }]\n },\n dialogVisible: false,\n brandList: [],\n textArr: ['匹配库存', '历史报价']\n };\n },\n\n created() {\n this.getData();\n },\n\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/detail\", {\n inquiry_item_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.inquiry_info = res.data.inquiry_info;\n this.quote_list = res.data.quote_list;\n this.ruleForm.inquiry_sn = res.data.inquiry_info.inquiry_sn;\n this.ruleForm.inquiry_id = res.data.inquiry_info.inquiry_id;\n this.ruleForm.inquiry_items_id = res.data.inquiry_info.id;\n this.getSkulist();\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getSkulist() {\n console.log('库存匹配');\n this.$http('get', \"/api/sku/list\", {\n brand_id: this.inquiry_info.brand_id,\n goods_name: 'this.inquiry_info.goods_name',\n goods_status: 1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n var arr_ = this.tableData,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n checkBind(ids) {\n this.$http('get', \"/api/quote/checkpinlist\", {\n inquiry_items_id: this.$route.query.id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_ids: ids\n }).then(res => {\n if (res.err_code === 0) {\n if (res.data && res.data.bind_ids && res.data.bind_ids.length > 0) {\n var arr_ = this.active == 1 ? this.historyList : this.tableData;\n\n for (var i = 0; i < arr_.length; i++) {\n if (res.data.bind_ids.indexOf(String(arr_[i].id)) != -1) {\n if (this.active == 1) {\n this.historyList[i].disabled = true;\n } else {\n this.tableData[i].disabled = true;\n }\n } else {\n if (this.active == 1) {\n this.historyList[i].disabled = false;\n } else {\n this.tableData[i].disabled = false;\n }\n }\n }\n }\n }\n });\n },\n\n getHistory() {\n console.log('历史报价');\n this.$http('get', \"/api/quote/history\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.inquiry_info.goods_name,\n brand_name: this.inquiry_info.brand_name,\n inquiry_items_id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.total = res.data.total;\n this.historyList = res.data.list || [];\n var arr_ = this.historyList,\n id_arr = [];\n\n for (var i = 0; i < arr_.length; i++) {\n id_arr.push(arr_[i].id);\n }\n\n this.checkBind(id_arr.join(\",\"));\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getHistory();\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n tab(index) {\n this.active = index;\n this.page = 1;\n\n if (index == 1) {\n this.getHistory();\n } else if (index == 1) {\n this.getSkulist();\n }\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n keyup(val) {\n if (this.ruleForm.delivery_time_unit == '天') {\n if (val >= 6) {\n this.ruleForm.delivery_time_val = 6;\n }\n\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n } else if (this.ruleForm.delivery_time_unit == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n }\n },\n\n unitChange(val) {\n if (val == '周') {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val * 7;\n } else {\n this.ruleForm.delivery_time = this.ruleForm.delivery_time_val;\n }\n },\n\n currentChange(val) {\n if (val == 1) {\n this.ruleForm.tax_rate = '13%';\n } else if (val == 2) {\n this.ruleForm.tax_rate = '0';\n }\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (valid) {\n let loadingInstance = _Loading.service({\n background: 'rgba(0, 0, 0, 0)'\n });\n\n this.$http('post', \"/api/quote/save\", this.ruleForm).then(res => {\n if (res.err_code == 0) {\n this.$message('操作成功');\n this.$http('post', \"/api/quote/pin\", {\n inquiry_items_id: this.ruleForm.inquiry_items_id,\n pin_type: this.active == 1 ? 1 : 2,\n pin_obj_id: this.currentDataId\n }).then(res => {\n if (res.err_code == 0) {\n this.$message('操作成功');\n setTimeout(() => {\n window.location.reload();\n }, 2000);\n } else {\n this.$message(res.err_msg);\n }\n\n loadingInstance.close();\n });\n } else {\n this.$message(res.err_msg);\n loadingInstance.close();\n }\n }).catch(err => {\n loadingInstance.close();\n });\n } else {\n console.log(this.ruleForm.delivery_time);\n return false;\n }\n });\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.ruleForm.brand\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.ruleForm.brand = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = item.brand_id;\n brand_ss[0].brand_name = item.value;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n },\n\n added() {\n this.title = '新增';\n this.dialogVisible = true;\n this.isModify = false;\n this.ruleForm.brand = '';\n this.ruleForm.tax_rate = '13%';\n this.ruleForm.moq = '';\n this.ruleForm.mpq = '';\n this.ruleForm.price_other = '';\n this.ruleForm.quote_id = '';\n this.$nextTick(() => {\n this.$refs['ruleForm'].resetFields();\n });\n },\n\n modify() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n this.$message(\"请选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 3 || this.multipleSelection[0].status == 5) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.title = '修改';\n this.dialogVisible = true;\n this.ruleForm.quote_id = arr.join(\",\");\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$message(res.err_msg);\n }\n });\n } else {\n this.$message(\"该订单不可修改\");\n return;\n }\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n });\n },\n\n handle(index, row) {\n if (row.disabled) {\n this.$message('已绑定,不能重复操作');\n return;\n }\n\n this.currentDataId = row.id;\n this.title = this.active == 1 ? '确认-历史报价' : '确认-匹配库存';\n this.dialogVisible = true;\n this.ruleForm.quote_id = '';\n this.isModify = true;\n this.$http('get', \"/api/quote/getinfo\", {\n id: row.id\n }).then(res => {\n if (res.err_code === 0) {\n this.ruleForm.goods_name = res.data.quote_info.goods_name;\n this.ruleForm.quote_number = res.data.quote_info.quote_number;\n this.ruleForm.currency = res.data.quote_info.currency.toString();\n this.ruleForm.batch = res.data.quote_info.batch;\n this.ruleForm.mpq = res.data.quote_info.mpq;\n this.ruleForm.price_other = res.data.quote_info.price_other;\n this.ruleForm.unit = res.data.quote_info.unit;\n this.ruleForm.brand = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = res.data.quote_info.brand_name;\n this.ruleForm.price_origin = res.data.quote_info.price_origin;\n this.ruleForm.tax_rate = res.data.quote_info.tax_rate;\n this.ruleForm.delivery_time = res.data.quote_info.delivery_time;\n this.ruleForm.delivery_time_val = this.ruleForm.delivery_time;\n this.ruleForm.delivery_time_unit = '天';\n this.ruleForm.moq = res.data.quote_info.moq;\n this.ruleForm.remark = res.data.quote_info.remark;\n\n if (res.data.quote_info.expire_time == '0000-00-00 00:00:00') {\n this.ruleForm.expire_time = '';\n } else {\n this.ruleForm.expire_time = res.data.quote_info.expire_time;\n }\n\n let brand_ss = [{\n brand_id: '',\n brand_name: ''\n }];\n brand_ss[0].brand_id = res.data.quote_info.brand_id;\n brand_ss[0].brand_name = res.data.quote_info.brand_name;\n this.ruleForm.brand_s = JSON.stringify(brand_ss);\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquireDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/13.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_tooltip2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"inquire\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n tableData: [],\n multipleSelection: [],\n formInline: {\n goods_name: '',\n brand: '',\n date: '',\n status: ''\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n console.log(this.formInline);\n this.$http('get', \"/api/quote/getlist\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n brand: this.formInline.brand,\n start_time: this.formInline.date ? this.formInline.date[0] : '',\n end_time: this.formInline.date ? this.formInline.date[1] : '',\n status: this.formInline.status\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = res.data.total;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n exportChange() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n window.location.href = '/api/quote/export?ids=' + arr.join(\",\");\n },\n\n close() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.$http('post', \"/api/quote/close\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"关闭成功\");\n\n this.getData();\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n MessageBox.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"删除成功\");\n\n this.getData();\n } else {\n _M
essage(res.err_msg);\n }\n });\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/quote.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default).use(_tooltip2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"inquire\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n tableData: [],\n multipleSelection: [],\n formInline: {\n goods_name: '',\n brand: '',\n date: '',\n status: ''\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n console.log(this.formInline);\n this.$http('get', \"/api/quote/getlist\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n brand: this.formInline.brand,\n start_time: this.formInline.date ? this.formInline.date[0] : '',\n end_time: this.formInline.date ? this.formInline.date[1] : '',\n status: this.formInline.status\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = res.data.total;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n exportChange() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n window.location.href = '/api/quote/export?ids=' + arr.join(\",\");\n },\n\n close() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.$http('post', \"/api/quote/close\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"关闭成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n MessageBox.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/quote/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/quote.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/14.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_tooltip2.default).use(_autocomplete2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"list\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n dialogVisible: false,\n dialogVisible2: false,\n downHref: \"\",\n formInline: {\n goods_name: '',\n status: '',\n brand_id: '',\n brand_name: '',\n date: ''\n },\n multipleSelection: [],\n selectData: [],\n huoqidata: [],\n kucundata: [],\n tableData: [],\n brandList: [],\n disabled: false,\n timer: null\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/sku/list\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n status: this.formInline.status,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n downOut() {\n if (this.disabled) {\n _Message(\"正在导出中,请不要重复点击\");\n\n return;\n }\n\n this.$http('get', \"/api/sku/exportSku\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n status: this.formInline.status,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n\n _Message(\"正在导出中,请耐心等待\");\n\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n\n _Message(\"导出成功\");\n\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10); //window.location.href = res.data\n } else if (res.err_code == -1) {\n //导出失败\n _Message(res.data);\n\n this.disabled = false;\n }\n }, error => {\n _Message('网络出现问题,请检查网络');\n\n this.disabled = false;\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCommand(command) {\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n this.selectData = JSON.parse(JSON.stringify(this.multipleSelection));\n\n if (command == 1) {\n //修改库存弹窗\n this.dialogVisible = true;\n this.kucundata = this.selectData;\n } else {\n //修改货期弹窗\n this.dialogVisible2 = true;\n this.huoqidata = this.selectData;\n }\n },\n\n submitHq() {\n var arr_ = {};\n var self = this;\n\n for (var i = 0; i < self.huoqidata.length; i++) {\n arr_[self.huoqidata[i]['goods_id']] = {\n cn_delivery_time: self.huoqidata[i]['dlhq'] + (self.huoqidata[i]['dlhqdw'] || '天'),\n hk_delivery_time: self.huoqidata[i]['hkhq'] + (self.huoqidata[i]['hkhqdw'] || '天')\n };\n }\n\n console.log(arr_);\n this.$http('post', \"/api/sku/updateSku\", arr_).then(res => {\n if (res.err_code == 0) {\n _Message(\"修改成功\");\n\n this.getData();\n this.dialogVisible2 = false;\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n submitKc() {\n var arr_ = {};\n var self = this;\n\n for (var i = 0; i < self.kucundata.length; i++) {\n arr_[self.kucundata[i]['goods_id']] = {\n stock: self.kucundata[i]['updateStock']\n };\n console.log(self.kucundata[i]['goods_id']);\n }\n\n console.log(arr_);\n this.$http('post', \"/api/sku/updateSku\", arr_).then(res => {\n if (res.err_code === 0) {\n _Message(\"修改成功\");\n\n this.getData();\n this.dialogVisible = false;\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n changeStatus(status) {\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['goods_id']);\n }\n\n this.$http('post', \"/api/sku/updateSkuStatus\", {\n sku_ids: arr.join(\",\"),\n status: status == 1 ? 'passed' : 'offshelf'\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"操作成功\");\n\n this.getData();\n } else {\n _M
essage(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/list.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _tooltip = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/tooltip.css */ \"./node_modules/element-ui/lib/theme-chalk/tooltip.css\"));\n\nvar _tooltip2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/tooltip */ \"./node_modules/element-ui/lib/tooltip.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_tooltip2.default).use(_autocomplete2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\nvar _default = {\n name: \"list\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n dialogVisible: false,\n dialogVisible2: false,\n downHref: \"\",\n formInline: {\n goods_name: '',\n status: '',\n brand_id: '',\n brand_name: '',\n date: ''\n },\n multipleSelection: [],\n selectData: [],\n huoqidata: [],\n kucundata: [],\n tableData: [],\n brandList: [],\n disabled: false,\n timer: null\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/sku/list\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n status: this.formInline.status,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n downOut() {\n if (this.disabled) {\n this.$message(\"正在导出中,请不要重复点击\");\n return;\n }\n\n this.$http('get', \"/api/sku/exportSku\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n status: this.formInline.status,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n this.$message(\"正在导出中,请耐心等待\");\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n this.$message(\"导出成功\");\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10); //window.location.href = res.data\n } else if (res.err_code == -1) {\n //导出失败\n this.$message(res.data);\n this.disabled = false;\n }\n }, error => {\n this.$message('网络出现问题,请检查网络');\n this.disabled = false;\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCommand(command) {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n this.selectData = JSON.parse(JSON.stringify(this.multipleSelection));\n\n if (command == 1) {\n //修改库存弹窗\n this.dialogVisible = true;\n this.kucundata = this.selectData;\n } else {\n //修改货期弹窗\n this.dialogVisible2 = true;\n this.huoqidata = this.selectData;\n }\n },\n\n submitHq() {\n var arr_ = {};\n var self = this;\n\n for (var i = 0; i < self.huoqidata.length; i++) {\n arr_[self.huoqidata[i]['goods_id']] = {\n cn_delivery_time: self.huoqidata[i]['dlhq'] + (self.huoqidata[i]['dlhqdw'] || '天'),\n hk_delivery_time: self.huoqidata[i]['hkhq'] + (self.huoqidata[i]['hkhqdw'] || '天')\n };\n }\n\n console.log(arr_);\n this.$http('post', \"/api/sku/updateSku\", arr_).then(res => {\n if (res.err_code == 0) {\n this.$message(\"修改成功\");\n this.getData();\n this.dialogVisible2 = false;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n submitKc() {\n var arr_ = {};\n var self = this;\n\n for (var i = 0; i < self.kucundata.length; i++) {\n arr_[self.kucundata[i]['goods_id']] = {\n stock: self.kucundata[i]['updateStock']\n };\n console.log(self.kucundata[i]['goods_id']);\n }\n\n console.log(arr_);\n this.$http('post', \"/api/sku/updateSku\", arr_).then(res => {\n if (res.err_code === 0) {\n this.$message(\"修改成功\");\n this.getData();\n this.dialogVisible = false;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n changeStatus(status) {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['goods_id']);\n }\n\n this.$http('post', \"/api/sku/updateSkuStatus\", {\n sku_ids: arr.join(\",\"),\n status: status == 1 ? 'passed' : 'offshelf'\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"操作成功\");\n this.getData();\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/list.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/15.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _loading = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\"));\n\nvar _loading2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar _default = {\n name: \"index\",\n\n data() {\n return {\n pwdFlag: true,\n active: false,\n errror_text: '',\n status1: false,\n status2: false,\n loading: true,\n imgSrc: '',\n errorClass1: false,\n errorClass2: false,\n errorClass3: false,\n cp: false,\n form: {\n mobile: '',\n password: '',\n captcha: '',\n captcha_key: ''\n }\n };\n },\n\n watch: {\n form: {\n deep: true,\n handler: function (newV, oldV) {\n let obj = newV;\n let myreg = /^[1][3,4,5,7,8][0-9]{9}$/;\n\n if (!this.cp) {\n if (obj.captcha || obj.password || obj.mobile) {\n this.errror_text = '';\n this.errorClass1 = false;\n this.errorClass2 = false;\n this.errorClass3 = false;\n }\n } else {\n this.cp = false;\n }\n\n if (myreg.test(obj.mobile)) {\n this.active = true;\n } else {\n this.active = false;\n }\n }\n }\n },\n\n created() {\n this.updateCp();\n },\n\n computed: {},\n methods: {\n updateCp() {\n this.$http('get', \"/auth/cp\").then(res => {\n if (res.err_code === 0) {\n this.imgSrc = res.data.url.img;\n this.form.captcha_key = res.data.url.key;\n }\n }).catch(err => {\n console.log(err.message);\n });\n },\n\n changePwd: function () {\n this.pwdFlag = !this.pwdFlag;\n },\n\n submit() {\n var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;\n\n if (!this.form.mobile) {\n this.errror_text = '请输入手机号';\n this.errorClass1 = true;\n return false;\n }\n\n if (!myreg.test(this.form.mobile)) {\n this.errror_text = '请输入正确的手机号';\n this.errorClass1 = true;\n return false;\n }\n\n if (!this.form.password) {\n this.errror_text = '请输入登录密码';\n this.errorClass2 = true;\n return false;\n }\n\n if (!this.form.captcha) {\n this.errror_text = '请输入验证码';\n this.errorClass3 = true;\n return false;\n }\n\n let loadingInstance = _loading2.default.service({\n background: 'rgba(0, 0, 0, 0)'\n });\n\n this.$http('post', \"/auth/login\", {\n mobile: this.form.mobile,\n password: this.form.password,\n captcha: this.form.captcha,\n captcha_key: this.form.captcha_key\n }).then(res => {\n loadingInstance.close();\n\n if (res.err_code === 0) {\n _tool.default.setCookie(\"token\", res.data.api_token, 1); //强制要求微信绑定\n\n\n if (!res.data.is_bind_wechat) {\n this.$http('get', \"/api/login/getwxqrcode\").then(res => {\n if (res.err_code === 0) {\n window.location.href = res.data.wx_login_url;\n } else {\n (0, _message2.default)
(res.err_msg);\n }\n });\n } else {\n if (this.$route.query.referer) {\n window.location.href = \"/#\" + this.$route.query.referer;\n } else {\n window.location.href = '/';\n }\n }\n } else if (res.err_code === 102) {\n this.errror_text = res.err_msg;\n this.errorClass3 = true;\n this.cp = true;\n this.updateCp();\n } else {\n this.errror_text = res.err_msg;\n this.updateCp();\n }\n }).catch(err => {\n loadingInstance.close();\n });\n }\n\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/User/login.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
loading = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _loading2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\nvar _default = {\n name: \"index\",\n\n data() {\n return {\n pwdFlag: true,\n active: false,\n errror_text: '',\n status1: false,\n status2: false,\n loading: true,\n imgSrc: '',\n errorClass1: false,\n errorClass2: false,\n errorClass3: false,\n cp: false,\n form: {\n mobile: '',\n password: '',\n captcha: '',\n captcha_key: ''\n }\n };\n },\n\n watch: {\n form: {\n deep: true,\n handler: function (newV, oldV) {\n let obj = newV;\n let myreg = /^[1][3,4,5,7,8][0-9]{9}$/;\n\n if (!this.cp) {\n if (obj.captcha || obj.password || obj.mobile) {\n this.errror_text = '';\n this.errorClass1 = false;\n this.errorClass2 = false;\n this.errorClass3 = false;\n }\n } else {\n this.cp = false;\n }\n\n if (myreg.test(obj.mobile)) {\n this.active = true;\n } else {\n this.active = false;\n }\n }\n }\n },\n\n created() {\n this.updateCp();\n },\n\n computed: {},\n methods: {\n updateCp() {\n this.$http('get', \"/auth/cp\").then(res => {\n if (res.err_code === 0) {\n this.imgSrc = res.data.url.img;\n this.form.captcha_key = res.data.url.key;\n }\n }).catch(err => {\n console.log(err.message);\n });\n },\n\n changePwd: function () {\n this.pwdFlag = !this.pwdFlag;\n },\n\n submit() {\n var myreg = /^[1][3,4,5,7,8][0-9]{9}$/;\n\n if (!this.form.mobile) {\n this.errror_text = '请输入手机号';\n this.errorClass1 = true;\n return false;\n }\n\n if (!myreg.test(this.form.mobile)) {\n this.errror_text = '请输入正确的手机号';\n this.errorClass1 = true;\n return false;\n }\n\n if (!this.form.password) {\n this.errror_text = '请输入登录密码';\n this.errorClass2 = true;\n return false;\n }\n\n if (!this.form.captcha) {\n this.errror_text = '请输入验证码';\n this.errorClass3 = true;\n return false;\n }\n\n let loadingInstance = _loading2.default.service({\n background: 'rgba(0, 0, 0, 0)'\n });\n\n this.$http('post', \"/auth/login\", {\n mobile: this.form.mobile,\n password: this.form.password,\n captcha: this.form.captcha,\n captcha_key: this.form.captcha_key\n }).then(res => {\n loadingInstance.close();\n\n if (res.err_code === 0) {\n _tool.default.setCookie(\"token\", res.data.api_token, 1); //强制要求微信绑定\n\n\n if (!res.data.is_bind_wechat) {\n this.$http('get', \"/api/login/getwxqrcode\").then(res => {\n if (res.err_code === 0) {\n window.location.href = res.data.wx_login_url;\n } else {\n this.$message
(res.err_msg);\n }\n });\n } else {\n if (this.$route.query.referer) {\n window.location.href = \"/#\" + this.$route.query.referer;\n } else {\n window.location.href = '/';\n }\n }\n } else if (res.err_code === 102) {\n this.errror_text = res.err_msg;\n this.errorClass3 = true;\n this.cp = true;\n this.updateCp();\n } else {\n this.errror_text = res.err_msg;\n this.updateCp();\n }\n }).catch(err => {\n loadingInstance.close();\n });\n }\n\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/User/login.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/16.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default).use(_autocomplete2.default);\n\n_vue.default.use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"brand\",\n\n data() {\n return {\n dialogVisible: false,\n updateBranddata: [],\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n formInline: {\n brand_name: '',\n brand_id: '',\n keyword: ''\n },\n disabled: false,\n tableData: \"\",\n timer: null,\n multipleSelection: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/brand/get_brand_list\", {\n page: this.page,\n limit: this.limit,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n updateBrand() {\n if (this.multipleSelection.length > 1) {\n _Message(\"只能选择一条数据\");\n\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n this.updateBranddata = JSON.parse(JSON.stringify(this.multipleSelection));\n this.dialogVisible = true;\n },\n\n submitUpdate() {\n var arr_ = {\n id: this.updateBranddata[0].id,\n remark: this.updateBranddata[0].remark,\n internal_standard_name: this.updateBranddata[0].internal_standard_name\n };\n this.$http('post', \"/api/brand/update_brand\", arr_).then(res => {\n if (res.err_code == 0) {\n _Message(\"修改成功\");\n\n this.getData();\n this.dialogVisible = false;\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n downOut() {\n if (this.disabled) {\n _Message(\"正在导出中,请不要重复点击\");\n\n return;\n }\n\n this.$http('post', \"/api/brand/export_brand\", {\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n\n _Message(\"正在导出中,请耐心等待\");\n\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n\n _Message(\"导出成功\");\n\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n } else if (res.err_code == -1) {\n //导出失败\n _Message(res.data);\n\n this.disabled = false;\n }\n }, error => {\n _Message('网络出现问题,请检查网络');\n\n this.disabled = false;\n });\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/brand/delete_brand\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"删除成功\");\n\n this.getData();\n } else {\n _M
essage(res.err_msg);\n }\n });\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Goods/brand.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default).use(_autocomplete2.default);\n\n_vue.default.use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"brand\",\n\n data() {\n return {\n dialogVisible: false,\n updateBranddata: [],\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n formInline: {\n brand_name: '',\n brand_id: '',\n keyword: ''\n },\n disabled: false,\n tableData: \"\",\n timer: null,\n multipleSelection: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/brand/get_brand_list\", {\n page: this.page,\n limit: this.limit,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n updateBrand() {\n if (this.multipleSelection.length > 1) {\n this.$message(\"只能选择一条数据\");\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n this.updateBranddata = JSON.parse(JSON.stringify(this.multipleSelection));\n this.dialogVisible = true;\n },\n\n submitUpdate() {\n var arr_ = {\n id: this.updateBranddata[0].id,\n remark: this.updateBranddata[0].remark,\n internal_standard_name: this.updateBranddata[0].internal_standard_name\n };\n this.$http('post', \"/api/brand/update_brand\", arr_).then(res => {\n if (res.err_code == 0) {\n this.$message(\"修改成功\");\n this.getData();\n this.dialogVisible = false;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n downOut() {\n if (this.disabled) {\n this.$message(\"正在导出中,请不要重复点击\");\n return;\n }\n\n this.$http('post', \"/api/brand/export_brand\", {\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n this.$message(\"正在导出中,请耐心等待\");\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n this.$message(\"导出成功\");\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n } else if (res.err_code == -1) {\n //导出失败\n this.$message(res.data);\n this.disabled = false;\n }\n }, error => {\n this.$message('网络出现问题,请检查网络');\n this.disabled = false;\n });\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/brand/delete_brand\", {\n id: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Goods/brand.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/17.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _cascader = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/cascader.css */ \"./node_modules/element-ui/lib/theme-chalk/cascader.css\"));\n\nvar _cascader2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/cascader */ \"./node_modules/element-ui/lib/cascader.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_tableColumn2.default).use(_table2.default).use(_cascader2.default).use(_autocomplete2.default);\n\nvar _default = {\n name: \"brand\",\n\n data() {\n return {\n dialogVisible: false,\n updateGoodsdata: [],\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n formInline: {\n goods_name: '',\n brand_name: '',\n brand_id: '',\n keyword: '',\n class_id2: '',\n class_id1: ''\n },\n disabled: false,\n timer: null,\n tableData: \"\",\n multipleSelection: [],\n options: [],\n selectedOptions: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n this.getClass();\n },\n\n computed: {},\n methods: {\n getClass() {\n this.$http('get', \"/api/class/get_class_list\", {}).then(res => {\n if (res.err_code === 0) {\n var arr_ = res.data || [];\n\n for (var i = 0; i < arr_.length; i++) {\n var children_arr = [];\n var arr_2 = arr_[i].sub_class || [];\n\n for (var o = 0; o < arr_2.length; o++) {\n children_arr.push({\n value: arr_[i].class_id,\n label: arr_[i].class_name\n });\n }\n\n this.options.push({\n value: arr_[i].class_id,\n label: arr_[i].class_name,\n children: children_arr\n });\n }\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n getData() {\n this.$http('get', \"/api/spu/get_spu_list\", {\n page: this.page,\n limit: this.limit,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n spu_name: this.formInline.goods_name,\n keyword: this.formInline.keyword,\n class_id2: this.formInline.class_id2,\n class_id1: this.formInline.class_id1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n updateBrand() {\n if (this.multipleSelection.length > 1) {\n _Message(\"只能选择一条数据\");\n\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection));\n this.dialogVisible = true;\n },\n\n submitUpdate() {\n var arr_ = {\n id: this.updateGoodsdata[0].spu_id,\n remark: this.updateGoodsdata[0].remark\n };\n this.$http('post', \"/api/spu/update_spu\", arr_).then(res => {\n if (res.err_code == 0) {\n _Message(\"修改成功\");\n\n this.getData();\n this.dialogVisible = false;\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n downOut() {\n if (this.disabled) {\n _Message(\"正在导出中,请不要重复点击\");\n\n return;\n }\n\n this.$http('post', \"/api/spu/export_spu\", {\n spu_name: this.formInline.goods_name,\n brand_name: this.formInline.brand_name,\n brand_id: this.formInline.brand_id,\n class_id2: this.formInline.class_id2,\n class_id1: this.formInline.class_id1,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n\n _Message(\"正在导出中,请耐心等待\");\n\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n\n _Message(\"导出成功\");\n\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n } else if (res.err_code == -1) {\n //导出失败\n _Message(res.data);\n\n this.disabled = false;\n }\n }, error => {\n _Message('网络出现问题,请检查网络');\n
\n this.disabled = false;\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n },\n\n handleChange(value) {\n console.log(value);\n this.formInline.class_id1 = value[0];\n this.formInline.class_id2 = value[1];\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Goods/goods.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _cascader = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/cascader.css */ \"./node_modules/element-ui/lib/theme-chalk/cascader.css\"));\n\nvar _cascader2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/cascader */ \"./node_modules/element-ui/lib/cascader.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_tableColumn2.default).use(_table2.default).use(_cascader2.default).use(_autocomplete2.default);\n\nvar _default = {\n name: \"brand\",\n\n data() {\n return {\n dialogVisible: false,\n updateGoodsdata: [],\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n formInline: {\n goods_name: '',\n brand_name: '',\n brand_id: '',\n keyword: '',\n class_id2: '',\n class_id1: ''\n },\n disabled: false,\n timer: null,\n tableData: \"\",\n multipleSelection: [],\n options: [],\n selectedOptions: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n this.getClass();\n },\n\n computed: {},\n methods: {\n getClass() {\n this.$http('get', \"/api/class/get_class_list\", {}).then(res => {\n if (res.err_code === 0) {\n var arr_ = res.data || [];\n\n for (var i = 0; i < arr_.length; i++) {\n var children_arr = [];\n var arr_2 = arr_[i].sub_class || [];\n\n for (var o = 0; o < arr_2.length; o++) {\n children_arr.push({\n value: arr_[i].class_id,\n label: arr_[i].class_name\n });\n }\n\n this.options.push({\n value: arr_[i].class_id,\n label: arr_[i].class_name,\n children: children_arr\n });\n }\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getData() {\n this.$http('get', \"/api/spu/get_spu_list\", {\n page: this.page,\n limit: this.limit,\n brand_id: this.formInline.brand_id,\n brand_name: this.formInline.brand_name,\n spu_name: this.formInline.goods_name,\n keyword: this.formInline.keyword,\n class_id2: this.formInline.class_id2,\n class_id1: this.formInline.class_id1\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.count) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n updateBrand() {\n if (this.multipleSelection.length > 1) {\n this.$message(\"只能选择一条数据\");\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n this.updateGoodsdata = JSON.parse(JSON.stringify(this.multipleSelection));\n this.dialogVisible = true;\n },\n\n submitUpdate() {\n var arr_ = {\n id: this.updateGoodsdata[0].spu_id,\n remark: this.updateGoodsdata[0].remark\n };\n this.$http('post', \"/api/spu/update_spu\", arr_).then(res => {\n if (res.err_code == 0) {\n this.$message(\"修改成功\");\n this.getData();\n this.dialogVisible = false;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n downOut() {\n if (this.disabled) {\n this.$message(\"正在导出中,请不要重复点击\");\n return;\n }\n\n this.$http('post', \"/api/spu/export_spu\", {\n spu_name: this.formInline.goods_name,\n brand_name: this.formInline.brand_name,\n brand_id: this.formInline.brand_id,\n class_id2: this.formInline.class_id2,\n class_id1: this.formInline.class_id1,\n keyword: this.formInline.keyword\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = true;\n this.$message(\"正在导出中,请耐心等待\");\n this.timer = setInterval(() => {\n if (!this.disabled) {\n clearInterval(this.timer);\n return;\n }\n\n this.resultDown(res.data);\n }, 3000);\n }\n });\n },\n\n resultDown(id_) {\n this.$http('get', \"/api/export/get_export_data\", {\n id: id_\n }).then(res => {\n if (res.err_code == 0) {\n this.disabled = false;\n this.$message(\"导出成功\");\n this.downHref = res.data;\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n } else if (res.err_code == -1) {\n //导出失败\n this.$message(res.data);\n this.disabled = false;\n }\n }, error => {\n this.$message('网络出现问题,请检查网络');
\n this.disabled = false;\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n },\n\n handleChange(value) {\n console.log(value);\n this.formInline.class_id1 = value[0];\n this.formInline.class_id2 = value[1];\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Goods/goods.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/18.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireWildcard = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\").default;\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar echarts = _interopRequireWildcard(__webpack_require__(/*! echarts */ \"./node_modules/echarts/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_form2.default).use(_formItem2.default).use(_datePicker2.default);\n\nvar _default = {\n name: \"index\",\n\n data() {\n return {\n date: '',\n data: {\n \"weekly_quote_selected_count\": 100,\n \"weekly_spu_count\": 100,\n \"all_sku_count\": 100,\n \"reject_sku_count\": 100,\n \"weekly_quote_deal_count\": 100,\n \"off_shelf_sku_count\": 100,\n \"weekly_quote_count\": 100,\n \"brand_count\": 100,\n \"weekly_sku_count\": 100,\n \"all_spu_count\": 100,\n \"weekly_inquiry_count\": 1006,\n \"all_quote_count\": 100,\n \"all_inquiry_count\": 100\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n mounted() {\n var myChart = echarts.init(document.getElementById('echarts_box'));\n var myChart1 = echarts.init(document.getElementById('echarts_box1'));\n var myChart2 = echarts.init(document.getElementById('echarts_box2'));\n var option = {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n },\n yAxis: {\n type: 'value'\n },\n series: [{\n data: [820, 932, 901, 934, 1290, 1330, 1320],\n type: 'line',\n smooth: true\n }, {\n data: [120, 232, 901, 134, 50, 1330, 1320],\n type: 'line',\n smooth: true\n }]\n };\n var option1 = {\n tooltip: {\n trigger: 'item'\n },\n legend: {\n top: '5%',\n left: 'center'\n },\n series: [{\n name: '访问来源',\n type: 'pie',\n radius: ['40%', '70%'],\n avoidLabelOverlap: false,\n label: {\n show: false,\n position: 'center'\n },\n emphasis: {\n label: {\n show: true,\n fontSize: '40',\n fontWeight: 'bold'\n }\n },\n labelLine: {\n show: false\n },\n data: [{\n value: 1048,\n name: ''\n }, {\n value: 735,\n name: ''\n }, {\n value: 580,\n name: ''\n }, {\n value: 484,\n name: ''\n }, {\n value: 300,\n name: ''\n }]\n }]\n };\n myChart.setOption(option);\n myChart1.setOption(option);\n myChart2.setOption(option1);\n },\n\n methods: {\n getData() {\n this.$http('get', \"/api/statistics/index\", {}).then(res => {\n if (res.err_code === 0) {\n this.data = res.data;\n } else {\n (0, _message2.default)
(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Index/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireWildcard = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireWildcard */ \"./node_modules/@babel/runtime/helpers/interopRequireWildcard.js\").default;\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar echarts = _interopRequireWildcard(__webpack_require__(/*! echarts */ \"./node_modules/echarts/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_form2.default).use(_formItem2.default).use(_datePicker2.default);\n\nvar _default = {\n name: \"index\",\n\n data() {\n return {\n date: '',\n data: {\n \"weekly_quote_selected_count\": 100,\n \"weekly_spu_count\": 100,\n \"all_sku_count\": 100,\n \"reject_sku_count\": 100,\n \"weekly_quote_deal_count\": 100,\n \"off_shelf_sku_count\": 100,\n \"weekly_quote_count\": 100,\n \"brand_count\": 100,\n \"weekly_sku_count\": 100,\n \"all_spu_count\": 100,\n \"weekly_inquiry_count\": 1006,\n \"all_quote_count\": 100,\n \"all_inquiry_count\": 100\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n mounted() {\n var myChart = echarts.init(document.getElementById('echarts_box'));\n var myChart1 = echarts.init(document.getElementById('echarts_box1'));\n var myChart2 = echarts.init(document.getElementById('echarts_box2'));\n var option = {\n xAxis: {\n type: 'category',\n data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n },\n yAxis: {\n type: 'value'\n },\n series: [{\n data: [820, 932, 901, 934, 1290, 1330, 1320],\n type: 'line',\n smooth: true\n }, {\n data: [120, 232, 901, 134, 50, 1330, 1320],\n type: 'line',\n smooth: true\n }]\n };\n var option1 = {\n tooltip: {\n trigger: 'item'\n },\n legend: {\n top: '5%',\n left: 'center'\n },\n series: [{\n name: '访问来源',\n type: 'pie',\n radius: ['40%', '70%'],\n avoidLabelOverlap: false,\n label: {\n show: false,\n position: 'center'\n },\n emphasis: {\n label: {\n show: true,\n fontSize: '40',\n fontWeight: 'bold'\n }\n },\n labelLine: {\n show: false\n },\n data: [{\n value: 1048,\n name: ''\n }, {\n value: 735,\n name: ''\n }, {\n value: 580,\n name: ''\n }, {\n value: 484,\n name: ''\n }, {\n value: 300,\n name: ''\n }]\n }]\n };\n myChart.setOption(option);\n myChart1.setOption(option);\n myChart2.setOption(option1);\n },\n\n methods: {\n getData() {\n this.$http('get', \"/api/statistics/index\", {}).then(res => {\n if (res.err_code === 0) {\n this.data = res.data;\n } else {\n this.$message
(res.err_msg);\n }\n });\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Index/index.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/19.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_form2.default).use(_formItem2.default).use(_input2.default).use(_upload2.default);\n\nvar _default = {\n name: \"message\",\n\n data() {\n return {\n upUrl: _ajax.NODE_ENVS + '/api/user/setavatar',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n userinfo: {\n company_name: '',\n contacts_name: '',\n mobile: '',\n email: '',\n avatar: 'http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg'\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getUseInfo();\n },\n\n computed: {},\n methods: {\n getUseInfo() {\n var userInfo_ = sessionStorage.getItem('userInfox');\n\n if (userInfo_) {\n this.userinfo = JSON.parse(userInfo_);\n } else {\n this.$http('get', \"/api/user/getuserinfo\").then(res => {\n this.userinfo = res.data;\n\n if (res.data) {\n sessionStorage.setItem('userInfox', JSON.stringify(res.data));\n }\n });\n }\n },\n\n submituser() {\n this.$http('post', \"/api/user/setuserinfo\", {\n email: this.userinfo.email,\n contacts_name: this.userinfo.contacts_name\n }).then(res => {\n if (res.err_code === 0) {\n
_Message(\"提交成功\");\n\n sessionStorage.removeItem('userInfox');\n } else {\n _Message(res.err_msg);\n }\n });\n },\n\n handleAvatarSuccess(res, file) {\n if (res.err_code === 0) {\n console.log(66);\n this.$message(\"设置成功\");\n this.userinfo.avatar = URL.createObjectURL(file.raw);\n sessionStorage.removeItem('userInfox');\n } else {\n _Message(res.err_msg);\n }\n },\n\n beforeAvatarUpload(file) {\n const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/gif';\n const isLt2M = file.size / 1024 / 1024 < 5;\n\n if (!isJPG) {\n _Message('上传头像图片只能是 JPG、PNG、GIF 格式!');\n }\n\n if (!isLt2M) {\n _M
essage('上传头像图片大小不能超过 5MB!');\n }\n\n return isJPG && isLt2M;\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Info/message.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_form2.default).use(_formItem2.default).use(_input2.default).use(_upload2.default);\n\nvar _default = {\n name: \"message\",\n\n data() {\n return {\n upUrl: _ajax.NODE_ENVS + '/api/user/setavatar',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n userinfo: {\n company_name: '',\n contacts_name: '',\n mobile: '',\n email: '',\n avatar: 'http://img.ichunt.com/test/images/ichunt/9f/34/9f349b1400f659e5ad270412d4dbe160.jpg'\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getUseInfo();\n },\n\n computed: {},\n methods: {\n getUseInfo() {\n var userInfo_ = sessionStorage.getItem('userInfox');\n\n if (userInfo_) {\n this.userinfo = JSON.parse(userInfo_);\n } else {\n this.$http('get', \"/api/user/getuserinfo\").then(res => {\n this.userinfo = res.data;\n\n if (res.data) {\n sessionStorage.setItem('userInfox', JSON.stringify(res.data));\n }\n });\n }\n },\n\n submituser() {\n this.$http('post', \"/api/user/setuserinfo\", {\n email: this.userinfo.email,\n contacts_name: this.userinfo.contacts_name\n }).then(res => {\n if (res.err_code === 0) {\n
this.$message(\"提交成功\");\n sessionStorage.removeItem('userInfox');\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n handleAvatarSuccess(res, file) {\n if (res.err_code === 0) {\n this.$message(\"设置成功\");\n this.userinfo.avatar = URL.createObjectURL(file.raw);\n sessionStorage.removeItem('userInfox');\n } else {\n this.$message(res.err_msg);\n }\n },\n\n beforeAvatarUpload(file) {\n const isJPG = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/gif';\n const isLt2M = file.size / 1024 / 1024 < 5;\n\n if (!isJPG) {\n this.$message('上传头像图片只能是 JPG、PNG、GIF 格式!');\n }\n\n if (!isLt2M) {\n this.$m
essage('上传头像图片大小不能超过 5MB!');\n }\n\n return isJPG && isLt2M;\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Info/message.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/2.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _me
ssage = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu.css */ \"./node_modules/element-ui/lib/theme-chalk/menu.css\"));\n\nvar _menu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu */ \"./node_modules/element-ui/lib/menu.js\"));\n\nvar _menuItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu-item.css */ \"./node_modules/element-ui/lib/theme-chalk/menu-item.css\"));\n\nvar _menuItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu-item */ \"./node_modules/element-ui/lib/menu-item.js\"));\n\nvar _menuItemGroup = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu-item-group.css */ \"./node_modules/element-ui/lib/theme-chalk/menu-item-group.css\"));\n\nvar _menuItemGroup2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu-item-group */ \"./node_modules/element-ui/lib/menu-item-group.js\"));\n\nvar _submenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/submenu.css */ \"./node_modules/element-ui/lib/theme-chalk/submenu.css\"));\n\nvar _submenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/submenu */ \"./node_modules/element-ui/lib/submenu.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_menu2.default).use(_menuItem2.default).use(_menuItemGroup2.default).use(_submenu2.default).use(_form2.default).use(_formItem2.default).use(_dialog2.default).use(_button2.default).use(_input2.default);\n\nvar _default = {\n name: 'menus',\n props: {},\n\n created() {\n this.getData();\n },\n\n data() {\n var validatePass2 = (rule, value, callback) => {\n if (value === '') {\n callback(new Error('请再次输入密码'));\n } else if (value !== this.ruleForm.password) {\n callback(new Error('两次输入密码不一致!'));\n } else {\n callback();\n }\n };\n\n return {\n userinfo: {},\n collapse: false,\n isIndexTab: true,\n tabSure: \"\",\n tabs: \"\",\n dialogVisible: false,\n ruleForm: {\n old_password: '',\n password: '',\n repassword: ''\n },\n rules: {\n old_password: [{\n required: true,\n message: '请输入原始密码',\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: '请输入新密码',\n trigger: 'blur'\n }],\n repassword: [{\n required: true,\n trigger: 'blur',\n validator: validatePass2\n }]\n }\n };\n },\n\n watch: {\n $route(to, from) {\n let tab_arr = sessionStorage.getItem('tabs');\n\n if (tab_arr) {\n this.tabs = JSON.parse(tab_arr);\n }\n\n let app_ = document.getElementById('app');\n this.collapse = false;\n\n if (this.collapse) {\n app_.setAttribute('style', 'padding-left:62px');\n } else {\n app_.setAttribute('style', 'padding-left:226px');\n }\n }\n\n },\n\n mounted() {\n this.tabss(this.$route.path);\n },\n\n methods: {\n getData() {\n var userInfo_ = sessionStorage.getItem('userInfox');\n\n if (userInfo_) {\n this.userinfo = JSON.parse(userInfo_);\n } else {\n this.$http('get', \"/api/user/getuserinfo\").then(res => {\n this.userinfo = res.data;\n\n if (res.data) {\n sessionStorage.setItem('userInfox', JSON.stringify(res.data));\n }\n });\n }\n },\n\n tabUrl(item) {\n this.$router.push({\n path: item.path,\n query: item.query\n });\n },\n\n changePwd() {\n this.dialogVisible = true;\n },\n\n tabss(lk) {\n if (lk == \"/\") {\n this.tabSure = 1;\n }\n\n if (lk == \"/inquire\" || lk == \"/quote\") {\n this.tabSure = 2;\n }\n\n if (lk == \"/list\" || lk == \"/enter\") {\n this.tabSure = 3;\n }\n\n if (lk == \"/goods\" || lk == \"/brand\") {\n this.tabSure = 4;\n }\n\n if (lk == \"/message\") {\n this.tabSure = 5;\n }\n\n let tab_arr = sessionStorage.getItem('tabs');\n\n if (tab_arr) {\n this.tabs = JSON.parse(tab_arr);\n }\n },\n\n closetab(path) {\n let tab_arr = JSON.parse(sessionStorage.getItem('tabs'));\n\n for (var i = 0; i < tab_arr.length; i++) {\n if (tab_arr[i].path == path) {\n tab_arr.splice(i, 1);\n sessionStorage.setItem('tabs', JSON.stringify(tab_arr));\n this.tabs = tab_arr;\n\n if (path == this.$route.path) {\n if (i == 0) {\n this.$router.push({\n path: \"/\"\n });\n } else {\n this.$router.push({\n path: tab_arr[i - 1].path\n });\n }\n }\n\n break;\n }\n }\n },\n\n zk() {\n this.collapse = !this.collapse;\n let app_ = document.getElementById('app');\n\n if (this.collapse) {\n app_.setAttribute('style', 'padding-left:62px');\n } else {\n app_.setAttribute('style', 'padding-left:226px');\n }\n },\n\n handleOpen(key, keyPath) {\n if (this.$route.path == \"/\") {\n this.isIndexTab = false;\n }\n },\n\n handleClose(key, keyPath) {\n if (this.$route.path == \"/\") {\n this.isIndexTab = true;\n }\n },\n\n handleSelect(key, keyPath) {\n this.tabss(key);\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (valid) {\n this.$http('post', \"/api/user/setpasswd\", this.ruleForm).then(res => {\n if (res.err_code === 0) {\n (0, _message2.default)('修改成功');\n setTimeout(() => {\n _tool.default.delCookie('token');\n\n window.location.href = '/#/login';\n sessionStorage.removeItem('userInfox');\n history.go(0);\n }, 2000);\n } else {\n _M
essage(res.err_msg);\n }\n }).catch(err => {\n console.log(err.message);\n });\n } else {\n console.log('error submit!!');\n return false;\n }\n });\n },\n\n logout() {\n this.$http('post', \"/auth/logout\").then(res => {\n _tool.default.delCookie('token');\n\n window.location.href = '/#/login';\n sessionStorage.removeItem('userInfox');\n history.go(0);\n }).catch(err => {\n console.log(err.message);\n });\n }\n\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _me
nu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu.css */ \"./node_modules/element-ui/lib/theme-chalk/menu.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _menu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu */ \"./node_modules/element-ui/lib/menu.js\"));\n\nvar _menuItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu-item.css */ \"./node_modules/element-ui/lib/theme-chalk/menu-item.css\"));\n\nvar _menuItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu-item */ \"./node_modules/element-ui/lib/menu-item.js\"));\n\nvar _menuItemGroup = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/menu-item-group.css */ \"./node_modules/element-ui/lib/theme-chalk/menu-item-group.css\"));\n\nvar _menuItemGroup2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/menu-item-group */ \"./node_modules/element-ui/lib/menu-item-group.js\"));\n\nvar _submenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/submenu.css */ \"./node_modules/element-ui/lib/theme-chalk/submenu.css\"));\n\nvar _submenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/submenu */ \"./node_modules/element-ui/lib/submenu.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_menu2.default).use(_menuItem2.default).use(_menuItemGroup2.default).use(_submenu2.default).use(_form2.default).use(_formItem2.default).use(_dialog2.default).use(_button2.default).use(_input2.default);\n\nvar _default = {\n name: 'menus',\n props: {},\n\n created() {\n this.getData();\n },\n\n data() {\n var validatePass2 = (rule, value, callback) => {\n if (value === '') {\n callback(new Error('请再次输入密码'));\n } else if (value !== this.ruleForm.password) {\n callback(new Error('两次输入密码不一致!'));\n } else {\n callback();\n }\n };\n\n return {\n userinfo: {},\n collapse: false,\n isIndexTab: true,\n tabSure: \"\",\n tabs: \"\",\n dialogVisible: false,\n ruleForm: {\n old_password: '',\n password: '',\n repassword: ''\n },\n rules: {\n old_password: [{\n required: true,\n message: '请输入原始密码',\n trigger: 'blur'\n }],\n password: [{\n required: true,\n message: '请输入新密码',\n trigger: 'blur'\n }],\n repassword: [{\n required: true,\n trigger: 'blur',\n validator: validatePass2\n }]\n }\n };\n },\n\n watch: {\n $route(to, from) {\n let tab_arr = sessionStorage.getItem('tabs');\n\n if (tab_arr) {\n this.tabs = JSON.parse(tab_arr);\n }\n\n let app_ = document.getElementById('app');\n this.collapse = false;\n\n if (this.collapse) {\n app_.setAttribute('style', 'padding-left:62px');\n } else {\n app_.setAttribute('style', 'padding-left:226px');\n }\n }\n\n },\n\n mounted() {\n this.tabss(this.$route.path);\n },\n\n methods: {\n getData() {\n var userInfo_ = sessionStorage.getItem('userInfox');\n\n if (userInfo_) {\n this.userinfo = JSON.parse(userInfo_);\n } else {\n this.$http('get', \"/api/user/getuserinfo\").then(res => {\n this.userinfo = res.data;\n\n if (res.data) {\n sessionStorage.setItem('userInfox', JSON.stringify(res.data));\n }\n });\n }\n },\n\n tabUrl(item) {\n this.$router.push({\n path: item.path,\n query: item.query\n });\n },\n\n changePwd() {\n this.dialogVisible = true;\n },\n\n tabss(lk) {\n if (lk == \"/\") {\n this.tabSure = 1;\n }\n\n if (lk == \"/inquire\" || lk == \"/quote\") {\n this.tabSure = 2;\n }\n\n if (lk == \"/list\" || lk == \"/enter\") {\n this.tabSure = 3;\n }\n\n if (lk == \"/goods\" || lk == \"/brand\") {\n this.tabSure = 4;\n }\n\n if (lk == \"/message\") {\n this.tabSure = 5;\n }\n\n let tab_arr = sessionStorage.getItem('tabs');\n\n if (tab_arr) {\n this.tabs = JSON.parse(tab_arr);\n }\n },\n\n closetab(path) {\n let tab_arr = JSON.parse(sessionStorage.getItem('tabs'));\n\n for (var i = 0; i < tab_arr.length; i++) {\n if (tab_arr[i].path == path) {\n tab_arr.splice(i, 1);\n sessionStorage.setItem('tabs', JSON.stringify(tab_arr));\n this.tabs = tab_arr;\n\n if (path == this.$route.path) {\n if (i == 0) {\n this.$router.push({\n path: \"/\"\n });\n } else {\n this.$router.push({\n path: tab_arr[i - 1].path\n });\n }\n }\n\n break;\n }\n }\n },\n\n zk() {\n this.collapse = !this.collapse;\n let app_ = document.getElementById('app');\n\n if (this.collapse) {\n app_.setAttribute('style', 'padding-left:62px');\n } else {\n app_.setAttribute('style', 'padding-left:226px');\n }\n },\n\n handleOpen(key, keyPath) {\n if (this.$route.path == \"/\") {\n this.isIndexTab = false;\n }\n },\n\n handleClose(key, keyPath) {\n if (this.$route.path == \"/\") {\n this.isIndexTab = true;\n }\n },\n\n handleSelect(key, keyPath) {\n this.tabss(key);\n },\n\n submitForm(formName) {\n this.$refs[formName].validate(valid => {\n if (valid) {\n this.$http('post', \"/api/user/setpasswd\", this.ruleForm).then(res => {\n if (res.err_code === 0) {\n this.$message('修改成功');\n setTimeout(() => {\n _tool.default.delCookie('token');\n\n window.location.href = '/#/login';\n sessionStorage.removeItem('userInfox');\n history.go(0);\n }, 2000);\n } else {\n this.$m
essage(res.err_msg);\n }\n }).catch(err => {\n console.log(err.message);\n });\n } else {\n console.log('error submit!!');\n return false;\n }\n });\n },\n\n logout() {\n this.$http('post', \"/auth/logout\").then(res => {\n _tool.default.delCookie('token');\n\n window.location.href = '/#/login';\n sessionStorage.removeItem('userInfox');\n history.go(0);\n }).catch(err => {\n console.log(err.message);\n });\n }\n\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/components/menu.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/20.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\nvar _vueClipboard = _interopRequireDefault(__webpack_require__(/*! vue-clipboard2 */ \"./node_modules/vue-clipboard2/vue-clipboard.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\n_vue.default.use(_vueClipboard.default);\n\nvar _default = {\n name: \"inquire\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n tableData: [],\n multipleSelection: [],\n formInline: {\n goods_name: '',\n brand: '',\n date: ''\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/getlist\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n brand: this.formInline.brand,\n start_time: this.formInline.date ? this.formInline.date[0] : '',\n end_time: this.formInline.date ? this.formInline.date[1] : ''\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = res.data.total;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n detail() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条询价信息\");\n\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n _Message(\"请选择一条询价信息\");\n\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 2) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.$router.push({\n path: '/inquire/detail?id=' + arr.join(\",\")\n });\n } else {\n _Message(\"该订单不可报价\");\n\n return;\n }\n },\n\n exportChange() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n window.location.href = '/api/inquiry/export?ids=' + arr.join(\",\");\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['supplier_auto_inquiry_id']);\n }\n\n MessageBox.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/inquiry/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"删除成功\");\n\n this.getData();\n } else {\n _Message(res.err_msg);\n }\n });\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n onCopy(e) {\n _M
essage('复制成功');\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquire.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _autocomplete = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/autocomplete.css */ \"./node_modules/element-ui/lib/theme-chalk/autocomplete.css\"));\n\nvar _autocomplete2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/autocomplete */ \"./node_modules/element-ui/lib/autocomplete.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _formate = __webpack_require__(/*! ../../filters/formate.js */ \"./src/filters/formate.js\");\n\nvar _vueClipboard = _interopRequireDefault(__webpack_require__(/*! vue-clipboard2 */ \"./node_modules/vue-clipboard2/vue-clipboard.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_autocomplete2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_pagination2.default);\n\n_vue.default.use(_vueClipboard.default);\n\nvar _default = {\n name: \"inquire\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n tableData: [],\n multipleSelection: [],\n formInline: {\n goods_name: '',\n brand: '',\n date: ''\n }\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/inquiry/getlist\", {\n page: this.page,\n limit: this.limit,\n goods_name: this.formInline.goods_name,\n brand: this.formInline.brand,\n start_time: this.formInline.date ? this.formInline.date[0] : '',\n end_time: this.formInline.date ? this.formInline.date[1] : ''\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = res.data.total;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n onSubmit() {\n this.page = 1;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val;\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n dateFormat(row, column) {\n let date = row.create_time;\n return (0, _formate.dateTimeFormate)(date);\n },\n\n detail() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection.length > 1) {\n this.$message(\"请选择一条询价信息\");\n return;\n }\n\n if (this.multipleSelection[0].status == 1 || this.multipleSelection[0].status == 2) {\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n this.$router.push({\n path: '/inquire/detail?id=' + arr.join(\",\")\n });\n } else {\n this.$message(\"该订单不可报价\");\n return;\n }\n },\n\n exportChange() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n window.location.href = '/api/inquiry/export?ids=' + arr.join(\",\");\n },\n\n del() {\n var arr = [];\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['supplier_auto_inquiry_id']);\n }\n\n MessageBox.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('post', \"/api/inquiry/delete\", {\n ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n });\n });\n },\n\n handleSelectGoodsName(item) {\n this.formInline.goods_name = item.value;\n },\n\n handleSelectBrandName(item) {\n this.formInline.brand_name = item.value;\n this.formInline.brand_id = item.brand_id;\n },\n\n querySearchAsync(queryString, cb) {\n this.$http('get', \"/api/search/getspu\", {\n spu_name: this.formInline.goods_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n var arr_ = [];\n\n for (var i = 0; i < arrlist_.length; i++) {\n arr_.push({\n value: arrlist_[i]['spu_name']\n });\n }\n\n cb(arr_);\n }\n });\n },\n\n querySearchAsync2(queryString, cb) {\n this.$http('get', \"/api/search/getbrand\", {\n brand_name: this.formInline.brand_name\n }).then(res => {\n if (res.err_code == 0) {\n var arrlist_ = res.data || [];\n this.brandList = [];\n this.formInline.brand_id = \"\";\n\n for (var i = 0; i < arrlist_.length; i++) {\n this.brandList.push({\n value: arrlist_[i]['brand_name'],\n brand_id: arrlist_[i]['brand_id']\n });\n }\n\n cb(this.brandList);\n }\n });\n },\n\n onCopy(e) {\n this.$m
essage('复制成功');\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/List/inquire.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/21.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_upload2.default);\n\nvar _default = {\n name: \"enter\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n uploadUrl: _ajax.NODE_ENVS + '/api/uploadSku/import',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n downUrl: _ajax.NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + _tool.default.getCookie('token'),\n formInline: {\n status: '',\n date: ''\n },\n tableData: \"\",\n multipleSelection: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/uploadSku/list\", {\n page: this.page,\n limit: this.limit,\n status: this.formInline.status,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n handleChange(file, fileList) {\n console.log(file.response);\n\n if (!file.response) {\n return;\n }\n\n if (file.response.err_code === 0) {\n _Message(\"导入成功\");\n\n this.page = 1;\n this.getData();\n } else {\n _Message(res.err_msg);\n }\n },\n\n checkdr() {\n if (this.multipleSelection.length > 1) {\n _Message(\"只能选择一条数据导入\");\n\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据导入\");\n\n return;\n }\n\n this.downHref = _ajax.NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id'] + '&token=' + _tool.default.getCookie('token');\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n _Message(\"请至少选择一条数据\");\n\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('get', \"/api/uploadSku/del\", {\n log_ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n _Message(\"删除成功\");\n\n this.getData();\n } else {\n _M
essage(res.err_msg);\n }\n });\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/enter.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _messageBox = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message-box.css */ \"./node_modules/element-ui/lib/theme-chalk/message-box.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _messageBox2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message-box */ \"./node_modules/element-ui/lib/message-box.js\"));\n\nvar _
datePicker = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/date-picker.css */ \"./node_modules/element-ui/lib/theme-chalk/date-picker.css\"));\n\nvar _datePicker2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/date-picker */ \"./node_modules/element-ui/lib/date-picker.js\"));\n\nvar _dropdown = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown.css\"));\n\nvar _dropdown2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown */ \"./node_modules/element-ui/lib/dropdown.js\"));\n\nvar _dropdownMenu = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-menu.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-menu.css\"));\n\nvar _dropdownMenu2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-menu */ \"./node_modules/element-ui/lib/dropdown-menu.js\"));\n\nvar _dropdownItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dropdown-item.css */ \"./node_modules/element-ui/lib/theme-chalk/dropdown-item.css\"));\n\nvar _dropdownItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dropdown-item */ \"./node_modules/element-ui/lib/dropdown-item.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _upload = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/upload.css */ \"./node_modules/element-ui/lib/theme-chalk/upload.css\"));\n\nvar _upload2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/upload */ \"./node_modules/element-ui/lib/upload.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\"));\n\nvar _button2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form.css */ \"./node_modules/element-ui/lib/theme-chalk/form.css\"));\n\nvar _form2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form */ \"./node_modules/element-ui/lib/form.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\"));\n\nvar _select2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\"));\n\nvar _option = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\"));\n\nvar _option2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/input.css */ \"./node_modules/element-ui/lib/theme-chalk/input.css\"));\n\nvar _input2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/input */ \"./node_modules/element-ui/lib/input.js\"));\n\nvar _formItem = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/form-item.css */ \"./node_modules/element-ui/lib/theme-chalk/form-item.css\"));\n\nvar _formItem2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/form-item */ \"./node_modules/element-ui/lib/form-item.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/dialog.css */ \"./node_modules/element-ui/lib/theme-chalk/dialog.css\"));\n\nvar _dialog2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/dialog */ \"./node_modules/element-ui/lib/dialog.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\nvar _ajax = __webpack_require__(/*! ../../ajax */ \"./src/ajax/index.js\");\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_button2.default).use(_form2.default).use(_select2.default).use(_option2.default).use(_input2.default).use(_formItem2.default).use(_dialog2.default).use(_pagination2.default);\n\n_vue.default.use(_datePicker2.default).use(_dropdown2.default).use(_dropdownMenu2.default).use(_dropdownItem2.default).use(_tableColumn2.default).use(_table2.default).use(_upload2.default);\n\nvar _default = {\n name: \"enter\",\n\n data() {\n return {\n total: 0,\n limit: 10,\n page: 1,\n downHref: \"\",\n uploadUrl: _ajax.NODE_ENVS + '/api/uploadSku/import',\n fileData: {\n token: _tool.default.getCookie('token')\n },\n downUrl: _ajax.NODE_ENVS + '/api/uploadSku/downUploadCsv?token=' + _tool.default.getCookie('token'),\n formInline: {\n status: '',\n date: ''\n },\n tableData: \"\",\n multipleSelection: []\n };\n },\n\n watch: {},\n\n created() {\n this.getData();\n },\n\n computed: {},\n methods: {\n getData() {\n this.$http('get', \"/api/uploadSku/list\", {\n page: this.page,\n limit: this.limit,\n status: this.formInline.status,\n action_time: this.formInline.date[0],\n end_time: this.formInline.date[1]\n }).then(res => {\n if (res.err_code === 0) {\n this.tableData = res.data.list || [];\n this.total = Number(res.data.total) || 0;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n submit() {\n this.page = 1;\n this.getData();\n },\n\n handleChange(file, fileList) {\n console.log(file.response);\n\n if (!file.response) {\n return;\n }\n\n if (file.response.err_code === 0) {\n this.$message(\"导入成功\");\n this.page = 1;\n this.getData();\n } else {\n this.$message(res.err_msg);\n }\n },\n\n checkdr() {\n if (this.multipleSelection.length > 1) {\n this.$message(\"只能选择一条数据导入\");\n return;\n }\n\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据导入\");\n return;\n }\n\n this.downHref = _ajax.NODE_ENVS + '/api/uploadSku/downResult?id=' + this.multipleSelection[0]['id'] + '&token=' + _tool.default.getCookie('token');\n setTimeout(() => {\n this.$refs.downs.click();\n }, 10);\n },\n\n del() {\n if (this.multipleSelection.length == 0) {\n this.$message(\"请至少选择一条数据\");\n return;\n }\n\n var arr = [];\n\n for (var i = 0; i < this.multipleSelection.length; i++) {\n arr.push(this.multipleSelection[i]['id']);\n }\n\n _messageBox2.default.confirm('确认到删除当前勾选数据吗?', {\n type: 'error'\n }).then(() => {\n this.$http('get', \"/api/uploadSku/del\", {\n log_ids: arr.join(\",\")\n }).then(res => {\n if (res.err_code === 0) {\n this.$message(\"删除成功\");\n this.getData();\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getData();\n },\n\n handleSelectionChange(val) {\n this.multipleSelection = val || [];\n console.log(this.multipleSelection);\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/enter.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
view/js/22.js
View file @
2a38fe9d
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
/***/
(
function
(
module
,
exports
,
__webpack_require__
)
{
"use strict"
;
"use strict"
;
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.use(_pagination2.default).use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"listDetail\",\n\n data() {\n return {\n detailInfo: \"\",\n total: 0,\n limit: 10,\n page: 1,\n tableData: \"\",\n maxPrice: []\n };\n },\n\n watch: {},\n\n created() {\n this.getInfo();\n this.getList();\n },\n\n computed: {},\n methods: {\n getInfo() {\n this.$http('get', \"/api/uploadSku/info\", {\n id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.detailInfo = res.data;\n } else {\n (0, _message2.default)(res.err_msg);\n }\n });\n },\n\n getList() {\n this.$http('get', \"/api/uploadSku/itemList\", {\n page: this.page,\n limit: this.limit,\n up_sn: this.$route.query.sn\n }).then(res => {\n if (res.err_code === 0) {\n var arr = res.data.list || [];\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]['ladder_price']) {\n for (var j = 0; j < arr[i]['ladder_price'].length; j++) {\n arr[i]['purchases' + (j + 1)] = arr[i]['ladder_price'][j]['purchases'];\n arr[i]['price_cn' + (j + 1)] = arr[i]['ladder_price'][j]['price_cn'];\n arr[i]['price_us' + (j + 1)] = arr[i]['ladder_price'][j]['price_us'];\n }\n }\n }\n\n this.tableData = arr;\n this.total = res.data.total || 0;\n var max_ = res.data.max_price_count || 0;\n\n for (var g = 0; g < max_; g++) {\n this.maxPrice.push(g);\n }\n } else {\n _M
essage(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getList();\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/listDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
eval
(
"\n\nvar _interopRequireDefault = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/interopRequireDefault */ \"./node_modules/@babel/runtime/helpers/interopRequireDefault.js\").default;\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _
pagination = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/pagination.css */ \"./node_modules/element-ui/lib/theme-chalk/pagination.css\"));\n\n__webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n\nvar _pagination2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/pagination */ \"./node_modules/element-ui/lib/pagination.js\"));\n\nvar _tableColumn = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table-column.css */ \"./node_modules/element-ui/lib/theme-chalk/table-column.css\"));\n\nvar _tableColumn2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table-column */ \"./node_modules/element-ui/lib/table-column.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/table.css */ \"./node_modules/element-ui/lib/theme-chalk/table.css\"));\n\nvar _table2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/table */ \"./node_modules/element-ui/lib/table.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/theme-chalk/message.css */ \"./node_modules/element-ui/lib/theme-chalk/message.css\"));\n\nvar _message2 = _interopRequireDefault(__webpack_require__(/*! element-ui/lib/message */ \"./node_modules/element-ui/lib/message.js\"));\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.runtime.esm.js\"));\n\nvar _menu = _interopRequireDefault(__webpack_require__(/*! @/components/menu.vue */ \"./src/components/menu.vue\"));\n\nvar _tool = _interopRequireDefault(__webpack_require__(/*! ../../tool */ \"./src/tool/index.js\"));\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n_vue.default.prototype.$message = _message2.default;\n\n_vue.default.use(_pagination2.default).use(_tableColumn2.default).use(_table2.default);\n\nvar _default = {\n name: \"listDetail\",\n\n data() {\n return {\n detailInfo: \"\",\n total: 0,\n limit: 10,\n page: 1,\n tableData: \"\",\n maxPrice: []\n };\n },\n\n watch: {},\n\n created() {\n this.getInfo();\n this.getList();\n },\n\n computed: {},\n methods: {\n getInfo() {\n this.$http('get', \"/api/uploadSku/info\", {\n id: this.$route.query.id\n }).then(res => {\n if (res.err_code === 0) {\n this.detailInfo = res.data;\n } else {\n this.$message(res.err_msg);\n }\n });\n },\n\n getList() {\n this.$http('get', \"/api/uploadSku/itemList\", {\n page: this.page,\n limit: this.limit,\n up_sn: this.$route.query.sn\n }).then(res => {\n if (res.err_code === 0) {\n var arr = res.data.list || [];\n\n for (var i = 0; i < arr.length; i++) {\n if (arr[i]['ladder_price']) {\n for (var j = 0; j < arr[i]['ladder_price'].length; j++) {\n arr[i]['purchases' + (j + 1)] = arr[i]['ladder_price'][j]['purchases'];\n arr[i]['price_cn' + (j + 1)] = arr[i]['ladder_price'][j]['price_cn'];\n arr[i]['price_us' + (j + 1)] = arr[i]['ladder_price'][j]['price_us'];\n }\n }\n }\n\n this.tableData = arr;\n this.total = res.data.total || 0;\n var max_ = res.data.max_price_count || 0;\n\n for (var g = 0; g < max_; g++) {\n this.maxPrice.push(g);\n }\n } else {\n this.$m
essage(res.err_msg);\n }\n });\n },\n\n handleCurrentChange(val) {\n this.page = val;\n this.getList();\n }\n\n },\n components: {\n Menu: _menu.default\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack:///./src/views/Store/listDetail.vue?./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options"
);
/***/
}),
/***/
}),
...
...
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