| xqd
@@ -37,7 +37,7 @@ Page({
|
|
|
this.init()
|
|
|
},
|
|
|
|
|
|
- onChange: function(e) {
|
|
|
+ onChange: function (e) {
|
|
|
var name = e.currentTarget.dataset.name
|
|
|
this.setData({
|
|
|
[name]: e.detail.value
|
| xqd
@@ -56,10 +56,10 @@ Page({
|
|
|
that.updateDeviceTotal()
|
|
|
api.getByName(that, 'orders/getRole', 'role', {
|
|
|
id: that.data.order ? that.data.order.project_id : ''
|
|
|
- }, function() {
|
|
|
+ }, function () {
|
|
|
that.updateActionType()
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
|
| xqd
@@ -69,9 +69,9 @@ Page({
|
|
|
var order = this.data.order
|
|
|
var changePrice = false
|
|
|
if (order.level == role.level) {
|
|
|
- if(['checking', 'checked'].indexOf(order.status_key) != -1 && role && role.rights && role.rights.rentCheck) actionType = 'check';
|
|
|
- else if(order.status_key == 'checked' && role.key == 'work') actionType = 'pass'
|
|
|
- else if(order.status_key == 'reject' && role.key == 'work') actionType = 're-submit'
|
|
|
+ if (['checking', 'checked'].indexOf(order.status_key) != -1 && role && role.rights && role.rights.rentCheck) actionType = 'check';
|
|
|
+ else if (order.status_key == 'checked' && role.key == 'work') actionType = 'pass'
|
|
|
+ else if (order.status_key == 'reject' && role.key == 'work') actionType = 're-submit'
|
|
|
|
|
|
changePrice = role && role.rights && role.rights.rentMoneyChange
|
|
|
}
|
| xqd
@@ -81,7 +81,7 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- changePrice: function() {
|
|
|
+ changePrice: function () {
|
|
|
var order_device = this.data.order_device
|
|
|
var quantity = this.data.device_quantity
|
|
|
var that = this
|
| xqd
@@ -93,17 +93,24 @@ Page({
|
|
|
},
|
|
|
success: function (res) {
|
|
|
if (res.code == 0) {
|
|
|
+ that.setData({
|
|
|
+ showPrice: false
|
|
|
+ })
|
|
|
that.init()
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- switchShowPrice: function(e) {
|
|
|
- var data = e.currentTarget.dataset
|
|
|
+ closeshow: function () {
|
|
|
+ this.setData({
|
|
|
+ showPrice: false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ switchShowPrice: function (e) {
|
|
|
+ var data = e.currentTarget.dataset
|
|
|
var show = data.show
|
|
|
var item = data.item
|
|
|
- if(show) {
|
|
|
+ if (show) {
|
|
|
this.setData({
|
|
|
order_device: item,
|
|
|
device_quantity: item.quantity
|
| xqd
@@ -130,19 +137,19 @@ Page({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- check: function(e) {
|
|
|
+ check: function (e) {
|
|
|
var type = e.currentTarget.dataset.type
|
|
|
var that = this
|
|
|
var msg = '确认通过审核吗?'
|
|
|
- if(type == 'reject') msg = '确认驳回申请吗?'
|
|
|
- else if(type == 'pass' || type == 're-submit') msg = '确认提交吗?'
|
|
|
+ if (type == 'reject') msg = '确认驳回申请吗?'
|
|
|
+ else if (type == 'pass' || type == 're-submit') msg = '确认提交吗?'
|
|
|
Dialog.confirm({
|
|
|
- title: '提示',
|
|
|
- message: msg,
|
|
|
- })
|
|
|
+ title: '提示',
|
|
|
+ message: msg,
|
|
|
+ })
|
|
|
.then(() => {
|
|
|
that.submitCheck(e)
|
|
|
- }).catch(()=>{
|
|
|
+ }).catch(() => {
|
|
|
Dialog.close()
|
|
|
})
|
|
|
},
|
| xqd
@@ -160,7 +167,7 @@ Page({
|
|
|
if (res.code == 0) {
|
|
|
Dialog.close()
|
|
|
util.success('操作成功')
|
|
|
- setTimeout(function() {
|
|
|
+ setTimeout(function () {
|
|
|
that.init()
|
|
|
}, 1000)
|
|
|
}
|