Skip to content

Commit

Permalink
列表变更
Browse files Browse the repository at this point in the history
  • Loading branch information
lixin committed Dec 26, 2018
1 parent 96c9b13 commit 9275d90
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 37 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ App({
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// wx.setStorageSync('user', { "userId": 129, "name": "", "phone": "18616236045", "role": 18, "type": 1})
// wx.setStorageSync('user', { "userId": 24, "name": "", "phone": "18616236045", "role": 18, "type": 2})

wx.getSystemInfo({
success: function(res) {wx.setStorageSync('systemInfo', res)},
Expand Down
13 changes: 4 additions & 9 deletions pages/launchPages/jqbg/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,10 @@ Page({
},
callback: (err, result) => {
if (result.success) {
if(result.one == 0){
wx.showToast({
title: '已经派过此机器的翻修单了!',
})
}else{
wx.navigateBack({
delta: 2
})
}

wx.navigateBack({
delta: 2
})
// wx.navigateBack({
// url:'/pages/launch/index'
// })
Expand Down
12 changes: 6 additions & 6 deletions pages/main/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@
<view>待处理工单</view>
</view>
<view class='work-list' scroll-y>
<block wx:if="{{Object.keys(listdata).length === 0}}">
<block wx:if="{{listdata.length === 0}}">
<view class='middle-all' style='padding:50px;font-size:14px'>暂无工单</view>
</block>
<block wx:for="{{listdata}}" wx:for-index="key" wx:for-item="value" wx:key="item">
<view style='text-align:center;font-size:16px;font-weight:bold;' data-key='{{key}}' bindtap='setCurrent'>{{key}}</view>
<block wx:if="{{key == currentHandleCode}}">
<block wx:for="{{listdata}}" wx:key="*this" wx:for-item="item">
<view style='text-align:center;font-size:16px;font-weight:bold;' data-key='{{item.code}}' bindtap='setCurrent'>{{item.code}}</view>
<block wx:if="{{item.code == currentHandleCode}}">
<span class='flex-row middle-all' style='margin:0 20px;text-align:center;'>
<block wx:for="{{currentFlowList}}" wx:for-index="i">
<block wx:for="{{currentFlowList}}" wx:for-index="i" wx:key="*this" wx:for-item="item">
<span class='flex-row'>
<block wx:if="{{item.name == 'Install'}}">
<block wx:if="{{item.value == 'Y'}}">
Expand Down Expand Up @@ -236,7 +236,7 @@
</block>


<block class="item-{{index}}" wx:for="{{value}}" wx:key="index">
<block class="item-{{index}}" wx:for="{{item.dtos}}" wx:key="index">
<view style='margin-bottom:10px'></view>
<view class="work-item view-shadow" style="{{item.canDO=='N'?'background:#D1D1D1':'background:#fff;border:2px dashed #9A32CD;'}}" data-item='{{item}}' data-navigateUrl='{{item.navigateUrl}}' bindtap="toFlowPage">
<view class='flex-row box-all' style='padding:5px;border-bottom:1px solid #F2F2F2'>
Expand Down
2 changes: 1 addition & 1 deletion pages/orderDetail/fix/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<view class="weui-label">解决方案</view>
</view>
<view class="weui-cell__bd">
<textarea class="weui-input" bindinput='remarkChange' placeholder="{{orderDetail.repair.links.remarks}}" disabled='false' style='padding:5px 15px 5px 0;width:250px;height:50px' />
<textarea bindinput='remarkChange' placeholder="{{orderDetail.repair.links.remarks}}" disabled='false' style='padding:5px 15px 5px 0;width:250px;height:50px' />
</view>
</view>
<block wx:if="{{isPhoneFix=='false'}}">
Expand Down
27 changes: 25 additions & 2 deletions pages/signMoudle/doSign/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ Page({
}
let sign_type = signTypeIndex == 0 ? "XSBF" : signTypeIndex == 1 ?"WXBY":"SFP";
api.fetch({
url: 'rest/register/doAdd?type=' + sign_type + '&typeName=' + signTypes[signTypeIndex] + '&customer=' + customer +'&createUser='+user.userId,
url: 'rest/register/doAdd',
data: { type: sign_type,
typeName: signTypes[signTypeIndex],
customer: customer,
createUser: user.userId
},
// type=' + sign_type + '&typeName=' + signTypes[signTypeIndex] + '&customer=' + customer +'&createUser='+user.userId,
callback: (err, result) => {
if (result.success) {
that.setData({
Expand All @@ -58,7 +64,24 @@ Page({

lastSubmit:function(){
let that = this;
const { customer, signTypeIndex, signTypes, user, remarks, photoFiles,signId} = that.data;
const { customer, signTypeIndex, signTypes, user, remarks, photoFiles, signId, nowAddress,outAddress} = that.data;

if (nowAddress == ''){
wx.showToast({
title:'请签入之后再提交!',
duration:2000,
icon:'none'
})
return;
}
if(outAddress == ''){
wx.showToast({
title: '请签出之后再提交!',
duration: 2000,
icon: 'none'
})
return;
}
let sign_type = signTypeIndex == 0 ? "XSBF" : signTypeIndex == 1 ? "WXBY" : "SFP";
api.fetch({
url: 'rest/register/doUpdate' ,
Expand Down
8 changes: 4 additions & 4 deletions pages/work/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,23 +540,23 @@ Page({
if (that.data.listType == 'audit') {
if(activeIndex == 0){
this.setData({
listdata: Object.assign(listdata,data.one.noAudite)
listdata: listdata.concat(data.one.noAudite)
})
} else if (activeIndex == 1){
this.setData({
doneListData: Object.assign(doneListData, data.one.hasAudite)
doneListData: doneListData.concat(data.one.hasAudite)
})
}

} else {
if (activeIndex == 0){
console.log()
this.setData({
listdata: Object.assign(listdata, data.one.notDO)
listdata: listdata.concat(data.one.notDO)
})
} else if (activeIndex == 1){
this.setData({
doneListData: Object.assign(doneListData, data.one.done)
doneListData: doneListData.concat(data.one.done)
})
}
}
Expand Down
16 changes: 8 additions & 8 deletions pages/work/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<button class="mini-btn" type="primary" size="mini" bindtap='loadListData_search'>搜索</button>
</view>
<scroll-view class='work-list weui-tab__content' hidden="{{activeIndex != 1}}" scroll-y style="height:{{listHeight}}px" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<block wx:for="{{doneListData}}" wx:for-index="key" wx:for-item="value" wx:key="item">
<view style='text-align:center;font-size:16px;font-weight:bold;padding:5px' data-key='{{key}}' bindtap='setCurrent'>{{key}}</view>
<block wx:for="{{doneListData}}" wx:key="index" wx:for-item="item">
<view style='text-align:center;font-size:16px;font-weight:bold;padding:5px' data-key='{{item.code}}' bindtap='setCurrent'>{{item.code}}</view>

<block wx:if="{{key == currentHandleCode}}">
<block wx:if="{{item.code == currentHandleCode}}">
<span class='flex-row middle-all' style='margin:0 20px;text-align:center;'>
<block wx:for="{{currentFlowList}}" wx:for-index="i">
<span class='flex-row'>
Expand Down Expand Up @@ -180,7 +180,7 @@
</span>
</block>

<block class="item-{{index}}" wx:for="{{value}}" wx:key="index">
<block class="item-{{index}}" wx:for="{{item.dtos}}" wx:key="index">
<view style='margin-top:10px'></view>
<view class="work-item view-shadow" data-item='{{item}}' style='position:relative;' data-navigateUrl='{{item.navigateUrl}}' bindtap="toFlowPage">
<block wx:if="{{item.workStatus == 8}}">
Expand Down Expand Up @@ -280,9 +280,9 @@
</view>
</scroll-view>
<scroll-view class='work-list weui-tab__content' hidden="{{activeIndex != 0}}" scroll-y style="height:{{listHeight}}px" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}}" scroll-top="{{scrollTop}}">
<block wx:for="{{listdata}}" wx:for-index="key" wx:for-item="value" wx:key="index">
<view style='text-align:center;font-size:16px;font-weight:bold;padding:5px' data-key='{{key}}' bindtap='setCurrent'>{{key}}</view>
<block wx:if="{{key == currentHandleCode}}">
<block wx:for="{{listdata}}" wx:key="index" wx:for-item="item">
<view style='text-align:center;font-size:16px;font-weight:bold;padding:5px' data-key='{{item.code}}' bindtap='setCurrent'>{{item.code}}</view>
<block wx:if="{{item.code == currentHandleCode}}">
<span class='flex-row middle-all' style='margin:0 20px;text-align:center;'>
<block wx:for="{{currentFlowList}}" wx:for-index="i">
<span class='flex-row'>
Expand Down Expand Up @@ -434,7 +434,7 @@
</block>
</span>
</block>
<block class="item-{{index}}" wx:for="{{value}}" wx:key="index">
<block class="item-{{index}}" wx:for="{{item.dtos}}" wx:key="index">


<view style='margin-bottom:10px'></view>
Expand Down
13 changes: 10 additions & 3 deletions pages/workOrder/jqbg/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@ Page({
upFilesBtn: true,
upVideoArr:[],
commentFilePaths:[],
remarks:''
remarks:'',
newMachineCode:''

},
newMachineChange: function (e) {
this.setData({
newMachineCode: e.detail.value
})
},

_seeDoneChange: function () {
let that = this;
Expand Down Expand Up @@ -46,7 +52,7 @@ Page({

lastSubmit: function () {
let that = this;
const { files,photoFiles, orderDetail, remarks,date} = that.data
const { files, photoFiles, orderDetail, remarks, date, newMachineCode} = that.data
if (files.length == 0) {
wx.showToast({
title: '请上传图片后再提交~',
Expand All @@ -65,7 +71,7 @@ Page({
stype: 'Change',
id: orderDetail.change.id,
photoFiles: photoFiles,
newMachineNr:orderDetail.change.newMachineNr
newMachineNr: newMachineCode
},
callback: (err, result) => {
if (result.success) {
Expand Down Expand Up @@ -134,6 +140,7 @@ Page({
}
self.setData({
orderDetail: result,
newMachineCode: result.change.newMachineNr,
files: fis,
photoFiles: allFis,
upVideoArr: videoFis
Expand Down
8 changes: 8 additions & 0 deletions pages/workOrder/jqbg/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@
<view class='order-type-icon'>翻</view>
</view>
</view>
<view class="weui-cell weui-cell_input">
<view class="weui-cell__hd">
<view class="weui-label">机器新编号</view>
</view>
<view class="weui-cell__bd">
<input class="weui-input" value='{{newMachineCode}}' bindinput='newMachineChange' placeholder="请输入机器新编号" />
</view>
</view>
<view class="weui-cells weui-cells_after-title">
<view class="weui-cell weui-cell_switch ">
<view class="weui-cell__bd">申请配件</view>
Expand Down
6 changes: 3 additions & 3 deletions utils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ var QQMapWX = require('qqmap-wx-jssdk.js');
var qqmapsdk;
// api 路径
//测试
// const HOST = 'https://test.tianchu.linkitchen.com/CServer';
const HOST = 'https://test.tianchu.linkitchen.com/CServer';
//正式
const HOST = 'https://www.jiexianchina.com';
// const HOST = 'https://www.jiexianchina.com';

// const HOST = 'http://192.168.0.124:8080/CServer';
// const HOST = 'http://192.168.0.104:8080/CServer';
const p_positiveNum = /^\+?[1-9][0-9]*$/;
const Constant={
HOST:HOST
Expand Down

0 comments on commit 9275d90

Please sign in to comment.