This commit is contained in:
Vinjor 2024-10-25 18:51:49 +08:00
parent ac6dd47b06
commit 76a50f60b1

View File

@ -114,7 +114,6 @@
<view class="projBaseInfo" >
<view>售价{{ item.itemPrice || "" }}</view>
<view>数量{{ item.itemCount || "" }}</view>
<!-- <view>单位{{ getItemUnit(item.itemUnit) || "" }}</view>-->
<view>折扣{{ item.itemDiscount || "" }}</view>
<view>金额{{ item.itemMoney || "" }}</view>
</view>
@ -159,7 +158,7 @@
<view class="projBaseInfo">
<view>售价{{ item.itemPrice || "" }}</view>
<view>数量{{ item.itemCount || "" }}</view>
<view>单位{{ getItemUnit(item.itemUnit) || "" }}</view>
<view>单位{{ item.itemUnit || "" }}</view>
<view>折扣{{ item.itemDiscount || "" }}</view>
<view>金额{{ item.itemMoney || "" }}</view>
</view>
@ -261,6 +260,7 @@
item.itemList = canReadImg
})
this.ticketInfo = resultObj
console.log(this.ticketInfo,"this.ticketInfo")
},
getTicketsInfo(){
request({
@ -292,44 +292,11 @@
} else {
resultObj.birthday = '未知'
}
console.log(resultObj,"resultObj")
this.buildRecords(resultObj)
})
}
},
//
getItemUnit(unitCode){
if(unitCode){
let dictArray = getStorageWithExpiry("repair_unit");
if(null==dictArray || undefined==dictArray){
request({
url: '/app-api/system/dict-data/type',
method: 'get',
tenantIdFlag:false,
params:{type:"repair_unit"}
}).then((res) => {
console.log(res)
if (res.code == 200) {
setStorageWithExpiry("repair_unit",res.data,3600)
let dictObj = dictArray.find(dict => dict.value == unitCode)
console.log(dictObj, "dictObj")
if (dictObj) {
return dictObj.label
} else {
return "未知数据"
}
}
})
}else{
let dictObj = dictArray.find(dict => dict.value == unitCode)
console.log(dictObj, "dictObj")
if (dictObj) {
return dictObj.label
} else {
return "未知数据"
}
}
}
}
}
</script>