mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-24 05:46:09 +08:00
1.新增完结工单有偿服务自定义费用
This commit is contained in:
parent
e349afc482
commit
1d69fc35f7
@ -167,7 +167,9 @@ export function finishRepair(_that){
|
|||||||
"resId": _that.goods.resId,
|
"resId": _that.goods.resId,
|
||||||
},
|
},
|
||||||
"resId": _that.goods.resId,
|
"resId": _that.goods.resId,
|
||||||
"useNumber": _that.useNumber
|
"useNumber": _that.useNumber,
|
||||||
|
"isCustom": _that.isCustom,
|
||||||
|
"customGoodsName": _that.customGoodsName,
|
||||||
}
|
}
|
||||||
console.log(_data);
|
console.log(_data);
|
||||||
let _beforeRepairPhotos = _that.beforeRepairPhotos;
|
let _beforeRepairPhotos = _that.beforeRepairPhotos;
|
||||||
@ -191,8 +193,10 @@ export function finishRepair(_that){
|
|||||||
msg = "商品数量不能为零";
|
msg = "商品数量不能为零";
|
||||||
}else if (_data.useNumber > _that.goods.stock){
|
}else if (_data.useNumber > _that.goods.stock){
|
||||||
msg = "库存不足";
|
msg = "库存不足";
|
||||||
}else if (!_data.conditions.resId){
|
}else if (!_data.isCustom && !_data.conditions.resId){
|
||||||
msg = "请选择商品";
|
msg = "请选择商品";
|
||||||
|
}else if (_data.isCustom && !_data.customGoodsName){
|
||||||
|
msg = "请输入商品名";
|
||||||
// }else if (_data.price == '' || !_data.price || parseFloat(_data.price) < parseFloat(_data.outLowPrice) || parseFloat(_data.price) > parseFloat(_data.outHighPrice)){
|
// }else if (_data.price == '' || !_data.price || parseFloat(_data.price) < parseFloat(_data.outLowPrice) || parseFloat(_data.price) > parseFloat(_data.outHighPrice)){
|
||||||
}else if (_data.price == '' || !_data.price){
|
}else if (_data.price == '' || !_data.price){
|
||||||
msg = "请输入有效金额";
|
msg = "请输入有效金额";
|
||||||
|
|||||||
@ -34,6 +34,7 @@
|
|||||||
<button class="cu-btn sm line-gray" @click="repairDetail(item)">详情</button>
|
<button class="cu-btn sm line-gray" @click="repairDetail(item)">详情</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="load-more" @click="_loadMyModify()">加载更多</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<no-data-page></no-data-page>
|
<no-data-page></no-data-page>
|
||||||
@ -50,7 +51,8 @@
|
|||||||
myOrders: [],
|
myOrders: [],
|
||||||
orders: [],
|
orders: [],
|
||||||
storeId: '',
|
storeId: '',
|
||||||
noData: false
|
noData: false,
|
||||||
|
page: 1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -70,7 +72,7 @@
|
|||||||
let _userInfo = this.java110Context.getUserInfo();
|
let _userInfo = this.java110Context.getUserInfo();
|
||||||
let storeId = _userInfo.storeId;
|
let storeId = _userInfo.storeId;
|
||||||
let _objData = {
|
let _objData = {
|
||||||
page: 1,
|
page: this.page,
|
||||||
row: 15,
|
row: 15,
|
||||||
userId: _userInfo.userId,
|
userId: _userInfo.userId,
|
||||||
communityId: _that.java110Context.getCurrentCommunity().communityId
|
communityId: _that.java110Context.getCurrentCommunity().communityId
|
||||||
@ -82,7 +84,6 @@
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
data: _objData, //动态数据
|
data: _objData, //动态数据
|
||||||
success: function(res) {
|
success: function(res) {
|
||||||
console.log("请求返回信息:", res);
|
|
||||||
let _json = res.data;
|
let _json = res.data;
|
||||||
if (_json.code != 0) {
|
if (_json.code != 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -91,19 +92,24 @@
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(_json.data.length <= 0){
|
||||||
|
uni.showToast({
|
||||||
|
title: '已全部加载'
|
||||||
|
})
|
||||||
|
return;
|
||||||
|
}
|
||||||
let _data = _json.data;
|
let _data = _json.data;
|
||||||
_that.myOrders = _data;
|
_data.forEach(function(item) {
|
||||||
|
let dateStr = item.appointmentTime;
|
||||||
|
let _date = new Date(dateStr.replace(/-/g, "/"));
|
||||||
|
item.appointmentTime = (_date.getMonth() + 1) + '-' + _date.getDate();
|
||||||
|
});
|
||||||
|
_that.myOrders = _that.myOrders.concat(_data);
|
||||||
|
_that.page ++;
|
||||||
if (_that.myOrders.length < 1) {
|
if (_that.myOrders.length < 1) {
|
||||||
_that.noData = true;
|
_that.noData = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_that.myOrders.forEach(function(item) {
|
|
||||||
let dateStr = item.appointmentTime;
|
|
||||||
console.log(dateStr);
|
|
||||||
let _date = new Date(dateStr.replace(/-/g, "/"));
|
|
||||||
item.appointmentTime = (_date.getMonth() + 1) + '-' + _date.getDate();
|
|
||||||
});
|
|
||||||
// _that.orders = _data.ownerRepairs;
|
|
||||||
},
|
},
|
||||||
fail: function(e) {
|
fail: function(e) {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
|||||||
@ -42,12 +42,18 @@
|
|||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="goodsIndex!=0">
|
<view v-if="goodsIndex!=0">
|
||||||
|
<view class="cu-form-group margin-top" v-if="isCustom">
|
||||||
|
<view class="title">商品名</view>
|
||||||
|
<input v-model="customGoodsName" placeholder="请输入商品名"></input>
|
||||||
|
</view>
|
||||||
<view class="cu-form-group margin-top">
|
<view class="cu-form-group margin-top">
|
||||||
<view class="title">单价</view>
|
<view class="title">单价</view>
|
||||||
<input v-model="singlePrice" @input="goodsSinglePriceChange" :disabled="disabledPrice" placeholder="请输入单价"></input>
|
<input v-model="singlePrice" @input="goodsSinglePriceChange" :disabled="disabledPrice" placeholder="请输入单价"></input>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-right text-grey" v-if="goods.outHighPrice == goods.outLowPrice">价格:{{goods.outLowPrice}}</view>
|
<view v-if="!isCustom">
|
||||||
<view class="text-right text-grey" v-else>价格范围{{goods.outLowPrice}}-{{goods.outHighPrice}}</view>
|
<view class="text-right text-grey" v-if="goods.outHighPrice == goods.outLowPrice">价格:{{goods.outLowPrice}}</view>
|
||||||
|
<view class="text-right text-grey" v-else>价格范围{{goods.outLowPrice}}-{{goods.outHighPrice}}</view>
|
||||||
|
</view>
|
||||||
<view class="cu-form-group margin-top">
|
<view class="cu-form-group margin-top">
|
||||||
<view class="title">数量</view>
|
<view class="title">数量</view>
|
||||||
<!-- <input v-model="useNumber" @input="goodsNumChange" placeholder="请输入数量"></input> -->
|
<!-- <input v-model="useNumber" @input="goodsNumChange" placeholder="请输入数量"></input> -->
|
||||||
@ -216,6 +222,8 @@
|
|||||||
"outLowPrice": "",
|
"outLowPrice": "",
|
||||||
"outHighPrice": "",
|
"outHighPrice": "",
|
||||||
},
|
},
|
||||||
|
isCustom: false,
|
||||||
|
customGoodsName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -298,6 +306,10 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_that.goodsCloums = _that.goodsCloums.concat(_data);
|
_that.goodsCloums = _that.goodsCloums.concat(_data);
|
||||||
|
// 如果是“其他类” 追加 “自定义” 选项
|
||||||
|
if(_that.goodsTypeCloums[_that.goodsTypeIndex].statusCd == '1003'){
|
||||||
|
_that.goodsCloums = _that.goodsCloums.concat([{resName: '自定义'}]);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -339,6 +351,14 @@
|
|||||||
this.goods = ''
|
this.goods = ''
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 自定义商品
|
||||||
|
if(this.goodsCloums[this.goodsIndex].resName == "自定义"){
|
||||||
|
this.goods = ''
|
||||||
|
this.isCustom = true;
|
||||||
|
return;
|
||||||
|
}else{
|
||||||
|
this.isCustom = false;
|
||||||
|
}
|
||||||
let selected = this.goodsCloums[this.goodsIndex] //获取选中的数组
|
let selected = this.goodsCloums[this.goodsIndex] //获取选中的数组
|
||||||
this.goods = selected
|
this.goods = selected
|
||||||
if(selected.outLowPrice == selected.outHighPrice){
|
if(selected.outLowPrice == selected.outHighPrice){
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user