初步进行新装调试
This commit is contained in:
3
app.json
3
app.json
@@ -46,7 +46,8 @@
|
|||||||
"pages/workBenchNew/components/recharge/index",
|
"pages/workBenchNew/components/recharge/index",
|
||||||
"pages/workBenchNew/components/installMeter/index",
|
"pages/workBenchNew/components/installMeter/index",
|
||||||
"pages/workBenchNew/components/uninstallMeter/index",
|
"pages/workBenchNew/components/uninstallMeter/index",
|
||||||
"pages/workBenchTodoList/index"
|
"pages/workBenchTodoList/index",
|
||||||
|
"pages/workBenchNew/components/kaihu/index"
|
||||||
],
|
],
|
||||||
"subPackages": [
|
"subPackages": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ Component({
|
|||||||
},
|
},
|
||||||
async onSearchCollection() {
|
async onSearchCollection() {
|
||||||
const { searchText = "" } = this.data;
|
const { searchText = "" } = this.data;
|
||||||
const { code, message, data: parks = [] } = await getCollectionList({keyword: searchText, page: 1});
|
const { code, message, data: parks = [] } = await getCollectionList({keyword: searchText, page: 1, status: 1});
|
||||||
if (code !== OK) {
|
if (code !== OK) {
|
||||||
alertInfo(message)
|
alertInfo(message)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ Page({
|
|||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
show: true,
|
show: true,
|
||||||
title: "采集器A",
|
title: "互感器A",
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
collection: "A"
|
collection: "A"
|
||||||
})
|
})
|
||||||
@@ -126,7 +126,7 @@ Page({
|
|||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
show: true,
|
show: true,
|
||||||
title: "采集器B",
|
title: "互感器B",
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
collection: "B"
|
collection: "B"
|
||||||
})
|
})
|
||||||
@@ -139,7 +139,7 @@ Page({
|
|||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
show: true,
|
show: true,
|
||||||
title: "采集器C",
|
title: "互感器C",
|
||||||
type: 'collection',
|
type: 'collection',
|
||||||
collection: "C"
|
collection: "C"
|
||||||
})
|
})
|
||||||
@@ -360,7 +360,7 @@ Page({
|
|||||||
tenement, sharp, peak, flat, valley, overall, url, sn,
|
tenement, sharp, peak, flat, valley, overall, url, sn,
|
||||||
collectionARatio, collectionBRatio, collectionCRatio
|
collectionARatio, collectionBRatio, collectionCRatio
|
||||||
} = this.data;
|
} = this.data;
|
||||||
if (!park || !(meter || sn) || !address || meterType == null) {
|
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox) {
|
||||||
alertInfo("请填写必填项后保存")
|
alertInfo("请填写必填项后保存")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -369,7 +369,7 @@ Page({
|
|||||||
(collectionA == collectionC&& collectionA != null && collectionC != null) ||
|
(collectionA == collectionC&& collectionA != null && collectionC != null) ||
|
||||||
(collectionC == collectionB && collectionB != null && collectionC != null)
|
(collectionC == collectionB && collectionB != null && collectionC != null)
|
||||||
) {
|
) {
|
||||||
alertInfo("采集器不能重复选择")
|
alertInfo("互感器不能重复选择")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
@@ -377,7 +377,7 @@ Page({
|
|||||||
(collectionARatio != collectionCRatio&& collectionARatio != null && collectionCRatio != null) ||
|
(collectionARatio != collectionCRatio&& collectionARatio != null && collectionCRatio != null) ||
|
||||||
(collectionCRatio != collectionBRatio && collectionBRatio != null && collectionCRatio != null)
|
(collectionCRatio != collectionBRatio && collectionBRatio != null && collectionCRatio != null)
|
||||||
) {
|
) {
|
||||||
alertInfo("采集器倍率不一致")
|
alertInfo("互感器倍率不一致")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const { code, data, message } = await installMeter({
|
const { code, data, message } = await installMeter({
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
placeholder="请选择建筑"
|
placeholder="请选择建筑"
|
||||||
text="{{buildingName}}"
|
text="{{buildingName}}"
|
||||||
bind:search="onBuildingFocus"
|
bind:search="onBuildingFocus"
|
||||||
|
required="{{true}}"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
@@ -48,6 +49,7 @@
|
|||||||
placeholder="请选择电表箱"
|
placeholder="请选择电表箱"
|
||||||
text="{{meterBoxName}}"
|
text="{{meterBoxName}}"
|
||||||
bind:search="onMeterBoxFocus"
|
bind:search="onMeterBoxFocus"
|
||||||
|
required="{{true}}"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="电表类型"
|
label="电表类型"
|
||||||
@@ -85,20 +87,20 @@
|
|||||||
bind:search="onBindCard"
|
bind:search="onBindCard"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="采集器A"
|
label="互感器A"
|
||||||
placeholder="请选择采集器绑定(选填)"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionAName}}"
|
text="{{collectionAName}}"
|
||||||
bind:search="onBindCollectionA"
|
bind:search="onBindCollectionA"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="采集器B"
|
label="互感器B"
|
||||||
placeholder="请选择采集器绑定(选填)"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionBName}}"
|
text="{{collectionBName}}"
|
||||||
bind:search="onBindCollectionB"
|
bind:search="onBindCollectionB"
|
||||||
/>
|
/>
|
||||||
<searchSelectWrapper
|
<searchSelectWrapper
|
||||||
label="采集器C"
|
label="互感器C"
|
||||||
placeholder="请选择采集器绑定(选填)"
|
placeholder="请选择互感器绑定"
|
||||||
text="{{collectionCName}}"
|
text="{{collectionCName}}"
|
||||||
bind:search="onBindCollectionC"
|
bind:search="onBindCollectionC"
|
||||||
/>
|
/>
|
||||||
|
|||||||
66
pages/workBenchNew/components/kaihu/index.js
Normal file
66
pages/workBenchNew/components/kaihu/index.js
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
// pages/workBenchNew/components/kaihu/index.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad(options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage() {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
10
pages/workBenchNew/components/kaihu/index.json
Normal file
10
pages/workBenchNew/components/kaihu/index.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {
|
||||||
|
"search-select": "/components/searchSelect/index",
|
||||||
|
"van-field": "@vant/weapp/field/index",
|
||||||
|
"van-button": "@vant/weapp/button/index",
|
||||||
|
"navigator": "/components/navigator/index",
|
||||||
|
"van-dialog": "@vant/weapp/dialog/index"
|
||||||
|
},
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
83
pages/workBenchNew/components/kaihu/index.wxml
Normal file
83
pages/workBenchNew/components/kaihu/index.wxml
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
<!--pages/workBenchNew/components/kaihu/index.wxml-->
|
||||||
|
<navigator canBack="{{true}}" title="开户" />
|
||||||
|
<view class="modalContentWrapper">
|
||||||
|
<van-field
|
||||||
|
value="{{name}}"
|
||||||
|
data-name="name"
|
||||||
|
bind:change="onChange"
|
||||||
|
label="商户全称"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入商户全称"
|
||||||
|
autosize="{{true}}"
|
||||||
|
title-width="132rpx"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{shortName}}"
|
||||||
|
data-name="shortName"
|
||||||
|
bind:change="onChange"
|
||||||
|
label="商户简称"
|
||||||
|
placeholder="请输入商户简称"
|
||||||
|
type="textarea"
|
||||||
|
autosize="{{true}}"
|
||||||
|
title-width="132rpx"
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{address}}"
|
||||||
|
data-name="address"
|
||||||
|
bind:change="onChange"
|
||||||
|
label="联系地址"
|
||||||
|
placeholder="请输入联系地址"
|
||||||
|
type="textarea"
|
||||||
|
autosize="{{true}}"
|
||||||
|
title-width="132rpx"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{contact}}"
|
||||||
|
data-name="contact"
|
||||||
|
bind:change="onChange"
|
||||||
|
label="联系人"
|
||||||
|
placeholder="请输入联系人"
|
||||||
|
type="textarea"
|
||||||
|
autosize="{{true}}"
|
||||||
|
title-width="132rpx"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{phone}}"
|
||||||
|
data-name="phone"
|
||||||
|
bind:change="onChange"
|
||||||
|
label="联系电话"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
type="textarea"
|
||||||
|
autosize="{{true}}"
|
||||||
|
title-width="132rpx"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<van-field
|
||||||
|
value="{{ buildingName }}"
|
||||||
|
placeholder="请选择建筑"
|
||||||
|
label="建筑"
|
||||||
|
use-button-slot
|
||||||
|
readonly
|
||||||
|
title-width="120rpx"
|
||||||
|
required
|
||||||
|
>
|
||||||
|
<van-button slot="button" size="small" type="info" bind:click="onBuildingFocus">
|
||||||
|
选择
|
||||||
|
</van-button>
|
||||||
|
</van-field>
|
||||||
|
<van-field
|
||||||
|
value="{{ feeTypeName }}"
|
||||||
|
placeholder="请选择收费类型"
|
||||||
|
label="收费类型"
|
||||||
|
readonly
|
||||||
|
use-button-slot
|
||||||
|
title-width="120rpx"
|
||||||
|
>
|
||||||
|
<van-button slot="button" size="small" type="info" bind:click="onFeeTypeFocus">
|
||||||
|
选择
|
||||||
|
</van-button>
|
||||||
|
</van-field>
|
||||||
|
</view>
|
||||||
1
pages/workBenchNew/components/kaihu/index.wxss
Normal file
1
pages/workBenchNew/components/kaihu/index.wxss
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/* pages/workBenchNew/components/kaihu/index.wxss */
|
||||||
@@ -76,6 +76,11 @@ Page({
|
|||||||
url: '/pages/workBenchNew/components/uninstallMeter/index',
|
url: '/pages/workBenchNew/components/uninstallMeter/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
jumpToKaihu() {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: 'pages/workBenchNew/components/kaihu/index',
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
<operate-button text="新装" bind:click="jumpToInstallMeter" />
|
<operate-button text="新装" bind:click="jumpToInstallMeter" />
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="8">
|
<van-col span="8">
|
||||||
<operate-button text="开户" />
|
<operate-button text="开户" bind:click="jumpToKaihu" />
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="8">
|
<van-col span="8">
|
||||||
<operate-button text="销户" />
|
<operate-button text="销户" />
|
||||||
|
|||||||
Reference in New Issue
Block a user