mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化界面显示
This commit is contained in:
parent
dd8810a09e
commit
5a5b472c16
@ -37,7 +37,7 @@
|
||||
vc.on('departmentSelect2', 'clearDepartment', function (_param) {
|
||||
this.departmentSelect2Info = {
|
||||
orgs: [],
|
||||
orgId: '-1',
|
||||
// orgId: '-1',
|
||||
orgName: '',
|
||||
companyId:'',
|
||||
staffId: '',
|
||||
@ -91,7 +91,7 @@
|
||||
//这里是选中触发的事件
|
||||
//evt.params.data 是选中项的信息
|
||||
console.log('select', evt);
|
||||
this.departmentSelect2Info.orgId = evt.params.data.id;
|
||||
// this.departmentSelect2Info.orgId = evt.params.data.id;
|
||||
this.departmentSelect2Info.departmentId = evt.params.data.id;
|
||||
this.departmentSelect2Info.orgName = evt.params.data.text;
|
||||
});
|
||||
@ -100,7 +100,7 @@
|
||||
//这里是取消选中触发的事件
|
||||
//如配置allowClear: true后,触发
|
||||
console.log('unselect', evt);
|
||||
this.departmentSelect2Info.orgId = '-1';
|
||||
// this.departmentSelect2Info.orgId = '-1';
|
||||
this.departmentSelect2Info.orgName = '';
|
||||
|
||||
});
|
||||
|
||||
@ -72,7 +72,7 @@
|
||||
return {
|
||||
name: _term,
|
||||
page: 1,
|
||||
row: 10,
|
||||
row: 50,
|
||||
parentOrgId:this.staffSelect2Info.companyId,
|
||||
departmentOrgId:this.staffSelect2Info.departmentId,
|
||||
communityId: vc.getCurrentCommunity().communityId
|
||||
|
||||
@ -57,7 +57,30 @@
|
||||
<label class="col-sm-2 col-form-label">自定义价格</label>
|
||||
<div class="col-sm-10">
|
||||
<input placeholder='必填,请填写自定义价格' cols="15" class="form-control"
|
||||
v-model="finishRepairInfo.price">价格范围{{finishRepairInfo.outLowPrice}}-{{finishRepairInfo.outHighPrice}}
|
||||
v-model="finishRepairInfo.price" @input="singlePriceChanged()" >价格范围{{finishRepairInfo.outLowPrice}}-{{finishRepairInfo.outHighPrice}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row"
|
||||
v-if="finishRepairInfo.conditions.resId != '' && finishRepairInfo.maintenanceType != '1002'">
|
||||
<label class="col-sm-2 col-form-label">商品数量</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" v-on:click="_useNumDec()">-</button>
|
||||
</span>
|
||||
<input type="text" class="form-control" disabled="disabled" v-model="finishRepairInfo.useNumber" >
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" v-on:click="_useNumInc()">+</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row"
|
||||
v-if="finishRepairInfo.conditions.resId != '' && finishRepairInfo.maintenanceType != '1002'">
|
||||
<label class="col-sm-2 col-form-label">商品总金额</label>
|
||||
<div class="col-sm-10">
|
||||
<input cols="15" class="form-control" disabled="disabled"
|
||||
v-model="finishRepairInfo.totalPrice">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
@ -20,7 +20,11 @@
|
||||
conditions: {
|
||||
goodsType: '',
|
||||
resId: ''
|
||||
}
|
||||
},
|
||||
selectedGoodsInfo: {},
|
||||
useNumber: 1,
|
||||
totalPrice: 0,
|
||||
resId: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -88,6 +92,13 @@
|
||||
errInfo: "商品价格格式错误"
|
||||
},
|
||||
],
|
||||
'finishRepairInfo.useNumber': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "商品数量不能为零"
|
||||
}
|
||||
],
|
||||
'finishRepairInfo.context': [
|
||||
{
|
||||
limit: "required",
|
||||
@ -126,6 +137,10 @@
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
if (vc.component.finishRepairInfo.publicArea == 'T' || vc.component.finishRepairInfo.maintenanceType == '1002'){
|
||||
// 无偿服务 修改商品数量为零
|
||||
vc.component.finishRepairInfo.useNumber = 0;
|
||||
}
|
||||
vc.component.finishRepairInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'ownerRepair.repairFinish',
|
||||
@ -150,9 +165,10 @@
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
//选择商品
|
||||
//选择商品类型
|
||||
_choseGoods: function () {
|
||||
vc.component.finishRepairInfo.conditions.resId = '';
|
||||
vc.component.finishRepairInfo.resId = '';
|
||||
var select = document.getElementById("goods");
|
||||
vc.component.finishRepairInfo.conditions.goodsType = select.value;
|
||||
if (vc.component.finishRepairInfo.conditions.goodsType == null || vc.component.finishRepairInfo.conditions.goodsType == '') {
|
||||
@ -174,10 +190,18 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
//选择价格
|
||||
//选择商品
|
||||
_chosePrice: function () {
|
||||
var _that = this;
|
||||
var select = document.getElementById("goodsPrice");
|
||||
vc.component.finishRepairInfo.conditions.resId = select.value;
|
||||
vc.component.finishRepairInfo.resId = select.value;
|
||||
// 保存选中的商品信息
|
||||
vc.component.finishRepairInfo.resourceStores.forEach((item) => {
|
||||
if(item.resId == select.value){
|
||||
vc.component.finishRepairInfo.selectedGoodsInfo = item;
|
||||
}
|
||||
})
|
||||
if (vc.component.finishRepairInfo.conditions.resId == null || vc.component.finishRepairInfo.conditions.resId == '') {
|
||||
return;
|
||||
}
|
||||
@ -194,6 +218,7 @@
|
||||
} else {
|
||||
vc.component.finishRepairInfo.price = '';
|
||||
}
|
||||
_that._updateTotalPrice();
|
||||
vc.component.finishRepairInfo.outLowPrice = _prices.data[0].outLowPrice;
|
||||
vc.component.finishRepairInfo.outHighPrice = _prices.data[0].outHighPrice;
|
||||
}, function (errInfo, error) {
|
||||
@ -201,6 +226,39 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// 监听价格变化 更新总金额
|
||||
singlePriceChanged: function(){
|
||||
this._updateTotalPrice();
|
||||
},
|
||||
|
||||
// 商品数量减少
|
||||
_useNumDec: function(){
|
||||
if (vc.component.finishRepairInfo.useNumber <= 1){
|
||||
vc.toast("不能再减少了");
|
||||
return;
|
||||
}
|
||||
vc.component.finishRepairInfo.useNumber -= 1;
|
||||
this._updateTotalPrice();
|
||||
},
|
||||
|
||||
// 商品数量增加
|
||||
_useNumInc: function () {
|
||||
var goodsInfo = vc.component.finishRepairInfo.selectedGoodsInfo;
|
||||
if (vc.component.finishRepairInfo.useNumber >= goodsInfo.stock){
|
||||
vc.toast("库存不足");
|
||||
return;
|
||||
}
|
||||
vc.component.finishRepairInfo.useNumber += 1;
|
||||
this._updateTotalPrice();
|
||||
},
|
||||
|
||||
// 更新总金额
|
||||
_updateTotalPrice: function(){
|
||||
let totalPrice = vc.component.finishRepairInfo.useNumber * vc.component.finishRepairInfo.price
|
||||
vc.component.finishRepairInfo.totalPrice = totalPrice.toFixed(2);
|
||||
},
|
||||
|
||||
clearFinishRepairInfo: function () {
|
||||
vc.component.finishRepairInfo = {
|
||||
repairId: '',
|
||||
@ -219,7 +277,11 @@
|
||||
conditions: {
|
||||
goodsType: '',
|
||||
resId: ''
|
||||
}
|
||||
},
|
||||
selectedGoodsInfo: {},
|
||||
useNumber: 1,
|
||||
totalPrice: 0,
|
||||
resId: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,12 +5,9 @@
|
||||
<div class="ibox-title">
|
||||
<h5>工单详情</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_printRepairDetail()">
|
||||
打印
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">
|
||||
返回
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_printRepairDetail()">打印
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">返回</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -25,63 +22,85 @@
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修类型:</label>
|
||||
<label class="col-form-label">报修类型:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.repairTypeName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修人:</label>
|
||||
<label class="col-form-label">报修人:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.repairName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">联系方式:</label>
|
||||
<label class="col-form-label">联系方式:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.tel}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">位置:</label>
|
||||
<label class="col-form-label">位置:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.repairObjName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">预约时间:</label>
|
||||
<label class="col-form-label">预约时间:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.appointmentTime}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">状态:</label>
|
||||
<label class="col-form-label">状态:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.stateName}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修内容:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.context}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label"
|
||||
v-if="ownerRepairDetailInfo.maintenanceType != null && ownerRepairDetailInfo.maintenanceType != ''">维修类型:</label>
|
||||
<label class=""
|
||||
v-if="ownerRepairDetailInfo.maintenanceType == '1001'">有偿服务</label>
|
||||
<label class=""
|
||||
v-if="ownerRepairDetailInfo.maintenanceType == '1002'">无偿服务</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="ownerRepairDetailInfo.maintenanceType == '1001'">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">用料:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.repairMaterials}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">报修内容:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.context}}</label>
|
||||
<label class="col-form-label">费用明细:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.repairFee}}元 (单价*数量)</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="ownerRepairDetailInfo.visitType">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">回访满意度:</label>
|
||||
<label class="col-form-label">回访满意度:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.visitType=='1001'?'满意':'不满意'}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">回访内容:</label>
|
||||
<label class="col-form-label">回访内容:</label>
|
||||
<label class="">{{ownerRepairDetailInfo.visitContext}}</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -92,7 +111,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" v-if="ownerRepairDetailInfo.repairPhotos.length >0">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
@ -105,9 +123,9 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="form-group margin-left"
|
||||
v-for="(item,index) in ownerRepairDetailInfo.repairPhotos">
|
||||
v-for="(item,index) in ownerRepairDetailInfo.repairPhotos">
|
||||
<img style="width: 120px; height: 120px;" v-bind:src="item.url"
|
||||
v-on:click="openFile(item)" />
|
||||
v-on:click="openFile(item)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -127,9 +145,9 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="form-group margin-left"
|
||||
v-for="(item,index) in ownerRepairDetailInfo.beforePhotos">
|
||||
v-for="(item,index) in ownerRepairDetailInfo.beforePhotos">
|
||||
<img style="width: 120px; height: 120px;" v-bind:src="item.url"
|
||||
v-on:click="openFile(item)" />
|
||||
v-on:click="openFile(item)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -149,9 +167,9 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="form-group margin-left"
|
||||
v-for="(item,index) in ownerRepairDetailInfo.afterPhotos">
|
||||
v-for="(item,index) in ownerRepairDetailInfo.afterPhotos">
|
||||
<img style="width: 120px; height: 120px;" v-bind:src="item.url"
|
||||
v-on:click="openFile(item)" />
|
||||
v-on:click="openFile(item)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -165,30 +183,29 @@
|
||||
<div class="ibox-title">
|
||||
<h5>工单流转</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="table table-stripped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">序号</th>
|
||||
<th scope="col" class="text-center">处理人</th>
|
||||
<th scope="col" class="text-center">状态</th>
|
||||
<th scope="col" class="text-center">处理时间</th>
|
||||
<th scope="col" class="text-center">耗时</th>
|
||||
<th scope="col" class="text-center">意见</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="col" class="text-center">序号</th>
|
||||
<th scope="col" class="text-center">处理人</th>
|
||||
<th scope="col" class="text-center">状态</th>
|
||||
<th scope="col" class="text-center">处理时间</th>
|
||||
<th scope="col" class="text-center">耗时</th>
|
||||
<th scope="col" class="text-center">意见</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in ownerRepairDetailInfo.repairUsers">
|
||||
<td scope="row" class="text-center">{{index+1}}</td>
|
||||
<td class="text-center">{{item.staffName}}</td>
|
||||
<td class="text-center">{{item.stateName}}</td>
|
||||
<td class="text-center">{{item.endTime}}</td>
|
||||
<td class="text-center">{{item.duration}}</td>
|
||||
<td class="text-center">{{item.context}}</td>
|
||||
</tr>
|
||||
<tr v-for="(item,index) in ownerRepairDetailInfo.repairUsers">
|
||||
<td scope="row" class="text-center">{{index+1}}</td>
|
||||
<td class="text-center">{{item.staffName}}</td>
|
||||
<td class="text-center">{{item.stateName}}</td>
|
||||
<td class="text-center">{{item.endTime}}</td>
|
||||
<td class="text-center">{{item.duration}}</td>
|
||||
<td class="text-center">{{item.context}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -20,8 +20,11 @@
|
||||
repairPhotos: [],
|
||||
beforePhotos: [],
|
||||
afterPhotos: [],
|
||||
visitType:'',
|
||||
visitContext:''
|
||||
visitType: '',
|
||||
visitContext: '',
|
||||
maintenanceType: '',
|
||||
repairMaterials: '',
|
||||
repairFee: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -125,13 +128,10 @@
|
||||
vc.goBack()
|
||||
},
|
||||
openFile: function (_photo) {
|
||||
console.log("here is _photo")
|
||||
console.log(_photo)
|
||||
vc.emit('viewImage', 'showImage', {
|
||||
url: _photo.url
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增打印功能,跳转打印页面
|
||||
*/
|
||||
|
||||
@ -52,7 +52,15 @@
|
||||
<td>位置:{{printRepairDetailInfo.repairObjName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">报修内容:{{printRepairDetailInfo.context}}</td>
|
||||
<td>报修内容:{{printRepairDetailInfo.context}}</td>
|
||||
<td v-if="printRepairDetailInfo.maintenanceType != null && printRepairDetailInfo.maintenanceType != ''">报修类型:
|
||||
<span v-if="printRepairDetailInfo.maintenanceType == '1001'">有偿服务</span>
|
||||
<span v-else>无偿服务</span>
|
||||
</td>
|
||||
<td v-if="printRepairDetailInfo.maintenanceType == '1001'">报修用料:{{printRepairDetailInfo.repairMaterials}}</td>
|
||||
</tr>
|
||||
<tr v-if="printRepairDetailInfo.maintenanceType == '1001'">
|
||||
<td colspan="3">费用明细:{{printRepairDetailInfo.repairFee}}元 (单价*数量)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
repairObjName: '',
|
||||
context: '',
|
||||
repairUsers: [],
|
||||
maintenanceType: '',
|
||||
repairMaterials: '',
|
||||
repairFee: '',
|
||||
},
|
||||
printFlag:'0',
|
||||
nowTime: ''
|
||||
|
||||
@ -88,7 +88,7 @@
|
||||
<td class="text-center">{{repairPool.appointmentTime}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<div class="btn-group" v-if="!repairPool.visitId">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditOwnerRepairModel(repairPool)">回访
|
||||
</button>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user