Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
repair_workers_h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
石盼盼
repair_workers_h5
Commits
74346a65
Commit
74346a65
authored
Aug 27, 2021
by
石盼盼
Browse files
Options
Browse Files
Download
Plain Diff
修改冲突
parents
27705960
ed247072
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
871 additions
and
2398 deletions
+871
-2398
apiList.js
src/api/apiList.js
+9
-94
axios.js
src/api/axios.js
+28
-29
index.js
src/api/index.js
+17
-22
background.png
src/assets/images/purchase/background.png
+0
-0
purchase_logo.png
src/assets/images/purchase/purchase_logo.png
+0
-0
cart_res.js
src/assets/js/cart_res.js
+0
-612
homelist.js
src/assets/js/homelist.js
+0
-141
self.js
src/assets/js/self.js
+2
-25
condition.vue
src/components/common/condition.vue
+0
-265
main.js
src/main.js
+0
-4
index.js
src/router/index.js
+40
-116
againlogin.vue
src/views/login/againlogin.vue
+0
-42
login.vue
src/views/login/login.vue
+1
-11
add-relation.vue
src/views/my/add-relation.vue
+0
-128
charge.vue
src/views/my/charge.vue
+244
-175
relation-users.vue
src/views/my/relation-users.vue
+0
-108
Home.vue
src/views/tabbar/Home.vue
+447
-420
mine.vue
src/views/tabbar/mine.vue
+82
-73
modifyPhone.vue
src/views/tabbar/modifyPhone.vue
+1
-1
my.vue
src/views/tabbar/my.vue
+0
-132
No files found.
src/api/apiList.js
View file @
74346a65
...
@@ -13,113 +13,28 @@ const h5Url = 'https://repair.zeruiedu.com' // 测试h5线上地址
...
@@ -13,113 +13,28 @@ const h5Url = 'https://repair.zeruiedu.com' // 测试h5线上地址
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
// const h5Url = 'http://depository.fhxmcy.com' // 正式h5线上地址
const
wxLogin
=
'
/api/worker/login
'
// 微信登录获取token、登录状态
const
curScope
=
'
scopes=snsapi_base&type=1
'
export
default
{
export
default
{
// url地址
// url地址
WINDOWHREF_LOGIN
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
h5Url
}
/login&scopes=snsapi_base&type=1`
,
WINDOWHREF_LOGIN
:
`
${
httpUrl
}
${
wxLogin
}
?callBack=
${
h5Url
}
/login&
${
curScope
}
`
,
// 身份失效跳转的登录
WINDOWHREF_LOGIN_
ROUTE
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
window
.
location
.
href
}
&scopes=snsapi_base&type=1`
,
WINDOWHREF_LOGIN_
TOKEN
:
`
${
httpUrl
}${
wxLogin
}
?callBack=
${
window
.
location
.
href
}
&
${
curScope
}
`
,
// 获取token和登录状态
WINDOWHREF_INDEX
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
h5Url
}
&scopes=snsapi_base&type=1`
,
WINDOWHREF_INDEX
:
`
${
httpUrl
}
${
wxLogin
}
?callBack=
${
h5Url
}
&
${
curScope
}
`
,
//
WINDOWHREF_ASK
:
`
${
httpUrl
}
/api/scm/login?callBack=
${
h5Url
}
&scopes=snsapi_userinfo&type=1`
,
WINDOWHREF_ASK
:
`
${
httpUrl
}
${
wxLogin
}
?callBack=
${
h5Url
}
&scopes=snsapi_userinfo&type=1`
,
// 绑定后用户进行授权
// 登录相关
// 登录相关
SENDCODE
:
baseUrl
+
'
/worker/send
'
,
// 发送验证码
SENDCODE
:
baseUrl
+
'
/worker/send
'
,
// 发送验证码
BINDLOGIN
:
baseUrl
+
'
/worker/bind/login
'
,
// 手机号验证码登录绑定微信
BINDLOGIN
:
baseUrl
+
'
/worker/bind/login
'
,
// 手机号验证码登录绑定微信
USERINFO
:
baseUrl
+
'
/worker/user/info
'
,
// 获取用户信息
USERINFO
:
baseUrl
+
'
/worker/user/info
'
,
// 获取用户信息
REPAIR_LIST
:
baseUrl
+
'
/worker/repair/list
'
,
// 工人/审核员端报修单列表
REPAIR_LIST
:
baseUrl
+
'
/worker/repair/list
'
,
// 工人/审核员端报修单列表
ORDER_STATUS
:
baseUrl
+
'
/worker/repair/order/status
'
,
// 获取订单状态
ORDER_STATUS
:
baseUrl
+
'
/worker/repair/order/status
'
,
// 获取订单状态
REPAIR_BEGIN
:
baseUrl
+
'
/worker/repair/begin
'
,
// 开始维修接口
REPAIR_BEGIN
:
baseUrl
+
'
/worker/repair/begin
'
,
// 开始维修接口
REPAIR_ORDER_DETAIL
:
baseUrl
+
'
/worker/repair/order/detail
'
,
// 报修单详情
REPAIR_ORDER_DETAIL
:
baseUrl
+
'
/worker/repair/order/detail
'
,
// 报修单详情
REPAIR_ORDER
:
baseUrl
+
'
/worker/material/order
'
,
// 发起收费生成耗材单
REPAIR_ORDER
:
baseUrl
+
'
/worker/material/order
'
,
// 发起收费生成耗材单
MATERIAL_REMARK
:
baseUrl
+
'
/worker/material/remark
'
,
// 备注耗材
MATERIAL_REMARK
:
baseUrl
+
'
/worker/material/remark
'
// 备注耗材
// BINDLOGINTWO: baseUrl + '/scm/bind/login/two', // 绑定后台账号
// BINDLOGINTWO: baseUrl + '/scm/bind/login/two', // 绑定后台账号
// REFRESHTOKEN: baseUrl + '/scm/change/token', // 更新token
// REFRESHTOKEN: baseUrl + '/scm/change/token', // 更新token
// LOGOUT: baseUrl + '/scm/logout', // 更新token
// LOGOUT: baseUrl + '/scm/logout', // 更新token
// 首页
WARNGOODS
:
baseUrl
+
'
/scm/warn_goods/today
'
,
// 今日预警
WARNGOODSADD
:
baseUrl
+
'
/scm/warn_goods/addCars
'
,
// 采购预警-点击将商品添加至购物车
SUPPLIER
:
baseUrl
+
'
/scm/supplier/my
'
,
// 机构列表
CHANGE_SUPPLIER
:
baseUrl
+
'
/scm/change_agency
'
,
// 切换机构
TIPSNUM
:
baseUrl
+
'
/scm/home/index
'
,
// 首页提示数量
// 消息
NOTICELIST
:
baseUrl
+
'
/scm/notice/list
'
,
// 消息
// 个人中心
WXLIST
:
baseUrl
+
'
/scm/supplier/wx_list
'
,
// 获取机构绑定的微信列表
SUPPLIWRDETAIL
:
baseUrl
+
'
/scm/supplier/detail
'
,
// 获取机构详情
// //////////////////// 筛选 列表 /////////////////////
PROVIDERLIST
:
baseUrl
+
'
/scm/purchase_return/get_providers
'
,
// 供应商列表
SHOPLIST
:
baseUrl
+
'
/scm/supplier_trade_return/get_shop_list
'
,
// 商铺列表
// //////////////////// 采购管理 /////////////////////
// 采购计划
CATE
:
baseUrl
+
'
/scm/cates
'
,
// 采购计划分类列表
CATEGOODS
:
baseUrl
+
'
/scm/goods
'
,
// 采购计划分类商品列表 搜索商品列表
CHANGECART
:
baseUrl
+
'
/scm/car_goods
'
,
// 更改购物车数量
CARTLIST
:
baseUrl
+
'
/scm/cars
'
,
// 购物车列表
CLEARCART
:
baseUrl
+
'
/scm/clear_car
'
,
// 清空购物车
ADDPLAN
:
baseUrl
+
'
/scm/add_plan
'
,
// 提交采购计划
PLANLIST
:
baseUrl
+
'
/scm/plan_list
'
,
// 采购计划列表
PURCHASE_DETAIL
:
baseUrl
+
'
/scm/purchase_detail
'
,
// 详情 1:采购计划,2:采购订单,3:入库订单
PLANAUDIT
:
baseUrl
+
'
/scm/audit
'
,
// 采购计划-审核
PLANDELETE
:
baseUrl
+
'
/scm/del
'
,
// 采购计划-删除
PLANBILLS
:
baseUrl
+
'
/scm/bills
'
,
// 相关单据
// 采购订单
PURORDERLIST
:
baseUrl
+
'
/scm/order_list
'
,
// 采购订单列表
PURORDERCANCEL
:
baseUrl
+
'
/scm/order_cancel
'
,
// 采购订单-取消
// 入库订单
ENTRYLIST
:
baseUrl
+
'
/scm/purchase/into/storehouses/list
'
,
// 入库订单列表
ENTRYGOODS
:
baseUrl
+
'
/scm/purchase/into/storehouses/goods
'
,
// 入库商品列表
ENTRYCHECK
:
baseUrl
+
'
/scm/order_store
'
,
// 验收入库详情
PURENTRY
:
baseUrl
+
'
/scm/order_intostore
'
,
// 验收入库
// //////////////////// 销售管理 /////////////////////
SALELIST
:
baseUrl
+
'
/scm/supplier_trade/list
'
,
// 销售列表
SALEDETAIL
:
baseUrl
+
'
/scm/supplier_trade/operation_out
'
,
// 销售详情
SALE_EDIT_DETAIL
:
baseUrl
+
'
/scm/supplier_trade/detail
'
,
// 销售编辑详情
SALE_EDIT_SAVE
:
baseUrl
+
'
/scm/supplier_trade/alter
'
,
// 销售编辑详情
SALEOUT
:
baseUrl
+
'
/scm/supplier_trade/out
'
,
// 验收出库
SALEGOODSLIST
:
baseUrl
+
'
/scm/supplier_trade_good/goods_list
'
,
// 销售商品
// //////////////////// 档案管理 /////////////////////
// 调价
ADJUSTPRICE
:
baseUrl
+
'
/scm/adjust/price/list
'
,
// 调价列表
ADJUSTPRICEDETAIL
:
baseUrl
+
'
/scm/adjust/price/detail
'
,
// 调价详情
ADJUSTPRICEGOODS
:
baseUrl
+
'
/scm/adjust/price/goods
'
,
// 调价商品列表
// 调库
ADJUSTSTOCK
:
baseUrl
+
'
/scm/adjust/stock/list
'
,
// 调库列表
ADJUSTSTOCKDETAIL
:
baseUrl
+
'
/scm/adjust/stock/detail
'
,
// 调库列表详情
ADJUSTSTOCKGOODS
:
baseUrl
+
'
/scm/adjust/stock/goods
'
,
// 调库商品列表
// //////////////////// 运维管理 /////////////////////
// 采购退货
PURCHASERETURN
:
baseUrl
+
'
/scm/purchase_return/list
'
,
// 采购退货列表
PURCHASERETURN_DETAIL
:
baseUrl
+
'
/scm/purchase_return/details
'
,
// 采购退货详情
PURCHASERETURN_CREATE
:
baseUrl
+
'
/scm/purchase_return/create
'
,
// 采购退货添加
PURCHASERETURN_DETELE
:
baseUrl
+
'
/scm/purchase_return/destroy
'
,
// 采购退货删除
PURCHASERETURN_EDIT
:
baseUrl
+
'
/scm/purchase_return/edit
'
,
// 采购退货编辑
PURCHASERETURN_CHECK
:
baseUrl
+
'
/scm/purchase_return/check
'
,
// 采购退货审核
// 销售退货
SALERETURN
:
baseUrl
+
'
/scm/supplier_trade_return/list
'
,
// 销售退货列表
SALERETURN_DETAIL
:
baseUrl
+
'
/scm/supplier_trade_return/details
'
,
// 销售退货详情
SALERETURN_CREATE
:
baseUrl
+
'
/scm/supplier_trade_return/create
'
,
// 销售退货添加
SALERETURN_EDIT
:
baseUrl
+
'
/scm/supplier_trade_return/edit
'
,
// 销售退货编辑
SALERETURN_DELETE
:
baseUrl
+
'
/scm/supplier_trade_return/destroy
'
,
// 销售退货删除
SALERETURN_CHECK
:
baseUrl
+
'
/scm/supplier_trade_return/check
'
,
// 销售退货审核
// 商品档案
GOODSCLASS
:
baseUrl
+
'
/scm/goods_record
'
,
// 商品档案列表
// 赠送入库
FREELIST
:
baseUrl
+
'
/scm/free/gift/storage/list
'
,
// 赠送入库列表
FREE_CREATE
:
baseUrl
+
'
/scm/free/gift/storage/stock
'
,
// 赠送入库新增
FREE_CHECK
:
baseUrl
+
'
/scm/free/gift/storage/check
'
,
// 赠送入库审核
FREE_DELETE
:
baseUrl
+
'
/scm/free/gift/storage/delete
'
,
// 赠送入库删除
GOODS_ADD_CHOOSE
:
baseUrl
+
'
/scm/free/gift/storage/goods/list
'
,
// 搜索商品-添加商品页
// 协助订单
ASSIST_CREATE
:
baseUrl
+
'
/scm/help/add_trade
'
,
// 协助订单列表
ASSIST_LIST
:
baseUrl
+
'
/scm/help/trade_list
'
,
// 协助订单列表
ASSIST_DETAIL
:
baseUrl
+
'
/scm/help/trade_detail
'
,
// 协助订单详情
ASSIST_DETELE
:
baseUrl
+
'
/scm/help/trade_del
'
,
// 协助订单删除
ASSIST_CODE
:
baseUrl
+
'
/scm/help/pay_code
'
// 协助订单扫码支付
}
}
src/api/axios.js
View file @
74346a65
...
@@ -34,35 +34,34 @@ service.interceptors.request.use(
...
@@ -34,35 +34,34 @@ service.interceptors.request.use(
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
const
{
data
,
config
}
=
response
const
{
data
,
config
}
=
response
console
.
log
(
'
添加响应拦截器
'
,
response
)
if
(
data
.
meta
.
code
===
400
)
{
console
.
log
(
'
===== token过期 =====
'
)
const
promisefresh
=
new
Promise
(
function
(
resolve
,
reject
)
{
updateToken
(()
=>
{
config
.
headers
.
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
axios
.
request
(
response
.
config
).
then
(
res
=>
{
const
curData
=
res
.
data
if
(
curData
.
meta
.
code
===
200
)
{
resolve
(
curData
)
}
else
{
// window.localStorage.removeItem('token')
// window.localStorage.removeItem('status')
resolve
(
curData
)
}
})
},
(
err
)
=>
{
resolve
(
err
)
window
.
localStorage
.
clear
()
Toast
(
'
身份失效,请重新登录
'
)
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
console
.
log
(
'
错误--------
'
,
err
)
})
})
return
promisefresh
}
else
{
return
data
return
data
// console.log('添加响应拦截器', response)
}
// if (data.code === 400) {
// console.log('===== token过期 =====')
// const promisefresh = new Promise(function (resolve, reject) {
// updateToken(() => {
// config.headers.token = window.localStorage.getItem('token')
// axios.request(response.config).then(res => {
// const curData = res.data
// if (curData.code === 200) {
// resolve(curData)
// } else {
// // window.localStorage.removeItem('token')
// // window.localStorage.removeItem('status')
// resolve(curData)
// }
// })
// }, (err) => {
// resolve(err)
// window.localStorage.clear()
// Toast('身份失效,请重新登录')
// window.document.location = selfApi.WINDOWHREF_LOGIN // url-
// console.log('错误--------', err)
// })
// })
// return promisefresh
// } else {
// return data
// }
},
},
error
=>
{
error
=>
{
let
info
=
{}
let
info
=
{}
...
...
src/api/index.js
View file @
74346a65
import
axios
from
'
./axios
'
import
axios
from
'
./axios
'
import
{
import
{
Toast
,
Dialog
}
from
'
vant
'
Toast
,
Dialog
}
from
'
vant
'
import
router
from
'
../router/index
'
import
router
from
'
../router/index
'
import
selfApi
from
'
@/api/apiList
'
import
selfApi
from
'
@/api/apiList
'
const
instance
=
axios
()
const
instance
=
axios
()
export
default
{
export
default
{
get
(
url
,
params
,
headers
,
toast
=
true
)
{
get
(
url
,
params
,
headers
,
toast
=
true
)
{
const
options
=
{}
const
options
=
{}
options
.
headers
=
{
options
.
headers
=
{
// token: window.localStorage.getItem('token'),
token
:
window
.
localStorage
.
getItem
(
'
token
'
)
token
:
'
sys
'
//
token: 'sys'
// type: 1
// type: 1
}
}
...
@@ -42,20 +39,19 @@ export default {
...
@@ -42,20 +39,19 @@ export default {
instance
.
get
(
url
,
options
).
then
(
res
=>
{
instance
.
get
(
url
,
options
).
then
(
res
=>
{
const
{
const
{
data
,
data
,
me
ssage
me
ta
}
=
res
}
=
res
const
code
=
res
.
meta
.
code
// console.log(code, typeof code, '11111111111111')
// console.log(code, typeof code, '11111111111111')
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
if
(
code
===
200
)
{
if
(
meta
.
code
===
200
)
{
resolve
(
data
)
resolve
(
data
)
}
else
if
(
code
===
-
300
)
{
}
else
if
(
meta
.
code
===
-
300
)
{
window
.
localStorage
.
clear
()
window
.
localStorage
.
clear
()
Toast
(
'
身份失效,请重新登录
'
)
Toast
(
'
身份失效,请重新登录
'
)
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
}
else
{
}
else
{
reject
(
res
)
reject
(
res
)
Toast
(
message
)
Toast
(
me
ta
.
me
ssage
)
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
...
@@ -64,12 +60,12 @@ export default {
...
@@ -64,12 +60,12 @@ export default {
})
})
},
},
post
(
url
,
data
,
headers
,
params
,
toast
=
true
)
{
post
(
url
,
data
,
headers
,
params
,
toast
=
true
)
{
const
options
=
{}
const
options
=
{}
options
.
headers
=
{
options
.
headers
=
{
// token: window.localStorage.getItem('token'),
token
:
window
.
localStorage
.
getItem
(
'
token
'
)
token
:
'
sys
'
//
token: 'sys'
// type: 1
// type: 1
}
}
...
@@ -96,19 +92,18 @@ export default {
...
@@ -96,19 +92,18 @@ export default {
instance
.
post
(
url
,
data
,
options
).
then
(
res
=>
{
instance
.
post
(
url
,
data
,
options
).
then
(
res
=>
{
const
{
const
{
data
,
data
,
me
ssage
me
ta
}
=
res
}
=
res
const
code
=
res
.
meta
.
code
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
if
(
code
===
200
)
{
if
(
meta
.
code
===
200
)
{
resolve
(
data
)
resolve
(
data
)
}
else
if
(
code
===
-
300
)
{
}
else
if
(
meta
.
code
===
-
300
)
{
window
.
localStorage
.
clear
()
window
.
localStorage
.
clear
()
Toast
(
'
身份失效,请重新登录
'
)
Toast
(
'
身份失效,请重新登录
'
)
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN
// url-
}
else
{
}
else
{
reject
(
res
)
reject
(
res
)
Toast
(
message
)
Toast
(
me
ta
.
me
ssage
)
}
}
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
toast
&&
tipsToast
.
clear
()
toast
&&
tipsToast
.
clear
()
...
@@ -117,7 +112,7 @@ export default {
...
@@ -117,7 +112,7 @@ export default {
})
})
},
},
put
(
url
,
params
,
headers
)
{
put
(
url
,
params
,
headers
)
{
const
options
=
{}
const
options
=
{}
if
(
headers
)
{
if
(
headers
)
{
...
@@ -145,7 +140,7 @@ export default {
...
@@ -145,7 +140,7 @@ export default {
})
})
},
},
delete
(
url
,
params
,
headers
)
{
delete
(
url
,
params
,
headers
)
{
const
options
=
{}
const
options
=
{}
if
(
params
)
{
if
(
params
)
{
...
...
src/assets/images/purchase/background.png
deleted
100644 → 0
View file @
27705960
3.13 KB
src/assets/images/purchase/purchase_logo.png
deleted
100644 → 0
View file @
27705960
5.26 KB
src/assets/js/cart_res.js
View file @
74346a65
...
@@ -23,615 +23,3 @@ export function getInfoRes (_this, cb) {
...
@@ -23,615 +23,3 @@ export function getInfoRes (_this, cb) {
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
}
}
/**
* 获取机构列表及选中的机构
* @param {*} _this this指向
* @param {*} cb 回调
*/
export
function
getSupplierRes
(
_this
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SUPPLIER
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 切换机构
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} cb 回调
*/
export
function
changeSupplierRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
CHANGE_SUPPLIER
,
curParams
)
.
then
(
data
=>
{
setLocalStorage
(
MY_REFRESH
,
true
)
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
$toast
(
'
切换机构失败
'
)
_this
.
showPicker
=
false
})
}
/**
* 供应商列表
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} cb 回调
*/
export
function
providerRes
(
_this
,
curParams
,
cb
)
{
const
params
=
curParams
||
{
type
:
1
}
_this
.
$http
.
get
(
_this
.
$myApi
.
PROVIDERLIST
,
params
)
.
then
(
data
=>
{
if
(
data
&&
!
curParams
)
{
_this
.
supplier
=
data
_this
.
cursupplier
=
data
[
0
]
}
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 商铺列表
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} cb 回调
*/
export
function
shopListRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SHOPLIST
,
curParams
)
.
then
(
data
=>
{
_this
.
list
=
_this
.
page
===
1
?
data
.
list
:
_this
.
list
.
concat
(
data
.
list
)
_this
.
page
=
data
.
page
_this
.
more
=
data
.
more
_this
.
locked
=
false
_this
.
isloading
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
locked
=
false
_this
.
isloading
=
false
})
}
/**
* 修改购物车数量
* @param {*} _this this指向
* @param {*} type 类型(1:采购计划;2:采购退货;3:销售退货) (curParams参数)
* @param {*} good_id 商品id (curParams参数)
* @param {*} num 商品数量 (curParams参数)
* @param {*} provider_id 供货商id(采购退货必需) (curParams参数)
* @param {*} shop_id 商铺id(销售退货必需) (curParams参数)
*/
export
function
cartChangeRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
CHANGECART
,
curParams
)
.
then
(
data
=>
{
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
$toast
(
'
操作失败
'
)
_this
.
isClick
=
false
})
}
/**
* 购物车列表
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} type 类型(1:采购计划购物车;2:采购退货购物车;3:销售退货购物车) (curParams参数)
* @param {*} provider_id 供货商id(采购退货必需) (curParams参数)
* @param {*} shop_id 商铺id(销售退货必需) (curParams参数)
* @param {*} cb 回调
*/
export
function
cartListRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
CARTLIST
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 清空购物车
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} type 类型(1:采购计划购物车;2:采购退货购物车;3:销售退货购物车) (curParams参数)
* @param {*} provider_id 供货商id(采购退货必需) (curParams参数)
* @param {*} shop_id 商铺id(销售退货必需) (curParams参数)
* @param {*} cb 回调
*/
export
function
cartEmptyRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
CLEARCART
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
购物车已清空
'
)
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{})
}
// //////////////////////// 采购管理 //////////////////////
/**
* 采购计划商品列表、搜索
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} type 类型(1:采购计划购物车;2:采购退货购物车;3:销售退货购物车) (curParams参数)
* @param {*} provider_id 供货商id(采购退货必需) (curParams参数)
* @param {*} shop_id 商铺id(销售退货必需) (curParams参数)
* @param {*} cb 回调
*/
export
function
GoodsListRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
CATEGOODS
,
curParams
)
.
then
(
data
=>
{
_this
.
list
=
_this
.
page
===
1
?
data
.
list
:
_this
.
list
.
concat
(
data
.
list
)
_this
.
page
=
data
.
page
_this
.
more
=
data
.
more
_this
.
locked
=
false
_this
.
isloading
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
locked
=
false
_this
.
isloading
=
false
})
}
/**
* 提交采购计划
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} supplier_shop_id 仓库id 必填 (curParams参数)
* @param {*} warn_id 采购预警id (curParams参数)
* @param {*} remark 备注 (curParams参数)
* @param {*} cb 回调
*/
export
function
addPlanRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
ADDPLAN
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
提交成功
'
)
setLocalStorage
(
PURCHASE_DATA
,
true
)
setLocalStorage
(
INDEX_REFRESH
,
true
)
setTimeout
(()
=>
{
_this
.
$router
.
go
(
-
2
)
_this
.
isloading
=
false
},
1000
)
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{
_this
.
isloading
=
false
})
}
/**
* 采购管理订单详情 1:采购计划,2:采购订单,3:入库订单
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购计划、采购订单、入库订单id (curParams参数)
* @param {*} type 订单类型(1:采购计划,2:采购订单,3:入库订单) (curParams参数)
* @param {*} cb 回调
*/
export
function
purDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
PURCHASE_DETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 验收入库
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} cb 回调
*/
export
function
purCheckDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
ENTRYCHECK
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 采购计划--立即审核
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购计划id (curParams参数)
* @param {*} cb 回调
*/
export
function
purAuditRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
PLANAUDIT
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
审核通过,已生成采购订单
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 采购计划--删除
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购计划id (curParams参数)
* @param {*} cb 回调
*/
export
function
purDeleteRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
PLANDELETE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已删除
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 采购--相关单据
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购计划id (curParams参数)
* @param {*} cb 回调
*/
export
function
purBillRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
PLANBILLS
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 采购订单-取消订单
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购计划id (curParams参数)
* @param {*} cb 回调
*/
export
function
purOrderCancelRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
PURORDERCANCEL
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已取消
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
// //////////////////////// 销售管理 //////////////////////
/**
* 销售订单详情、销售出库订单详情
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 订单id (curParams 参数)
* @param {*} cb 回调
*/
export
function
saleDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SALEDETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 销售订单-编辑详情
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 订单id (curParams 参数)
* @param {*} cb 回调
*/
export
function
saleEditDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SALE_EDIT_DETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
// //////////////////////// 采购退货 //////////////////////
/**
* 提交采购退货
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} supplier_shop_id 仓库id 必填 (curParams参数)
* @param {*} provider_id 供应商id(curParams参数)
* @param {*} remark 备注 (curParams参数)
* @param {*} cb 回调
*/
export
function
addPurReturnRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
PURCHASERETURN_CREATE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
提交成功
'
)
setLocalStorage
(
PURCHASE_DATA
,
true
)
setLocalStorage
(
PURCHASE_RETURN_REFRESH
,
true
)
setTimeout
(()
=>
{
_this
.
$router
.
go
(
-
2
)
_this
.
isloading
=
false
},
1000
)
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{
_this
.
isloading
=
false
})
}
/**
* 采购退货--删除
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
purReturnDeleteRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
PURCHASERETURN_DETELE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已删除
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 采购退货--审核
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
purReturnCheckRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
PURCHASERETURN_CHECK
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
审核通过
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 采购退货-详情
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
purReturnDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
PURCHASERETURN_DETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
// ////////////////////// 销售退货 ////////////////////////
/**
* 销售退货 - 提交
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} supplier_shop_id 仓库id 必填 (curParams参数)
* @param {*} provider_id 供应商id(curParams参数)
* @param {*} remark 备注 (curParams参数)
* @param {*} cb 回调
*/
export
function
addSaleReturnRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
SALERETURN_CREATE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
提交成功
'
)
setLocalStorage
(
PURCHASE_DATA
,
true
)
setLocalStorage
(
SALE_RETURN_REFRESH
,
true
)
setTimeout
(()
=>
{
_this
.
$router
.
go
(
-
3
)
_this
.
isloading
=
false
},
1000
)
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{
_this
.
isloading
=
false
})
}
/**
* 销售退货--删除
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 销售退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
saleReturnDeleteRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SALERETURN_DELETE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已删除
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 销售退货--审核
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 销售退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
saleReturnCheckRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SALERETURN_CHECK
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
审核通过
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 销售退货-详情
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 销售退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
saleReturnDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
SALERETURN_DETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
// ///////////////////// 商品档案 /////////////////////
/**
* 商品档案列表、商品档案搜索
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} supplier_shop_id 仓库id (curParams参数)
* @param {*} cb 回调
*/
export
function
GoodsRecordRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
GOODSCLASS
,
curParams
)
.
then
(
data
=>
{
_this
.
list
=
_this
.
page
===
1
?
data
.
list
:
_this
.
list
.
concat
(
data
.
list
)
_this
.
page
=
data
.
page
_this
.
more
=
data
.
more
_this
.
locked
=
false
_this
.
isloading
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
locked
=
false
_this
.
isloading
=
false
})
}
// ///////////////////// 赠送入库 /////////////////////
/**
* 赠送入库--删除
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
freeDeleteRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
FREE_DELETE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已删除
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 赠送入库--审核
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 采购退货id (curParams参数)
* @param {*} cb 回调
*/
export
function
freeCheckRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
FREE_CHECK
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
审核通过
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
// ///////////////////// 协助入库 /////////////////////
/**
* 协助订单--删除
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 协助订单id (curParams参数)
* @param {*} cb 回调
*/
export
function
assistDeleteRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
ASSIST_DETELE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
已删除
'
)
_this
.
isClick
=
false
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{
_this
.
isClick
=
false
})
}
/**
* 协助订单订单详情
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 订单id (curParams参数)
* @param {*} cb 回调
*/
export
function
assistDetailRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
ASSIST_DETAIL
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
/**
* 协助订单--提交
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} cb 回调
*/
export
function
assistAddRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
post
(
_this
.
$myApi
.
ASSIST_CREATE
,
curParams
)
.
then
(
data
=>
{
_this
.
$toast
(
'
提交成功
'
)
setLocalStorage
(
PURCHASE_DATA
,
true
)
setLocalStorage
(
INDEX_REFRESH
,
true
)
setTimeout
(()
=>
{
_this
.
$router
.
go
(
-
2
)
_this
.
isloading
=
false
},
1000
)
typeof
cb
===
'
function
'
&&
cb
()
})
.
catch
(()
=>
{
_this
.
isloading
=
false
})
}
/**
* 协助订单扫码支付
* @param {*} _this this指向
* @param {*} curParams 参数
* @param {*} id 订单id (curParams参数)
* @param {*} cb 回调
*/
export
function
assistCodeRes
(
_this
,
curParams
,
cb
)
{
_this
.
$http
.
get
(
_this
.
$myApi
.
ASSIST_CODE
,
curParams
)
.
then
(
data
=>
{
typeof
cb
===
'
function
'
&&
cb
(
data
)
})
.
catch
(()
=>
{})
}
src/assets/js/homelist.js
deleted
100644 → 0
View file @
27705960
export
default
{
purchase
:
[
{
name
:
'
purchase_plan
'
,
title
:
'
采购计划
'
,
icon
:
require
(
'
@assets/images/index/icon1-plan.png
'
),
page
:
'
purchasePlan
'
,
num
:
0
},
{
name
:
'
purchase_order
'
,
title
:
'
采购订单
'
,
icon
:
require
(
'
@assets/images/index/icon1-order.png
'
),
page
:
'
purchaseOrder
'
,
num
:
0
},
{
name
:
'
purchase_ruku
'
,
title
:
'
入库订单
'
,
icon
:
require
(
'
@assets/images/index/icon1-ruku.png
'
),
page
:
'
purchaseEntry
'
,
num
:
0
},
{
name
:
'
purchase_goods
'
,
title
:
'
入库商品
'
,
icon
:
require
(
'
@assets/images/index/icon1-goods.png
'
),
page
:
'
goodsList
'
,
params
:
'
entry
'
,
num
:
0
}
],
sale
:
[
{
name
:
'
purchase_plan
'
,
title
:
'
销售订单
'
,
icon
:
require
(
'
@assets/images/index/icon2-sale-order.png
'
),
page
:
'
saleOrder
'
,
num
:
0
},
{
name
:
'
purchase_order
'
,
title
:
'
销售商品
'
,
icon
:
require
(
'
@assets/images/index/icon2-sale-goods.png
'
),
page
:
'
saleGoodsList
'
,
params
:
'
sale
'
,
num
:
0
},
{
name
:
'
purchase_ruku
'
,
title
:
'
出库订单
'
,
icon
:
require
(
'
@assets/images/index/icon2-chuku.png
'
),
page
:
'
saleOutOrder
'
,
num
:
0
},
{
name
:
'
purchase_goods
'
,
title
:
'
出库商品
'
,
icon
:
require
(
'
@assets/images/index/icon2-chuku-goods.png
'
),
page
:
'
saleOutGoodsList
'
,
params
:
'
out
'
,
num
:
0
}
],
archives
:
[
{
name
:
'
purchase_plan
'
,
title
:
'
调价清单
'
,
icon
:
require
(
'
@assets/images/index/icon3-adjust-price.png
'
),
page
:
'
adjustPrice
'
,
num
:
0
},
{
name
:
'
purchase_order
'
,
title
:
'
调价商品
'
,
icon
:
require
(
'
@assets/images/index/icon3-adjust-goods.png
'
),
page
:
'
adjustPriceGoods
'
,
num
:
0
},
{
name
:
'
purchase_ruku
'
,
title
:
'
调库清单
'
,
icon
:
require
(
'
@assets/images/index/icon3-stock.png
'
),
page
:
'
adjustStock
'
,
num
:
0
},
{
name
:
'
purchase_goods
'
,
title
:
'
调库商品
'
,
icon
:
require
(
'
@assets/images/index/icon3-goods.png
'
),
page
:
'
adjustStockGoods
'
,
num
:
0
}
],
devops
:
[
{
name
:
'
purchase_plan
'
,
title
:
'
商品档案
'
,
icon
:
require
(
'
@assets/images/index/icon4-goods-list.png
'
),
page
:
'
goods
'
,
num
:
0
},
{
name
:
'
purchase_order
'
,
title
:
'
采购退货
'
,
icon
:
require
(
'
@assets/images/index/icon4-purchase.png
'
),
page
:
'
purchaseReturn
'
,
num
:
0
},
// todo: 采购换货 -- 首页num需要修改
// {
// name: 'purchase_ruku',
// title: '采购换货',
// icon: require('@assets/images/index/icon4-exchange.png'),
// page: 'purchaseExchange',
// num: 0
// },
{
name
:
'
purchase_ruku
'
,
title
:
'
销售退货
'
,
icon
:
require
(
'
@assets/images/index/icon4-sale.png
'
),
page
:
'
saleReturn
'
,
num
:
0
},
{
name
:
'
purchase_goods
'
,
title
:
'
赠送入库
'
,
icon
:
require
(
'
@assets/images/index/icon4-free.png
'
),
page
:
'
freeList
'
,
num
:
0
},
{
name
:
'
purchase_goods
'
,
title
:
'
协助订单
'
,
icon
:
require
(
'
@assets/images/index/icon4-goods.png
'
),
page
:
'
assistList
'
,
num
:
0
// tips: true
}
]
}
src/assets/js/self.js
View file @
74346a65
// 机构信息
// export const SELFSHOP = 'self_shop'
export
const
SELFSHOP
=
'
self_shop
'
// 采购计划的购物车
export
const
PURCHASE_CART
=
'
PURCHASE_CART
'
// 添加采购计划商品页面数据
export
const
PURCHASE_DATA
=
'
PURCHASE_DATA
'
// 采购计划、采购订单列表、销售列表、赠送入库列表刷新
export
const
PURCHASE_LIST
=
'
PURCHASE_LIST
'
export
const
REFRESH_LIST
=
'
REFRESH_LIST
'
// 详情页刷新
export
const
DETAIL_REFRESH
=
'
DETAIL_REFRESH
'
// 采购退货刷新
export
const
PURCHASE_RETURN_REFRESH
=
'
PURCHASE_RETURN_REFRESH
'
// 销售退货刷新
export
const
SALE_RETURN_REFRESH
=
'
SALE_RETURN_REFRESH
'
// 选择商户
export
const
CHOOSE_SHOP
=
'
CHOOSE_SHOP
'
// 选择添加的商品
export
const
CHOOSE_ADD_GOODS
=
'
CHOOSE_ADD_GOODS
'
// 添加赠送入库刷新
export
const
ADD_FREE_REFRESH
=
'
ADD_FREE_REFRESH
'
// 个人中心刷新(机构切换刷新)
export
const
MY_REFRESH
=
'
MY_REFRESH
'
// 首页刷新(绑定机构)
export
const
INDEX_REFRESH
=
'
INDEX_REFRESH
'
/**
/**
* 设置缓存 getLocalStorage
* 设置缓存 getLocalStorage
* @param {*} key key
* @param {*} key key
...
...
src/components/common/condition.vue
deleted
100644 → 0
View file @
27705960
<
template
>
<div>
<!-- 筛选 -->
<div
class=
"condition-header"
:class=
"curType.length
<
3
?
'
condition-header-one
'
:
''
"
>
<div
class=
"header cont-list"
>
{{
selfShop
?
selfShop
.
text
:
'
--
'
}}
</div>
<div
class=
"condition-cont cont-list"
:class=
"curType.length
<
3
?
'
condition-cont-one
'
:
''
"
v-if=
"curType.length"
>
<!-- 审核状态 -->
<template
v-for=
"(item, index) in curType"
>
<p
class=
"btn-cont"
@
click=
"showPicker=true"
v-if=
"item == 'status'"
:key=
'index'
>
<span
class=
"one-line item-condition-cont"
>
{{
cur_audit_status
.
text
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
<!-- 其它状态 -->
<p
class=
"btn-cont"
@
click=
"otherShow=true"
v-if=
"item == 'otherstatus'"
:key=
'index'
>
<span
class=
"one-line item-condition-cont"
>
{{
cur_other_status
.
text
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
<!-- 供应商审核 (采购:采购订单、入库订单) -->
<p
class=
"btn-cont"
@
click=
"supplierShow=true"
v-if=
"item == 'supplier'"
:key=
"index"
>
<span
class=
"one-line item-condition-cont"
>
{{
cursupplier
.
text
?
cursupplier
.
text
:
'
供货商选择
'
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
<!-- 商户 -->
<p
class=
"btn-cont time-btn"
@
click=
"goMerchant"
v-if=
"item == 'shop'"
:key=
"index"
>
<span
class=
"one-line item-condition-cont"
>
{{
storeDetail
?
storeDetail
.
shop_name
:
'
全部商户
'
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
<!-- 商品 -->
<p
class=
"btn-cont time-btn"
@
click=
"goGoods"
v-if=
"item == 'goods'"
:key=
"index"
>
<span
class=
"one-line item-condition-cont"
>
{{
goodsDetail
?
goodsDetail
.
title
:
'
全部商品
'
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
<!-- 日期 -->
<p
class=
"btn-cont time-btn"
@
click=
"showDate"
v-if=
"item == 'date'"
:key=
"index"
>
<span
class=
"one-line item-condition-cont"
>
{{
cur_date
?
cur_date
:
'
日期
'
}}
</span>
<span
class=
"iconfont icon-arrow-down"
></span>
</p>
</
template
>
</div>
</div>
<!-- 选择审核状态 -->
<van-popup
v-model=
"showPicker"
round
position=
"bottom"
>
<van-picker
title=
"状态"
show-toolbar
:default-index=
"cur_audit_index"
:columns=
"auditStatusList"
@
confirm=
"chooseAuditStatus"
@
cancel=
"showPicker = false"
/>
</van-popup>
<van-popup
v-model=
"otherShow"
round
position=
"bottom"
>
<van-picker
title=
"状态"
show-toolbar
:default-index=
"cur_other_index"
:columns=
"otherStatusList"
@
confirm=
"chooseOtherStatus"
@
cancel=
"otherShow = false"
/>
</van-popup>
<!-- 选择时间 -->
<van-calendar
v-model=
"dateShow"
type=
"range"
:max-date=
"curday"
:min-date=
"minday"
:default-date=
"defaultday"
@
confirm=
"chooseDate"
:allow-same-day=
"true"
ref=
"dateview"
color=
"#325BEF"
:poppable=
"true"
>
</van-calendar>
<!-- 选择供应商 -->
<van-popup
v-model=
"supplierShow"
round
position=
"bottom"
>
<van-picker
title=
"供应商"
show-toolbar
:default-index=
"cur_sup_index"
:columns=
"supplier"
@
confirm=
"chooseSupplier"
@
cancel=
"supplierShow = false"
/>
</van-popup>
</div>
</template>
<
script
>
import
{
SELFSHOP
,
getLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
myCondition
'
,
props
:
{
curType
:
{
type
:
Array
,
default
:
()
=>
[
'
date
'
]
},
// 审核状态信息
auditStatusList
:
{
// 审核状态列表
type
:
Array
,
default
:
()
=>
[{
key
:
1
,
text
:
'
待审核状态
'
},
{
key
:
2
,
text
:
'
全部
'
}]
},
cur_audit_status
:
{
// 当前选中的审核状态
type
:
Object
,
value
:
{
key
:
1
,
text
:
'
待审核状态
'
}
},
// 供应商
supplier
:
{
// 供应商列表
type
:
Array
,
value
:
[{
id
:
0
,
text
:
'
全部供应商
'
}]
},
cursupplier
:
{
// 当前选中的供应商
type
:
Object
,
value
:
{
id
:
0
,
text
:
'
全部供应商
'
}
},
// 其它状态
otherStatusList
:
{
type
:
Array
,
default
:
()
=>
[{
key
:
1
,
text
:
'
已下单/已接单
'
},
{
key
:
2
,
text
:
'
全部
'
}]
},
cur_other_status
:
{
type
:
Object
,
value
:
{
key
:
1
,
text
:
'
已下单/已接单
'
}
},
// 商户
storeDetail
:
{
type
:
Object
,
value
:
null
},
// 商品
goodsDetail
:
{
type
:
Object
,
value
:
null
},
cur_date
:
{
type
:
String
,
value
:
''
}
},
computed
:
{
cur_audit_index
:
(
vm
)
=>
{
return
0
// return vm.auditStatusList.findIndex(item => item.key === vm.cur_audit_status.key)
},
cur_sup_index
:
(
vm
)
=>
{
return
0
// return vm.supplier.findIndex(item => item.key === vm.cursupplier.key)
},
cur_other_index
:
(
vm
)
=>
{
return
vm
.
otherStatusList
.
findIndex
(
item
=>
item
.
key
===
1
)
}
},
data
()
{
return
{
selfShop
:
null
,
// curIndex: 0,
// 审核状态
showPicker
:
false
,
// 供应商
supplierShow
:
false
,
// 其它
otherShow
:
false
,
// 日期
dateShow
:
false
,
curday
:
new
Date
(),
minday
:
new
Date
(
'
2021-06-01
'
),
defaultday
:
new
Date
()
}
},
methods
:
{
// 选择审核状态
chooseAuditStatus
(
value
,
index
)
{
// this.curIndex = index
this
.
showPicker
=
false
this
.
$emit
(
'
chooseAuditStatus
'
,
value
,
index
)
},
// 选择其它状态
chooseOtherStatus
(
value
,
index
)
{
// this.curIndex = index
this
.
otherShow
=
false
this
.
$emit
(
'
chooseOtherStatus
'
,
value
,
index
)
},
// 选择供应商
chooseSupplier
(
value
,
index
)
{
// this.cur_sup_index = index
this
.
supplierShow
=
false
this
.
$emit
(
'
chooseSupplier
'
,
value
,
index
)
},
// 日期
showDate
()
{
this
.
$refs
.
dateview
.
reset
()
this
.
dateShow
=
true
},
chooseDate
(
date
)
{
const
[
start
,
end
]
=
date
this
.
dateShow
=
false
const
curStatus
=
this
.
curType
.
length
>
2
const
curdate
=
`
${
this
.
formatDate
(
start
,
curStatus
)}
~
${
this
.
formatDate
(
end
,
curStatus
)}
`
var
formatDate
=
`
${
this
.
formatDate
(
start
)}
,
${
this
.
formatDate
(
end
)}
`
this
.
$emit
(
'
changeDate
'
,
{
cur_date
:
curdate
,
format_date
:
formatDate
})
},
formatDate
(
date
,
curStatus
=
false
)
{
var
d
=
new
Date
(
date
)
var
month
=
''
+
(
d
.
getMonth
()
+
1
)
var
day
=
''
+
d
.
getDate
()
var
year
=
d
.
getFullYear
()
if
(
month
.
length
<
2
)
month
=
'
0
'
+
month
if
(
day
.
length
<
2
)
day
=
'
0
'
+
day
if
(
curStatus
)
{
return
[
month
,
day
].
join
(
'
-
'
)
}
return
[
year
,
month
,
day
].
join
(
'
-
'
)
},
// 商户
goMerchant
()
{
// chooseShop
this
.
$router
.
push
({
name
:
'
searchShop
'
})
},
// 商品
goGoods
()
{
// changeGoods
const
idlist
=
[]
if
(
this
.
goodsDetail
)
{
idlist
.
push
(
this
.
goodsDetail
.
id
)
}
this
.
$router
.
push
({
name
:
'
addGoodsSearch
'
,
params
:
{
ids
:
idlist
,
type
:
2
// 选择商品
}
})
}
},
mounted
()
{
this
.
selfShop
=
getLocalStorage
(
SELFSHOP
)
?
getLocalStorage
(
SELFSHOP
)
:
null
this
.
showPicker
=
false
this
.
supplierShow
=
false
this
.
otherShow
=
false
this
.
dateShow
=
false
this
.
curday
=
new
Date
()
this
.
minday
=
new
Date
(
'
2021-06-01
'
)
this
.
defaultday
=
new
Date
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/common/module.scss"
;
</
style
>
src/main.js
View file @
74346a65
...
@@ -8,12 +8,8 @@ import myAxios from './api/index'
...
@@ -8,12 +8,8 @@ import myAxios from './api/index'
import
Vant
from
'
vant
'
import
Vant
from
'
vant
'
import
'
vant/lib/index.css
'
import
'
vant/lib/index.css
'
import
vConsole
from
'
@/plugins/vconsole.js
'
import
vConsole
from
'
@/plugins/vconsole.js
'
import
myCondition
from
'
@/components/common/condition.vue
'
import
listTips
from
'
@/components/common/listtips.vue
'
import
listTips
from
'
@/components/common/listtips.vue
'
// Vue.component('chooseDate', chooseDate)
// import chooseDate from '@/components/common/chooseDate.vue'
Vue
.
component
(
'
myCondition
'
,
myCondition
)
Vue
.
component
(
'
listTips
'
,
listTips
)
Vue
.
component
(
'
listTips
'
,
listTips
)
Vue
.
use
(
vConsole
)
Vue
.
use
(
vConsole
)
...
...
src/router/index.js
View file @
74346a65
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
VueRouter
from
'
vue-router
'
import
VueRouter
from
'
vue-router
'
import
Home
from
'
../views/tabbar/Home.vue
'
import
Home
from
'
../views/tabbar/Home.vue
'
//
import selfApi from '@/api/apiList'
import
selfApi
from
'
@/api/apiList
'
Vue
.
use
(
VueRouter
)
Vue
.
use
(
VueRouter
)
const
routes
=
[
const
routes
=
[
{
{
path
:
'
/
home
'
,
path
:
'
/
'
,
name
:
'
home
'
,
name
:
'
home
'
,
meta
:
{
meta
:
{
title
:
'
工单
'
,
title
:
'
工单
'
,
...
@@ -16,20 +16,16 @@ const routes = [
...
@@ -16,20 +16,16 @@ const routes = [
},
},
component
:
Home
component
:
Home
},
},
// 登录
{
{
path
:
'
/
'
,
path
:
'
/login
'
,
redirect
:
'
/login
'
name
:
'
login
'
,
},
{
path
:
'
/my
'
,
name
:
'
my
'
,
meta
:
{
meta
:
{
title
:
'
我的
'
,
title
:
'
登录
'
,
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
../views/tabbar/my
.vue
'
)
component
:
()
=>
import
(
'
@/views/login/login
.vue
'
)
},
},
{
{
path
:
'
/mine
'
,
path
:
'
/mine
'
,
name
:
'
mine
'
,
name
:
'
mine
'
,
...
@@ -48,25 +44,6 @@ const routes = [
...
@@ -48,25 +44,6 @@ const routes = [
},
},
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
component
:
()
=>
import
(
'
../views/tabbar/modifyPhone.vue
'
)
},
},
// 登录
{
path
:
'
/login
'
,
name
:
'
login
'
,
meta
:
{
title
:
'
登录
'
,
hideBack
:
true
},
component
:
()
=>
import
(
'
@/views/login/login.vue
'
)
},
{
path
:
'
/againLogin
'
,
name
:
'
againLogin
'
,
meta
:
{
title
:
'
登录
'
,
hideBack
:
true
},
component
:
()
=>
import
(
'
@/views/login/againlogin.vue
'
)
},
// 个人中心
// 个人中心
{
{
path
:
'
/charge
'
,
path
:
'
/charge
'
,
...
@@ -76,22 +53,6 @@ const routes = [
...
@@ -76,22 +53,6 @@ const routes = [
hideBack
:
true
hideBack
:
true
},
},
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
component
:
()
=>
import
(
'
@/views/my/charge.vue
'
)
},
{
path
:
'
/relationUsers
'
,
name
:
'
relationUsers
'
,
meta
:
{
title
:
'
我的
'
},
component
:
()
=>
import
(
'
@/views/my/relation-users.vue
'
)
},
{
path
:
'
/addRelation
'
,
name
:
'
addRelation
'
,
meta
:
{
title
:
'
绑定机构
'
},
component
:
()
=>
import
(
'
@/views/my/add-relation.vue
'
)
}
}
]
]
...
@@ -99,7 +60,7 @@ const router = new VueRouter({
...
@@ -99,7 +60,7 @@ const router = new VueRouter({
mode
:
'
history
'
,
mode
:
'
history
'
,
base
:
process
.
env
.
BASE_URL
,
base
:
process
.
env
.
BASE_URL
,
routes
,
routes
,
scrollBehavior
(
to
,
from
,
savePosition
)
{
scrollBehavior
(
to
,
from
,
savePosition
)
{
if
(
savePosition
)
{
if
(
savePosition
)
{
return
savePosition
return
savePosition
}
else
{
}
else
{
...
@@ -112,75 +73,38 @@ const router = new VueRouter({
...
@@ -112,75 +73,38 @@ const router = new VueRouter({
})
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
let
token
=
window
.
localStorage
.
getItem
(
'
token
'
)
let
status
=
window
.
localStorage
.
getItem
(
'
status
'
)
if
(
to
.
path
===
'
/login
'
&&
token
&&
status
)
{
next
()
next
()
// console.log(to)
return
true
// localStorage.setItem('fromQuery',from.path); //记录路由
}
// console.log(to.path)
if
(
to
.
query
.
token
&&
to
.
query
.
status
)
{
/** 商品列表 */
console
.
log
(
'
ok-------0
'
,
status
)
// if (to.path.indexOf('goodsList/') !== -1) {
token
=
to
.
query
.
token
// switch (to.params.type) {
status
=
to
.
query
.
status
// case 'entry':
// console.log(token)
// to.meta.title = '入库商品'
// console.log(status)
// break
window
.
localStorage
.
setItem
(
'
token
'
,
token
)
// case 'out':
window
.
localStorage
.
setItem
(
'
status
'
,
status
)
// to.meta.title = '出库商品'
}
// break
if
(
token
&&
status
===
'
200
'
)
{
// case 'sale':
console
.
log
(
'
ok-------1
'
,
200
)
// to.meta.title = '销售商品'
next
()
// break
}
else
if
(
token
&&
status
===
'
100
'
)
{
// default:
console
.
log
(
'
ok-------2
'
,
100
)
// to.meta.title = '商品列表'
setTimeout
(()
=>
{
// break
next
({
// }
path
:
'
/login
'
// } else if (to.path.indexOf('returnGoods/list/') !== -1) {
})
// switch (to.params.type) {
},
50
)
// case 'purchase':
return
true
// to.meta.title = '采购退货'
}
else
{
// break
console
.
log
(
'
ok-------3
'
)
// case 'sale':
// return
// to.meta.title = '销售退货'
window
.
document
.
location
=
selfApi
.
WINDOWHREF_LOGIN_TOKEN
// url-
// break
return
true
// default:
}
// to.meta.title = '商品列表'
// break
// }
// }
// let token = window.localStorage.getItem('token')
// let status = window.localStorage.getItem('status')
// if (to.path === '/againLogin') {
// next()
// return true
// }
// if (to.path === '/login' && token && status) {
// next()
// return true
// }
// if (to.query.token && to.query.status) {
// console.log('ok-------0', status)
// token = to.query.token
// status = to.query.status
// // console.log(token)
// // console.log(status)
// window.localStorage.setItem('token', token)
// window.localStorage.setItem('status', status)
// }
// if (token && status === '200') {
// console.log('ok-------1', 200)
// next()
// } else if (token && status === '100') {
// console.log('ok-------2', 100)
// setTimeout(() => {
// next({
// path: '/login'
// })
// }, 50)
// return true
// } else {
// console.log('ok-------3')
// window.document.location = selfApi.WINDOWHREF_LOGIN_ROUTE // url-
// return true
// }
})
})
router
.
afterEach
((
to
,
from
,
next
)
=>
{
router
.
afterEach
((
to
,
from
,
next
)
=>
{
...
...
src/views/login/againlogin.vue
deleted
100644 → 0
View file @
27705960
<
template
>
<div
class=
"login-view"
>
<div
class=
"logo-view"
>
<img
src=
"@assets/images/login/logo.png"
/>
<p
class=
"title"
>
机构端
</p>
</div>
<!--
<div>
<div
class=
"filed-list"
>
<img
class=
"icon-img"
src=
"@assets/images/login/tel-icon.png"
/>
<van-field
v-model.trim=
"tel"
type=
"tel"
placeholder=
"请输入手机号"
maxlength=
"11"
/>
</div>
<div
class=
"filed-list code-cont"
>
<img
class=
"icon-img"
src=
"@assets/images/login/code-icon.png"
/>
<van-field
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<div
class=
"code-btn"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
</div>
</div>
-->
<div
class=
"login-btn"
@
click=
"goLogin"
>
重新登录
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'
againLogin
'
,
data
()
{
return
{}
},
methods
:
{
goLogin
()
{
window
.
document
.
location
=
this
.
$myApi
.
WINDOWHREF_INDEX
// url-
}
}
// beforeCreate () {
// document.querySelector('body').setAttribute('style', 'background: #ffffff')
// },
// beforeDestroy () {
// document.querySelector('body').removeAttribute('style')
// }
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/login/login.scss"
;
</
style
>
src/views/login/login.vue
View file @
74346a65
...
@@ -49,7 +49,6 @@ export default {
...
@@ -49,7 +49,6 @@ export default {
return
false
return
false
},
},
getCode
()
{
getCode
()
{
console
.
log
(
111
);
if
(
this
.
isSending
)
return
if
(
this
.
isSending
)
return
if
(
this
.
tel
.
length
!==
11
)
{
if
(
this
.
tel
.
length
!==
11
)
{
this
.
$toast
(
'
请正确输入手机号码
'
)
this
.
$toast
(
'
请正确输入手机号码
'
)
...
@@ -64,7 +63,6 @@ export default {
...
@@ -64,7 +63,6 @@ export default {
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
countDown
()
{
countDown
()
{
// const _this = this
let
seconds
=
60
let
seconds
=
60
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
seconds
--
seconds
--
...
@@ -82,11 +80,9 @@ export default {
...
@@ -82,11 +80,9 @@ export default {
tel
:
this
.
tel
,
tel
:
this
.
tel
,
code
:
this
.
code
code
:
this
.
code
}
}
// const _this = this
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGIN
,
curParams
)
.
then
(
res
=>
{
.
then
(
res
=>
{
console
.
log
(
'
执行了吗
'
);
window
.
document
.
location
=
this
.
$myApi
.
WINDOWHREF_ASK
// url-
this
.
$router
.
replace
(
'
/home
'
)
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
...
@@ -110,12 +106,6 @@ export default {
...
@@ -110,12 +106,6 @@ export default {
}
}
next
()
next
()
}
}
// beforeCreate () {
// document.querySelector('body').setAttribute('style', 'background: #ffffff')
// },
// beforeDestroy () {
// document.querySelector('body').removeAttribute('style')
// }
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/my/add-relation.vue
deleted
100644 → 0
View file @
27705960
<
template
>
<div
class=
"login-view"
>
<div
class=
"logo-view"
>
<img
src=
"@assets/images/login/logo.png"
/>
<p
class=
"title"
>
绑定机构
</p>
</div>
<div>
<div
class=
"filed-list"
>
<img
class=
"icon-img"
src=
"@assets/images/login/tel-icon.png"
/>
<van-field
v-model.trim=
"tel"
type=
"tel"
placeholder=
"请输入手机号"
maxlength=
"11"
/>
</div>
<div
class=
"filed-list code-cont"
>
<img
class=
"icon-img"
src=
"@assets/images/login/code-icon.png"
/>
<van-field
v-model.trim=
"code"
type=
"text"
placeholder=
"请输入验证码"
maxlength=
"6"
/>
<div
class=
"code-btn"
@
click=
"getCode"
>
{{
buttonText
}}
</div>
</div>
</div>
<div
class=
"login-btn"
@
click=
"goLogin"
>
绑定
</div>
</div>
</
template
>
<
script
>
import
{
INDEX_REFRESH
,
setLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
login
'
,
data
()
{
return
{
tel
:
''
,
// 手机号
code
:
''
,
// 验证码
buttonText
:
'
获取验证码
'
,
isSending
:
false
,
seconds
:
60
,
timer
:
null
}
},
methods
:
{
checkData
()
{
if
(
this
.
tel
.
length
!==
11
)
{
this
.
$toast
(
'
请正确输入手机号码
'
)
return
true
}
if
(
!
(
/^1
(
3|4|5|6|7|8|9
)\d{9}
$/
.
test
(
this
.
tel
)))
{
this
.
$toast
(
'
请正确输入手机号码------
'
)
return
true
}
if
(
this
.
code
.
length
!==
6
)
{
this
.
$toast
(
'
请正确输入验证码
'
)
return
true
}
return
false
},
getCode
()
{
if
(
this
.
isSending
)
return
if
(
this
.
tel
.
length
!==
11
)
{
this
.
$toast
(
'
请正确输入手机号码
'
)
return
true
}
const
curParams
=
{
tel
:
this
.
tel
}
this
.
$http
.
post
(
this
.
$myApi
.
SENDCODE
,
curParams
)
.
then
(
res
=>
{
console
.
log
(
res
,
'
res----------
'
)
this
.
isSending
=
true
this
.
countDown
()
})
.
catch
(()
=>
{})
},
countDown
()
{
// const _this = this
let
seconds
=
60
this
.
timer
=
setInterval
(()
=>
{
seconds
--
this
.
buttonText
=
`重新获取(
${
seconds
}
s)`
if
(
seconds
<
1
)
{
this
.
isSending
=
false
this
.
buttonText
=
'
重新获取
'
clearInterval
(
this
.
timer
)
}
},
1000
)
},
goLogin
()
{
if
(
this
.
checkData
())
return
true
const
curParams
=
{
tel
:
this
.
tel
,
code
:
this
.
code
}
this
.
$http
.
post
(
this
.
$myApi
.
BINDLOGINTWO
,
curParams
)
.
then
(
res
=>
{
console
.
log
(
res
)
this
.
$toast
(
'
绑定成功
'
)
setLocalStorage
(
INDEX_REFRESH
,
true
)
setTimeout
(()
=>
{
this
.
$router
.
replace
({
name
:
'
home
'
})
},
500
)
})
.
catch
(()
=>
{})
},
fetchData
(
to
,
from
)
{
this
.
tel
=
''
// 手机号
this
.
code
=
''
// 验证码
this
.
buttonText
=
'
获取验证码
'
this
.
isSending
=
false
this
.
seconds
=
60
this
.
timer
=
null
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
if
(
this
.
timer
)
{
clearInterval
(
this
.
timer
)
}
next
()
}
// beforeCreate () {
// document.querySelector('body').setAttribute('style', 'background: #ffffff')
// },
// beforeDestroy () {
// document.querySelector('body').removeAttribute('style')
// }
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/login/login.scss"
;
</
style
>
src/views/my/charge.vue
View file @
74346a65
<
template
>
<
template
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"cont"
v-if=
"order"
>
<div
class=
"top"
>
<div
class=
"top"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title"
>
维修类目:
</div>
<div
class=
"title"
>
维修类目:
</div>
...
@@ -9,9 +12,7 @@
...
@@ -9,9 +12,7 @@
<div
class=
"item-desc que-desc"
>
{{
order
.
description
}}
</div>
<div
class=
"item-desc que-desc"
>
{{
order
.
description
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
<div
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
class=
"item-desc"
>
{{
order
.
region
.
region_name
}}
-
{{
order
.
room
.
room_name
}}
-
{{
order
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
...
@@ -27,32 +28,101 @@
...
@@ -27,32 +28,101 @@
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"item-title"
>
图片详情:
</div>
<div
class=
"img flex-h"
v-for=
"(child, index) in order.image"
:key=
"index"
>
<div
<img
:src=
"child.url"
alt
/>
class=
"img flex-h"
v-for=
"(child, index) in order.image"
:key=
"index"
>
<img
:src=
"child.url"
alt
/>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"things"
>
<div
class=
"things"
>
<div
class=
"things_title"
>
所需耗材
</div>
<div
class=
"things_title"
>
所需耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<div
<div
class=
"item flex-h flex-hb"
@
click=
"showZl(index)"
>
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<div
class=
"item flex-h flex-hb"
@
click=
"showZl(index)"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材种类
</div>
<div
class=
"title_left"
>
耗材种类
</div>
<div
class=
"title_r"
>
{{
item
.
zl
}}
</div>
<div
class=
"title_r"
>
{{
item
.
zl
}}
</div>
</div>
</div>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
</div>
</div>
<div
class=
"item flex-h flex-hb"
@
click=
"showHc(index)"
>
<div
class=
"item flex-h flex-hb"
@
click=
"showHc(index)"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"item_title flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材名称
</div>
<div
class=
"title_left"
>
耗材名称
</div>
<div
class=
"title_r"
>
{{
item
.
mc
}}
</div>
<div
class=
"title_r"
>
{{
item
.
mc
}}
</div>
</div>
</div>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select flex-h flex-vc"
>
<div
class=
"select_txt"
>
选择
</div>
<div
class=
"select_txt"
>
选择
</div>
<img
src=
"@assets/images/my/select.png"
alt
/>
<img
src=
"@assets/images/my/select.png"
alt
/>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"title_left"
>
耗材个数
</div>
<input
type=
"number"
placeholder=
"请输入"
v-model=
"item.sl"
/>
</div>
<!-- 种类弹窗 -->
<van-popup
v-model=
"item.zlSelect"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"types"
@
confirm=
"(value)=>
{typeConfirm(value,index)}"
@cancel="typeCancel(index)"
/>
</van-popup>
<van-popup
v-model=
"item.mcSelect"
round
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"hcName"
@
confirm=
"(value)=>
{hcConfirm(value,index)}"
@cancel="hcCancel(index)"
/>
</van-popup>
</div>
<div
class=
"line"
></div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
class=
"del-btn"
@
click=
"delMeth"
>
-删除耗材
</div>
<div
class=
"add-btn"
@
click=
"addMeth"
>
+新增耗材
</div>
</div>
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
...
@@ -126,7 +196,7 @@ export default {
...
@@ -126,7 +196,7 @@ export default {
total_price
:
0
,
total_price
:
0
,
}
}
},
},
created
()
{
created
()
{
// console.log('change页面')
// console.log('change页面')
this
.
repair_order_id
=
this
.
$route
.
query
.
id
this
.
repair_order_id
=
this
.
$route
.
query
.
id
// console.log(this.$route.query.id,'接收的id');
// console.log(this.$route.query.id,'接收的id');
...
@@ -135,9 +205,8 @@ export default {
...
@@ -135,9 +205,8 @@ export default {
// mounted(){
// mounted(){
// this.getDetail()
// this.getDetail()
// },
// },
methods
:{
methods
:
{
getDetail
(){
getDetail
()
{
let
repair_order_id
=
this
.
repair_order_id
.
toString
()
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
this
.
repair_order_id
repair_order_id
:
this
.
repair_order_id
}
}
...
@@ -193,10 +262,10 @@ export default {
...
@@ -193,10 +262,10 @@ export default {
},
},
addMeth
()
{
addMeth
()
{
this
.
addList
.
push
({
this
.
addList
.
push
({
zl
:
''
,
zl
:
''
,
mc
:
''
,
mc
:
''
,
sl
:
''
,
sl
:
''
,
zlSelect
:
false
,
zlSelect
:
false
,
mcSelect
:
false
mcSelect
:
false
})
})
},
},
...
...
src/views/my/relation-users.vue
deleted
100644 → 0
View file @
27705960
<
template
>
<div
class=
"relation-users-page"
>
<div
class=
"header"
>
<p
class=
"name"
>
{{
supplier
?
supplier
.
shop_name
:
'
--
'
}}
</p>
<p>
绑定账号:
{{
supplier_tel
}}
</p>
</div>
<div
class=
"list"
>
<div
:class=
"['list-item', index+1 >= list.length?'no-border':'' ]"
v-for=
"(item, index) in list"
:key=
"index"
>
<img
:src=
"item.avatar"
v-if=
"item.avatar"
/>
<img
src=
"@assets/images/my/touxiang.png"
v-else
/>
<p>
{{
item
.
nickname
}}
</p>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
SELFSHOP
,
getLocalStorage
}
from
'
@assets/js/self.js
'
import
{
getInfoRes
}
from
'
@assets/js/cart_res.js
'
export
default
{
name
:
'
relationUsers
'
,
data
()
{
return
{
supplier
:
null
,
// 机构信息
supplier_tel
:
''
,
list
:
[],
isloading
:
false
,
page
:
1
,
more
:
true
,
locked
:
false
,
limit
:
10
}
},
methods
:
{
// 初始化
initData
()
{
this
.
list
=
[]
this
.
page
=
1
this
.
more
=
true
this
.
locked
=
false
this
.
isloading
=
false
},
// 绑定的微信列表
getUserList
()
{
if
(
this
.
more
&&
!
this
.
isloading
)
{
const
curParams
=
{
page
:
this
.
page
,
pageSize
:
this
.
limit
,
shop_id
:
getLocalStorage
(
SELFSHOP
)
?
getLocalStorage
(
SELFSHOP
).
id
:
''
}
this
.
isloading
=
true
this
.
$http
.
get
(
this
.
$myApi
.
WXLIST
,
curParams
)
.
then
(
data
=>
{
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
page
=
data
.
next
this
.
more
=
data
.
more
this
.
locked
=
false
this
.
isloading
=
false
})
.
catch
(()
=>
{
this
.
locked
=
false
this
.
isloading
=
false
})
}
},
// 获取机构信息
getSupplierDetail
()
{
getInfoRes
(
this
)
},
onRefresh
()
{
setTimeout
(()
=>
{
this
.
isloading
=
false
},
1000
)
},
scroll
()
{
if
(
window
.
pageYOffset
/
(
document
.
documentElement
.
scrollHeight
-
window
.
innerHeight
)
>=
0.7
&&
this
.
more
)
{
if
(
!
this
.
locked
)
{
this
.
locked
=
true
this
.
getUserList
()
}
}
},
fetchData
(
to
,
from
)
{
this
.
initData
()
this
.
getUserList
()
this
.
getSupplierDetail
()
window
.
addEventListener
(
'
scroll
'
,
this
.
scroll
,
false
)
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
(
to
,
from
,
next
)
})
},
beforeRouteLeave
(
to
,
from
,
next
)
{
window
.
removeEventListener
(
'
scroll
'
,
this
.
scroll
,
false
)
next
()
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/my/relation-users.scss"
;
</
style
>
src/views/tabbar/Home.vue
View file @
74346a65
...
@@ -4,12 +4,11 @@
...
@@ -4,12 +4,11 @@
<div
class=
"point"
></div>
<div
class=
"point"
></div>
<div
class=
"status"
>
工作中
</div>
<div
class=
"status"
>
工作中
</div>
</div>
</div>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<div
class=
"menu flex-h flex-hb"
>
<div
class=
"menu flex-h flex-hb"
>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"hc_total"
>
共
{{
count
}}
个工单
</div>
<div
class=
"options"
@
click=
"show"
>
<div
class=
"options"
>
{{
currentName
}}
{{
currentName
}}
<div
class=
"option-box"
v-show=
"xianshi
"
>
<div
class=
"option-box"
v-show=
"true
"
>
<div
<div
class=
"option-item"
class=
"option-item"
v-for=
"item in optionList"
v-for=
"item in optionList"
...
@@ -20,21 +19,18 @@
...
@@ -20,21 +19,18 @@
</div>
</div>
</div>
</div>
</div>
</div>
<van-pull-refresh
v-model=
"isloading"
@
refresh=
"onRefresh"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id"
>
<div
class=
"order-item"
v-for=
"(item, index) in list"
:key=
"item.id"
>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"title"
>
{{
item
.
order_status_display
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
预约时间:
</div>
<div
class=
"item-title"
>
预约时间:
</div>
<div
<div
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
class=
"item-desc"
>
{{
item
.
appointment_date
}}
{{
item
.
appointment_time
.
start_time
}}
-
{{
item
.
appointment_time
.
end_time
}}
</div>
</div>
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-title"
>
问题描述:
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
description
}}
</div>
<div
class=
"item-desc que-desc"
>
{{
item
.
description
}}
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
服务地址:
</div>
<div
class=
"item-title"
>
服务地址:
</div>
<div
<div
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
class=
"item-desc"
>
{{
item
.
region
.
region_name
}}
-
{{
item
.
room
.
room_name
}}
-
{{
item
.
address
}}
</div>
</div>
</div>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item flex-h flex-vc"
>
<div
class=
"item-title"
>
客户姓名:
</div>
<div
class=
"item-title"
>
客户姓名:
</div>
...
@@ -63,7 +59,7 @@
...
@@ -63,7 +59,7 @@
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-title"
>
联系电话:
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
<div
class=
"item-desc"
>
{{
item
.
worker
.
phone
}}
</div>
</div>
</div>
<div
class=
"material"
v-if=
"item.no_pay_order != null"
>
<div
class=
"material"
v-if=
"item.no_pay_order != null"
>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"item-title"
>
已支付耗材
</div>
<div
class=
"ma-item flex-h flex-hb"
>
<div
class=
"ma-item flex-h flex-hb"
>
<div
class=
"one"
>
洁具
</div>
<div
class=
"one"
>
洁具
</div>
...
@@ -73,21 +69,32 @@
...
@@ -73,21 +69,32 @@
</div>
</div>
<div
class=
"line"
></div>
<div
class=
"line"
></div>
<div
class=
"btn flex-h flex-hr"
>
<div
class=
"btn flex-h flex-hr"
>
<div
v-if=
"item.is_can_remark_material==1"
class=
"btn-item bz-btn"
@
click=
"bz_click(item.id)"
>
备注耗材
</div>
<div
v-if=
"item.is_can_remark_material==1"
class=
"btn-item bz-btn"
@
click=
"bz_click(item.id)"
>
备注耗材
</div>
<div
v-if=
"item.is_can_confirm_complete==1"
class=
"btn-item qr-btn"
>
确认完成
</div>
<div
<div
v-if=
"item.is_can_initiate_charge==1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(item.id)"
>
发起收费
</div>
v-if=
"item.is_can_confirm_complete==1"
<div
v-if=
"item.is_can_initiate_transfer_order==1"
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
class=
"btn-item qr-btn"
>
确认完成
</div>
<div
v-if=
"item.is_can_initiate_charge==1"
class=
"btn-item sf-btn"
@
click=
"tz_charge(item.id)"
>
发起收费
</div>
<div
v-if=
"item.is_can_initiate_transfer_order==1"
class=
"btn-item"
@
click=
"zd_click"
>
发起转单
</div>
<div
<div
v-if=
"item.is_can_begin_repair==1"
v-if=
"item.is_can_begin_repair==1"
class=
"btn-item"
class=
"btn-item"
@
click=
"starRepir(item.id,index)"
@
click=
"starRepir(item.id,index)"
>
开始维修
</div>
>
开始维修
</div>
<div
v-if=
"item.is_can_see_appraisal==1"
class=
"btn-item"
>
查看评价
</div>
<div
v-if=
"item.is_can_see_appraisal==1"
class=
"btn-item"
>
查看评价
</div>
<div
v-if=
"item.is_can_see_material==1"
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
<div
v-if=
"item.is_can_see_material==1"
class=
"btn-item sf-btn"
@
click=
"look_click"
>
查看耗材
</div>
</div>
</div>
</div>
</div>
<!-- 空数据 -->
<!-- 空数据 -->
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
<van-empty
class=
"custom-image"
description=
"暂无工单哦~"
v-if=
"!list.length && !more"
/>
</van-pull-refresh>
</van-pull-refresh>
<div
class=
"blank"
></div>
<div
class=
"blank"
></div>
<!-- 发起转单弹窗 -->
<!-- 发起转单弹窗 -->
...
@@ -95,16 +102,30 @@
...
@@ -95,16 +102,30 @@
<div
class=
"pop_title"
>
备注转单原因
</div>
<div
class=
"pop_title"
>
备注转单原因
</div>
<textarea
placeholder=
"请输入转单理由"
></textarea>
<textarea
placeholder=
"请输入转单理由"
></textarea>
<div
class=
"btnItem flex-h"
>
<div
class=
"btnItem flex-h"
>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"cancel"
@
click=
"cancel"
>
取消
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
<div
class=
"sure"
@
click=
"zd_submit"
>
提交
</div>
</div>
</div>
</van-popup>
</van-popup>
<!-- 备注耗材弹窗 -->
<!-- 备注耗材弹窗 -->
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<van-popup
v-model=
"hcShow"
close-icon=
"close"
>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"pop_title"
>
备注耗材
</div>
<div
class=
"list-item"
v-for=
"(item,index) in addList"
:key=
"index"
>
<div
<input
class=
"input"
v-model=
"item.hc"
type=
"text"
placeholder=
"请输入耗材名称"
/>
class=
"list-item"
<input
class=
"input"
v-model=
"item.sl"
type=
"text"
placeholder=
"请输入耗材个数"
/>
v-for=
"(item,index) in addList"
:key=
"index"
>
<input
class=
"input"
v-model=
"item.hc"
type=
"text"
placeholder=
"请输入耗材名称"
/>
<input
class=
"input"
v-model=
"item.sl"
type=
"text"
placeholder=
"请输入耗材个数"
/>
</div>
</div>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
class=
"math-btn flex-h flex-vc flex-hb"
>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
<div
v-if=
"addList.length>1"
class=
"del-btn"
@
click=
"delMeth"
>
-删除
</div>
...
@@ -143,45 +164,50 @@ export default {
...
@@ -143,45 +164,50 @@ export default {
components
:
{
components
:
{
myTabbar
myTabbar
},
},
data
()
{
data
()
{
return
{
return
{
count
:
''
,
count
:
''
,
imgList
:
[],
imgList
:
[],
addList
:
[
addList
:
[
{
{
hc
:
''
,
hc
:
''
,
sl
:
''
sl
:
''
}
}
],
],
xianshi
:
false
,
xianshi
:
false
,
currentName
:
'
本月
'
,
currentName
:
'
本月
'
,
optionList
:
[{
optionList
:
[
time_type
:
'
1
'
,
{
time_type
:
'
1
'
,
name
:
'
今日
'
name
:
'
今日
'
},{
},
time_type
:
'
2
'
,
{
time_type
:
'
2
'
,
name
:
'
本周
'
name
:
'
本周
'
},{
},
time_type
:
'
3
'
,
{
time_type
:
'
3
'
,
name
:
'
本月
'
name
:
'
本月
'
},{
},
time_type
:
'
4
'
,
{
time_type
:
'
4
'
,
name
:
'
自定义
'
name
:
'
自定义
'
}],
}
],
activeStatus
:
3
,
activeStatus
:
3
,
zdShow
:
false
,
//
发起转单弹窗
zdShow
:
false
,
//
发起转单弹窗
hcShow
:
false
,
//
耗材弹窗
hcShow
:
false
,
//
耗材弹窗
lookShow
:
false
,
//
查看耗材弹窗
lookShow
:
false
,
//
查看耗材弹窗
list
:
[],
list
:
[],
isloading
:
false
,
isloading
:
false
,
page
:
1
,
page
:
1
,
more
:
true
,
more
:
true
,
locked
:
false
,
locked
:
false
,
limit
:
10
,
limit
:
10
,
status
:
{},
status
:
{}
}
}
},
},
created
()
{
created
()
{
this
.
getList
()
this
.
getList
()
// this.getStatus()
// this.getStatus()
},
},
...
@@ -194,11 +220,11 @@ export default {
...
@@ -194,11 +220,11 @@ export default {
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
this
.
isloading
=
false
},
},
getStatus
()
{
getStatus
()
{
const
curParams
=
{}
this
.
$http
this
.
$http
.
get
(
this
.
$myApi
.
ORDER_STATUS
)
.
get
(
this
.
$myApi
.
ORDER_STATUS
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
)
this
.
status
=
res
this
.
status
=
res
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
...
@@ -211,15 +237,16 @@ export default {
...
@@ -211,15 +237,16 @@ export default {
page
:
this
.
page
,
page
:
this
.
page
,
limit
:
this
.
limit
limit
:
this
.
limit
}
}
this
.
$http
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
this
.
$http
.
then
(
data
=>
{
.
get
(
this
.
$myApi
.
REPAIR_LIST
,
curParams
)
.
then
((
data
)
=>
{
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
list
=
this
.
page
===
1
?
data
.
list
:
this
.
list
.
concat
(
data
.
list
)
this
.
page
=
data
.
page
this
.
page
=
data
.
page
this
.
more
=
data
.
more
this
.
more
=
data
.
more
this
.
locked
=
false
this
.
locked
=
false
this
.
isloading
=
false
,
this
.
isloading
=
false
this
.
count
=
data
.
count
this
.
count
=
data
.
count
console
.
log
(
data
,
1111
);
console
.
log
(
data
,
1111
)
})
})
.
catch
(()
=>
{
.
catch
(()
=>
{
this
.
locked
=
false
this
.
locked
=
false
...
@@ -234,87 +261,87 @@ export default {
...
@@ -234,87 +261,87 @@ export default {
this
.
getList
()
this
.
getList
()
}
}
},
},
starRepir
(
id
,
index
){
// 开始维修
console
.
log
(
id
);
starRepir
(
id
,
index
)
{
let
repair_order_id
=
id
.
toString
(
)
console
.
log
(
id
)
const
curParams
=
{
const
curParams
=
{
repair_order_id
:
repair_order_
id
repair_order_id
:
id
}
}
// const _this = this
this
.
$http
this
.
$http
.
post
(
this
.
$myApi
.
REPAIR_BEGIN
,
curParams
)
.
post
(
this
.
$myApi
.
REPAIR_BEGIN
,
curParams
)
.
then
(
res
=>
{
.
then
((
res
)
=>
{})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
addMeth
()
{
addMeth
()
{
this
.
addList
.
push
({
this
.
addList
.
push
({
hc
:
''
,
hc
:
''
,
sl
:
''
sl
:
''
})
})
},
},
delMeth
(
index
)
{
delMeth
(
index
)
{
this
.
addList
.
splice
(
index
,
1
)
this
.
addList
.
splice
(
index
,
1
)
},
},
show
(
e
){
// 点击选择
if
(
this
.
xianshi
==
true
){
show
(
e
)
{
if
(
this
.
xianshi
==
true
)
{
this
.
xianshi
=
false
this
.
xianshi
=
false
}
else
if
(
this
.
xianshi
==
false
)
{
}
else
if
(
this
.
xianshi
==
false
)
{
this
.
xianshi
=
true
this
.
xianshi
=
true
}
}
},
},
changeItem
(
time_type
,
name
)
{
// 日期维度变化
console
.
log
(
name
);
changeItem
(
time_type
,
name
)
{
if
(
time_type
==
this
.
activeStatus
){
console
.
log
(
time_type
,
name
,
'
111111111111111111
'
)
if
(
time_type
==
this
.
activeStatus
)
{
return
return
}
}
this
.
activeStatus
=
time_type
;
this
.
activeStatus
=
time_type
this
.
currentName
=
name
this
.
currentName
=
name
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
initData
()
this
.
initData
()
this
.
getList
()
this
.
getList
()
},
0
);
},
0
)
},
},
//
备注耗材弹窗
//
备注耗材弹窗
bz_click
(
id
)
{
bz_click
(
id
)
{
console
.
log
(
id
,
'
nfnsohnfgvdosrgvf
'
);
console
.
log
(
id
,
'
nfnsohnfgvdosrgvf
'
)
this
.
hcShow
=
true
this
.
hcShow
=
true
},
},
//
转单弹窗
//
转单弹窗
zd_click
()
{
zd_click
()
{
this
.
zdShow
=
true
this
.
zdShow
=
true
},
},
//
查看耗材弹窗
//
查看耗材弹窗
look_click
()
{
look_click
()
{
this
.
lookShow
=
true
this
.
lookShow
=
true
},
},
cancel
()
{
cancel
()
{
this
.
zdShow
=
false
this
.
zdShow
=
false
this
.
hcShow
=
false
this
.
hcShow
=
false
this
.
lookShow
=
false
this
.
lookShow
=
false
},
},
//
转单提交
//
转单提交
zd_submit
()
{
zd_submit
()
{
this
.
zdShow
=
false
this
.
zdShow
=
false
console
.
log
(
111
)
console
.
log
(
111
)
},
},
//
备注提交
//
备注提交
bz_submit
(
id
)
{
bz_submit
(
id
)
{
console
.
log
(
id
,
1111
);
console
.
log
(
id
,
1111
)
console
.
log
(
'
六点十分
'
,
this
.
addList
);
console
.
log
(
'
六点十分
'
,
this
.
addList
)
this
.
hcShow
=
false
this
.
hcShow
=
false
this
.
lookShow
=
false
this
.
lookShow
=
false
console
.
log
(
'
111
'
);
console
.
log
(
'
111
'
)
},
},
//
发起收费
//
发起收费
tz_charge
(
id
)
{
tz_charge
(
id
)
{
console
.
log
(
id
,
'
jaeofne
'
);
console
.
log
(
id
,
'
jaeofne
'
)
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'
/charge
'
,
path
:
'
/charge
'
,
query
:
{
id
}
query
:
{
id
}
})
})
},
}
}
,
}
}
}
</
script
>
</
script
>
...
...
src/views/tabbar/mine.vue
View file @
74346a65
<
template
>
<
template
>
<div
class=
"cont"
v-if=
"user"
>
<div
class=
"cont"
v-if=
"user"
>
<div
class=
"top"
></div>
<div
class=
"top"
></div>
<div
class=
"info-item"
>
<div
class=
"info-item"
>
<div
class=
"photo"
>
<div
class=
"photo"
>
<img
src=
"@assets/images/my/touxiang.png"
alt
/>
<img
src=
"@assets/images/my/touxiang.png"
alt
/>
</div>
</div>
<div
class=
"btn"
>
工作中
</div>
<div
class=
"btn"
>
工作中
</div>
<div
class=
"name"
>
{{
user
.
name
}}
</div>
<div
class=
"name"
>
{{
user
.
name
}}
</div>
<div
class=
"group"
>
{{
user
.
department
.
name
}}
</div>
<div
class=
"group"
>
{{
user
.
department
.
name
}}
</div>
<div
class=
"tel flex-h"
>
<div
class=
"tel flex-h"
>
<div
class=
"telNumber"
>
{{
user
.
phone
}}
</div>
<div
class=
"telNumber"
>
{{
user
.
phone
}}
</div>
<img
src=
"@assets/images/my/bianji.png"
alt
/>
<img
src=
"@assets/images/my/bianji.png"
alt
/>
</div>
</div>
</div>
</div>
<!-- tabbar -->
<!-- tabbar -->
...
@@ -25,24 +34,24 @@ export default {
...
@@ -25,24 +34,24 @@ export default {
components
:
{
components
:
{
myTabbar
myTabbar
},
},
data
()
{
data
()
{
return
{
return
{
user
:
''
,
user
:
''
}
}
},
},
created
()
{
created
()
{
this
.
getUserInfo
()
this
.
getUserInfo
()
},
},
methods
:
{
methods
:
{
getUserInfo
()
{
getUserInfo
()
{
this
.
$http
.
get
(
this
.
$myApi
.
USERINFO
)
this
.
$http
.
then
(
res
=>
{
.
get
(
this
.
$myApi
.
USERINFO
)
.
then
((
res
)
=>
{
this
.
user
=
res
this
.
user
=
res
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
}
}
}
}
}
</
script
>
</
script
>
...
@@ -58,7 +67,7 @@ export default {
...
@@ -58,7 +67,7 @@ export default {
position
:
relative
;
position
:
relative
;
}
}
.info-item
{
.info-item
{
width
:
100%
;
width
:
7
.5rem
;
height
:
8
.05rem
;
height
:
8
.05rem
;
background
:
#ffffff
;
background
:
#ffffff
;
border-radius
:
0
.28rem
0
.28rem
0rem
0rem
;
border-radius
:
0
.28rem
0
.28rem
0rem
0rem
;
...
@@ -74,7 +83,7 @@ export default {
...
@@ -74,7 +83,7 @@ export default {
background
:
#f1f1f1
;
background
:
#f1f1f1
;
position
:
absolute
;
position
:
absolute
;
top
:
-1rem
;
top
:
-1rem
;
left
:
3
.2
rem
;
left
:
2
.9
rem
;
}
}
.btn
{
.btn
{
width
:
1
.38rem
;
width
:
1
.38rem
;
...
...
src/views/tabbar/modifyPhone.vue
View file @
74346a65
src/views/tabbar/my.vue
deleted
100644 → 0
View file @
27705960
<
template
>
<div
class=
"my-page"
>
<div
class=
"my-header"
>
<img
:src=
"userInfo.avatar"
class=
"user-img"
v-if=
"userInfo && userInfo.avatar"
/>
<img
src=
"@assets/images/my/touxiang.png"
class=
"user-img"
v-else
/>
<div
class=
"left-cont"
>
<p
class=
"user-name one-line"
>
{{
userInfo
.
wx_nick_name
}}
</p>
<p
class=
""
>
绑定账号:
{{
supplier_tel
}}
</p>
</div>
</div>
<div
class=
"navlist"
>
<div
class=
"list-item"
>
<div
class=
"icon"
><span
class=
"iconfont icon-bangding1"
></span></div>
<div
class=
"content"
@
click=
"goRelation"
>
<span
class=
"title"
>
绑定微信
</span>
<span
class=
"iconfont icon-youhuaxiangyougengduo"
></span>
</div>
</div>
<div
class=
"list-item"
>
<div
class=
"icon"
><span
class=
"iconfont icon-bangding2"
></span></div>
<div
class=
"content"
@
click=
"addRelation"
>
<span
class=
"title"
>
绑定机构
</span>
<span
class=
"iconfont icon-youhuaxiangyougengduo"
></span>
</div>
</div>
<div
class=
"list-item no-border"
>
<div
class=
"icon"
><span
class=
"iconfont icon-dingyue1"
></span></div>
<div
class=
"content"
@
click=
"codeShow=true"
>
<span
class=
"title"
>
订阅通知
</span>
<span
class=
"iconfont icon-youhuaxiangyougengduo"
></span>
</div>
</div>
</div>
<!-- 退出登录 -->
<div
class=
"login-out-btn"
@
click=
"logout_click"
>
退出当前机构
</div>
<van-popup
v-model=
"codeShow"
>
<img
src=
"@assets/images/my/qrcode.jpg"
/>
</van-popup>
<!-- tabbar -->
<my-tabbar
curname=
"my"
></my-tabbar>
</div>
</
template
>
<
script
>
import
myTabbar
from
'
@components/common/tabbar.vue
'
import
{
getInfoRes
}
from
'
@assets/js/cart_res.js
'
import
{
MY_REFRESH
,
INDEX_REFRESH
,
getLocalStorage
,
setLocalStorage
,
removeLocalStorage
}
from
'
@assets/js/self.js
'
export
default
{
name
:
'
my
'
,
components
:
{
myTabbar
},
data
()
{
return
{
isclick
:
false
,
codeShow
:
false
,
userInfo
:
{},
supplier_tel
:
''
}
},
methods
:
{
goRelation
()
{
this
.
$router
.
push
({
name
:
'
relationUsers
'
})
},
addRelation
()
{
this
.
$router
.
push
({
name
:
'
addRelation
'
})
},
getUserInfo
()
{
getInfoRes
(
this
,
(
data
)
=>
{
this
.
userInfo
=
data
removeLocalStorage
(
MY_REFRESH
)
})
},
logout
()
{
this
.
isclick
=
true
// 发起网络请求
this
.
$http
.
post
(
this
.
$myApi
.
LOGOUT
)
.
then
(
res
=>
{
this
.
isclick
=
false
// 清除缓存
this
.
userInfo
=
{}
this
.
supplier_tel
=
''
window
.
localStorage
.
clear
()
setLocalStorage
(
INDEX_REFRESH
,
true
)
this
.
$router
.
push
({
name
:
'
againLogin
'
})
})
.
catch
(()
=>
{
this
.
isclick
=
false
})
},
logout_click
()
{
if
(
this
.
isclick
)
return
this
.
$dialog
.
confirm
({
title
:
'
提示
'
,
message
:
'
确定要退出当前账号吗
'
,
theme
:
'
round-button
'
,
confirmButtonColor
:
'
#325BEF
'
,
cancelButtonColor
:
'
#FFFFFF
'
,
className
:
'
self-dialog
'
})
.
then
(()
=>
{
this
.
logout
()
})
.
catch
(()
=>
{})
},
fetchData
(
to
,
from
)
{
this
.
isclick
=
false
if
(
getLocalStorage
(
MY_REFRESH
))
{
this
.
getUserInfo
()
}
}
},
mounted
()
{
this
.
getUserInfo
()
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
fetchData
()
})
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@assets/styles/tabbar/my.scss"
;
</
style
>
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