优化1.6 拆分费用bug

This commit is contained in:
wuxw 2024-01-09 17:08:35 +08:00
parent 5cd9a1bde4
commit da2160d6ea
2 changed files with 18 additions and 13 deletions

View File

@ -39,16 +39,15 @@
let oldList = $that.addItemOutInfo.resourceStores;
// 过滤重复选择的商品
resourceStores.forEach((newItem, newIndex) => {
newItem.rsId = '';
newItem.timesId = '';
if(newItem.times && newItem.times.length >0){
newItem.timesId = newItem.times[0].timesId;
newItem.rsId = '';
newItem.timesId = '';
if (newItem.times && newItem.times.length > 0) {
newItem.timesId = newItem.times[0].timesId;
}
oldList.forEach((oldItem) => {
if (oldItem.resId == newItem.resId && newItem.times && newItem.times.length < 2) {
delete resourceStores[newIndex];
}
oldList.forEach((oldItem) => {
if (oldItem.resId == newItem.resId && newItem.times && newItem.times.length < 2) {
delete resourceStores[newIndex];
}
})
})
})
// 合并已有商品和新添加商品
@ -87,8 +86,8 @@
vc.http.apiPost(
'/collection/goodsCollection',
JSON.stringify($that.addItemOutInfo), {
emulateJSON: true
},
emulateJSON: true
},
function (json, res) {
let _json = JSON.parse(json);
if (_json.code == 0) {
@ -107,7 +106,7 @@
},
_loadResourceSuppliers() {
let param = {
params: {page: 1, row: 50}
params: { page: 1, row: 50 }
};
//发送get请求
vc.http.apiGet('/resourceSupplier.listResourceSuppliers',
@ -196,7 +195,7 @@
}
let _data = _staffInfo.data;
vc.copyObject(_data[0], $that.addItemOutInfo.audit);
if(!_data[0].assignee.startsWith('-')){
if (!_data[0].assignee.startsWith('-')) {
$that.addItemOutInfo.audit.staffId = $that.addItemOutInfo.audit.assignee;
}
},

View File

@ -128,6 +128,9 @@
<th class="text-center">
<vc:i18n name="房屋号" namespace="listOwnerCar"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="车牌类型" namespace="listOwnerCar"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="车辆类型" namespace="listOwnerCar"></vc:i18n>
</th>
@ -210,6 +213,9 @@
@click="_viewIotStateRemark(car)">{{car.iotStateName}}</a>)
</span>
</td>
<td class="text-center">
{{car.remark || '-'}}
</td>
<td class="text-center">
<div class="btn-group" v-if="car.state != '3003' ">
<button class="btn-white btn btn-xs"