Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsalesProgram
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
7ede2bdb
authored
Jul 25, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
111
parent
7d77d9f9
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
198 additions
and
178 deletions
app.js
app.wxss
components/priceItem/priceItem.js
components/priceItem/priceItem.wxml
pages/list/bj/index.js
pages/list/bj/index.wxml
pages/list/bj/index.wxss
pages/list/qd/index.js
pages/list/qd/index.wxss
pages/tab/good/good.js
pages/tab/price/price.js
project.config.json
app.js
View file @
7ede2bdb
...
...
@@ -67,9 +67,9 @@ App({
success
(
res
)
{
if
(
res
.
data
){
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
});
//
wx.switchTab({
//
url: '/pages/tab/home/home'
//
});
}
}
...
...
@@ -81,9 +81,9 @@ App({
success
(
res
)
{
if
(
res
.
authSetting
[
'scope.userInfo'
])
{
// 已经授权
wx
.
switchTab
({
url
:
'/pages/tab/home/home'
})
//
wx.switchTab({
//
url: '/pages/tab/home/home'
//
})
}
}
})
...
...
app.wxss
View file @
7ede2bdb
...
...
@@ -242,7 +242,9 @@ image {
line-height: 98rpx;
border-radius: 8rpx;
}
.red{
color:#EA1717;
}
.btn-com-y {
background-color: #eaad37;
box-shadow: 0px 6px 10px 0px rgba(242, 191, 97, 0.5);
...
...
components/priceItem/priceItem.js
View file @
7ede2bdb
...
...
@@ -29,8 +29,9 @@ Component({
* 组件的方法列表
*/
methods
:
{
emitevent
:
function
(){
this
.
triggerEvent
(
'emitevent'
)
emitevent
:
function
(
e
){
let
inquiryItemsId
=
e
.
currentTarget
.
dataset
.
inquiryitemsid
;
this
.
triggerEvent
(
'emitevent'
,
{
inquiryItemsId
:
inquiryItemsId
})
},
previewImage
:
function
(
e
){
let
img
=
e
.
currentTarget
.
dataset
.
image
;
...
...
components/priceItem/priceItem.wxml
View file @
7ede2bdb
...
...
@@ -33,7 +33,7 @@
<text class="num"><text>数量:</text>{{item.number}} PCS</text>
</view>
<view class="item-footer row bothSide verCenter nowrap">
<text class="address ellipsis">备注:{{item.remark}}</text>
<text class="address ellipsis">备注:{{item.remark
||'--'
}}</text>
<text class="time">{{dateUtil.dateFormat(item.add_time*1000)}}</text>
</view>
</view>
...
...
@@ -62,29 +62,29 @@
</block>
<!-- 搜索页面询报价展示 -->
<block wx:if="{{priceType==3}}">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent">
<view class="price-item" wx:for="{{priceList}}" wx:key="*this" bindtap="emitevent"
data-inquiryitemsid="{{item['inquiry_items_id']}}"
>
<view class="item-header px-hr-bottom row verCenter bothSide nowrap">
<view class="row verCenter">
<text class="mark xun" wx:if="{{xb==1}}">询价</text>
<text class="mark bao" wx:else>报价</text>
<text class="company ellipsis">{{item.company}}</text>
<text class="company ellipsis">{{item.company
_name||'--'
}}</text>
</view>
<text class="time">{{
item.time
}}</text>
<text class="time">{{
dateUtil.dateFormat(item.add_time*1000)
}}</text>
</view>
<view class="item-middle row verCenter bothSide item-middle2 nowrap">
<text class="name ellipsis">{{item.
name
}}</text>
<text class="name ellipsis">{{item.
goods_name||'--'
}}</text>
<block wx:if="{{xb==1}}">
<text class="num-bj" wx:if="{{item.
count}}">{{item.count
}}个报价</text>
<text class="num-bj" wx:if="{{item.
offer_num}}">{{item.offer_num
}}个报价</text>
<text class="no-bj" wx:else>等待报价</text>
</block>
<text class="price" wx:else>¥{{item.price}}</text>
</view>
<view class="item-middle row verCenter nowrap">
<text class="brand ellipsis"><text>品牌:</text>{{item.brand}}</text>
<text class="num
bold"><text class="nobold">数量:</text>{{item.num}}
PCS</text>
<text class="brand ellipsis"><text>品牌:</text>{{item.brand
_name
}}</text>
<text class="num
"><text>数量:</text>{{item.number}}
PCS</text>
</view>
<view class="item-footer row nowrap">
<text class="address ellipsis">备注:{{item.
desc
}}</text>
<text class="address ellipsis">备注:{{item.
remark||'--'
}}</text>
</view>
</view>
</block>
...
...
pages/list/bj/index.js
View file @
7ede2bdb
// pages/list/bj/index.js
let
arr
=
[
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
fz
:
"LQFP-144"
,
hq
:
"现货"
},
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
fz
:
"LQFP-144"
,
hq
:
"现货"
},
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
fz
:
"LQFP-144"
,
hq
:
"现货"
}
]
import
{
getData
}
from
'../../../utils/util.js'
;
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
priceList
:
undefined
,
priceList
:
null
,
topInfo
:
null
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
seft
=
this
;
wx
.
showLoading
({
title
:
'加载中'
,
})
setTimeout
(()
=>
{
wx
.
hideLoading
()
seft
.
setData
({
priceList
:
arr
})
},
2000
)
let
inquiryItemsId
=
options
.
inquiryItemsId
;
this
.
getTopInfo
(
inquiryItemsId
)
},
getTopInfo
:
function
(
id
)
{
let
me
=
this
;
getData
(
apis
.
inquirySearch
,
'get'
,
{
"inquiry_items_id/eq"
:
id
},
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
me
.
setData
({
topInfo
:
res
.
inquiry_list
[
id
]
})
}
else
{
me
.
setData
({
topInfo
:
null
})
}
},
true
)
},
getList
:
function
(){
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
@@ -112,7 +83,7 @@ Page({
onShareAppMessage
:
function
()
{
},
goBj
:
function
()
{
goBj
:
function
()
{
wx
.
navigateTo
({
url
:
"/pages/form/bj/index"
,
})
...
...
pages/list/bj/index.wxml
View file @
7ede2bdb
<!--pages/list/bj/index.wxml-->
<wxs module="dateUtil" src="../../../utils/timeUtil.wxs"></wxs>
<view class="bj-view">
<view class="bj-title row bothSide verCenter">
<view class="company row verCenter">
<text class="xun">询价</text>
<text class="name bold">中麒(北京)科技有限公司</text>
<view class="bj-title ">
<view class="row bothSide verCenter" wx:if="{{topInfo}}">
<view class="company row verCenter">
<text class="xun">询价</text>
<text class="name bold">{{topInfo.company_name||'--'}}</text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji6"></text>
</view>
<text class="icon iconfont iconiconxiantiaoshouji6"></text>
</view>
<view class="xb-com-content">
<view>
<view class="title row bothSide verCenter nowrap px-hr-bottom">
<text class="name bold ellipsis">STM32F407ZGT6STM32F407ZGT6STM32F407ZGT6</text>
<text class="time ">05-10 10:15</text>
</view>
<view class="desc row">
<view class="left">
<view class="brand row">
<text class="t-com">品牌:</text>
<text class="c-com">Texas Instruments</text>
</view>
<view class="fz row">
<text class="t-com">封装:</text>
<text class="c-com">LQFP-64</text>
</view>
<view class="hq row">
<text class="t-com">货期:</text>
<text class="c-com">现货</text>
</view>
<view class="num row">
<text class="t-com">数量:</text>
<text class="c-com bold">100,000 PCS</text>
</view>
<view class="price row">
<text class="t-com">接受价:</text>
<text class="c-com">无</text>
</view>
<view class="bz row">
<text class="t-com">备注:</text>
<text class="c-com">有货的请尽快回复,比较急着要货</text>
<view class="x-info">
<view wx:if="{{topInfo}}">
<view class="title row bothSide verCenter nowrap px-hr-bottom">
<text class="name bold ellipsis">{{topInfo.goods_name||'--'}}</text>
<text class="time ">{{dateUtil.dateFormat(topInfo.add_time*1000)}}</text>
</view>
<view class="desc row">
<view class="left">
<view class="brand row">
<text class="t-com">品牌:</text>
<text class="c-com">{{topInfo.brand_name}}</text>
</view>
<view class="fz row">
<text class="t-com">封装:</text>
<text class="c-com">{{topInfo.encap}}</text>
</view>
<view class="hq row">
<text class="t-com">货期:</text>
<text class="c-com">{{topInfo.delivery_time}}</text>
</view>
<view class="num row">
<text class="t-com">数量:</text>
<text class="c-com bold">{{topInfo.number}} PCS</text>
</view>
<view class="price row">
<text class="t-com">接受价:</text>
<text class="c-com {{(!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0')?'':'bold red'}}">
<block wx:if="{{!topInfo.price||topInfo.price=='0.00'||topInfo.price=='0'}}">未回复</block>
<block wx:else>
<block wx:if="{{topInfo.currency == 1}}">¥{{topInfo.price}}</block><block wx:else>${{topInfo.price}}
</block>
</block>
</text>
</view>
<view class="bz row">
<text class="t-com">备注:</text>
<text class="c-com">{{topInfo.remark||'--'}}</text>
</view>
</view>
<cover-image class="right" src="{{topInfo.goods_images?topInfo.goods_images:'/res/images/imgs/iclogo.png'}}"></cover-image>
</view>
<cover-image class="right" src="/res/images/imgs/iclogo.png"></cover-image>
</view>
</view>
<view class="bj-data">
<view class="xb-com-t row bothSide verCenter px-hr-bottom ">
<text class="mybj bold beforeLine">我的报价</text>
<view class="sdbj">
<
!-- <
view class="sdbj">
已收到
<text class="num">5</text> 条报价
</view>
</view>
-->
</view>
<view class="bj-list">
<view wx:if="{{priceList&&priceList.length==0}}" class="nodata">
...
...
pages/list/bj/index.wxss
View file @
7ede2bdb
...
...
@@ -12,8 +12,12 @@
color: #fff;
font-size: 26rpx;
padding: 24rpx 24rpx 60rpx;
min-height:130rpx;
box-sizing: border-box;
}
.x-info{
min-height: 496rpx;
}
.bj-title .icon {
font-size: 40rpx;
}
...
...
pages/list/qd/index.js
View file @
7ede2bdb
// pages/list/qd/index.js
let
arr
=
[
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
},
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
},
{
name
:
"STM32F407ZGT6"
,
price
:
"100.012"
,
brand
:
"Texas InstrumentsTexas"
,
num
:
"100,000"
,
desc
:
"深圳地区原装现货深圳地区原装现货"
,
time
:
"05-10 10:15"
,
company
:
"朗新科技股份有限公司"
,
}
]
import
{
getData
}
from
'../../../utils/util.js'
;
import
{
apis
}
from
'../../../utils/api.js'
;
Page
({
/**
* 页面的初始数据
*/
data
:
{
tabIndex
:
1
,
priceList
:
undefined
,
tabIndex
:
1
,
//导航初始化
priceList
:
null
,
//商品数据
limit
:
10
,
//每页的条数
p
:
1
,
//当前页面
total
:
1
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
seft
=
this
;
wx
.
showLoading
({
title
:
'加载中'
,
})
this
.
getData
();
},
getData
:
function
()
{
let
me
=
this
;
let
token
=
wx
.
getStorageSync
(
'access_token'
)
||
''
;
let
params
=
{
offset
:
me
.
data
.
limit
,
p
:
me
.
data
.
p
};
if
(
token
){
params
=
Object
.
assign
({},
params
,
{
"token"
:
token
})
}
if
(
me
.
data
.
tabIndex
==
1
){
params
=
Object
.
assign
({},
params
,{
"add_time/order"
:
"desc"
})
}
else
if
(
me
.
data
.
tabIndex
==
2
){
params
=
Object
.
assign
({},
params
,
{
"today"
:
"1"
})
}
else
{
params
=
Object
.
assign
({},
params
,
{
"offer_num/eq"
:
"0"
})
}
getData
(
apis
.
inquirySearch
,
'get'
,
params
,
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
let
newArr
=
[];
if
(
me
.
data
.
p
>
1
)
{
newArr
=
me
.
data
.
priceList
;
}
for
(
let
key
in
res
.
inquiry_list
)
{
newArr
.
push
(
res
.
inquiry_list
[
key
])
}
me
.
setData
({
priceList
:
newArr
,
total
:
res
.
total
,
});
}
else
{
if
((
me
.
data
.
p
==
1
)
&&
(
res
.
errcode
==
(
105001
||
105015
)))
{
me
.
setData
({
priceList
:
[]
})
}
setTimeout
(()
=>
{
wx
.
hideLoading
()
seft
.
setData
({
priceList
:
arr
})
},
2000
)
}
},
true
)
},
/**
...
...
@@ -96,7 +97,22 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
let
allPage
=
Math
.
ceil
(
this
.
data
.
total
/
this
.
data
.
limit
);
let
p
=
this
.
data
.
p
;
if
(
p
==
allPage
)
{
wx
.
showToast
({
title
:
'数据到底啦'
,
icon
:
'none'
,
duration
:
2000
});
return
}
else
{
this
.
setData
({
p
:
p
+
1
});
console
.
log
(
this
.
data
.
p
)
this
.
getData
();
}
},
/**
...
...
@@ -110,20 +126,13 @@ Page({
if
(
i
==
this
.
data
.
tabIndex
)
{
return
}
else
{
if
(
i
==
1
)
{
this
.
setData
({
tabIndex
:
i
,
priceList
:
arr
,
});
}
else
{
this
.
setData
({
tabIndex
:
i
,
priceList
:
[],
});
}
this
.
setData
({
priceList
:
null
,
p
:
1
,
total
:
1
,
tabIndex
:
i
,
});
this
.
getData
();
}
...
...
@@ -133,9 +142,10 @@ Page({
url
:
"/pages/form/xj/index"
})
},
emitevent
:
function
()
{
emitevent
:
function
(
e
)
{
let
inquiryItemsId
=
e
.
detail
.
inquiryItemsId
wx
.
navigateTo
({
url
:
"/pages/list/bj/index
"
,
url
:
"/pages/list/bj/index
?inquiryItemsId="
+
inquiryItemsId
,
})
}
...
...
pages/list/qd/index.wxss
View file @
7ede2bdb
/* pages/list/qd/index.wxss */
.qd-view {
box-sizing: border-box;
padding-top: 88rpx;
}
.qd-view .switch-tab-com {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: #fff;
z-index: 2;
}
.nodata .p {
margin-top: 14rpx;
}
.nodata .fb_btn {
margin-top:40rpx
margin-top: 40rpx;
}
pages/tab/good/good.js
View file @
7ede2bdb
...
...
@@ -42,7 +42,7 @@ Page({
getData
:
function
()
{
let
me
=
this
;
let
token
=
wx
.
getStorageSync
(
'access_token'
)
getData
(
apis
.
goodsInfo
,
{
getData
(
apis
.
goodsInfo
,
'get'
,
{
offset
:
me
.
data
.
limit
,
p
:
me
.
data
.
p
,
token
:
token
,
'goods_name/like'
:
me
.
data
.
confirmKey
},
function
(
res
)
{
if
(
res
.
errcode
===
0
)
{
...
...
pages/tab/price/price.js
View file @
7ede2bdb
...
...
@@ -21,7 +21,7 @@ Page({
onLoad
:
function
(
options
)
{
this
.
getData
();
},
getData
:
function
(
type
){
getData
:
function
(){
let
me
=
this
;
let
url
,
token
=
wx
.
getStorageSync
(
'access_token'
)
if
(
me
.
data
.
xb
==
1
){
...
...
@@ -29,7 +29,7 @@ Page({
}
else
{
url
=
apis
.
offerinfo
}
getData
(
url
,
{
offset
:
me
.
data
.
limit
,
p
:
me
.
data
.
p
,
token
:
token
},
function
(
res
){
getData
(
url
,
'get'
,
{
offset
:
me
.
data
.
limit
,
p
:
me
.
data
.
p
,
token
:
token
},
function
(
res
){
if
(
res
.
errcode
===
0
){
let
newArr
=
[];
if
(
me
.
data
.
p
>
1
){
...
...
@@ -134,14 +134,12 @@ Page({
this
.
setData
({
xb
:
1
});
this
.
getData
()
}
else
{
this
.
setData
({
xb
:
2
,
});
this
.
getData
()
}
this
.
getData
();
}
...
...
project.config.json
View file @
7ede2bdb
...
...
@@ -48,12 +48,20 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
0
,
"current"
:
1
,
"list"
:
[
{
"id"
:
-1
,
"name"
:
"pages/detail/chat/index"
,
"pathName"
:
"pages/detail/chat/index"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"pages/list/bj/index"
,
"pathName"
:
"pages/list/bj/index"
,
"query"
:
"inquiryItemsId=156403573054791"
,
"scene"
:
null
}
]
...
...
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