This commit is contained in:
Vinjor 2024-10-21 18:10:19 +08:00
parent 107469a4ea
commit e077a99075

View File

@ -125,11 +125,11 @@
<text v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" class="projAmount">{{ item.itemMoney }}</text>
</view>
<view class="projBaseInfo" v-if="loginUser.roleCodes.includes('weixiu') || loginUser.roleCodes.includes('service_advisor')||loginUser.roleCodes.includes('general_inspection')" >
<view>售价{{ item.itemPrice }}</view>
<view>数量{{ item.itemCount }}</view>
<view>单位{{ item.itemUnit}}</view>
<view>折扣{{ item.itemDiscount }}</view>
<view>金额{{ item.itemMoney }}</view>
<view>售价{{ item.itemPrice || "" }}</view>
<view>数量{{ item.itemCount || "" }}</view>
<!-- <view>单位{{ item.itemUnit}}</view>-->
<view>折扣{{ item.itemDiscount || "" }}</view>
<view>金额{{ item.itemMoney || "" }}</view>
</view>
<view class="projEditFoot">
<view class="block1">
@ -137,7 +137,7 @@
<view class="editPeople">
<view class="editForm">
<text class="label">销售人员</text>
<text >{{item.saleName}}
<text >{{item.saleName || ""}}
</text>
</view>
<image v-if="isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@ -155,7 +155,7 @@
<view class="editPeople">
<view class="editForm">
<text class="label">施工人员</text>
<text >{{ item.repairNames }}</text>
<text >{{ item.repairNames || ""}}</text>
</view>
<image v-if="isDetail == '0'" src="/static/icons/edit.png" style="width: 28rpx;height: 28rpx"
@click="editPeople('sg', item)"></image>
@ -183,11 +183,11 @@
<text class="projAmount">{{ item.itemMoney }}</text>
</view>
<view class="projBaseInfo">
<view>售价{{ item.itemPrice }}</view>
<view>数量{{ item.itemCount }}</view>
<view>单位{{ item.itemUnit}}</view>
<view>折扣{{ item.itemDiscount }}</view>
<view>金额{{ item.itemMoney }}</view>
<view>售价{{ item.itemPrice || "" }}</view>
<view>数量{{ item.itemCount || "" }}</view>
<view>单位{{ getItemUnit(item.itemUnit) || ""}}</view>
<view>折扣{{ item.itemDiscount || "" }}</view>
<view>金额{{ item.itemMoney || "" }}</view>
</view>
</view>
</template>
@ -257,7 +257,7 @@ import VNavigationBar from '@/components/VNavigationBar.vue'
import {bus} from "@/utils/eventBus";
import request from '@/utils/request';
import upload from '@/utils/upload'
import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords} from "@/utils/utils";
import {getOrderStatusText,formatDate,formatTimestamp,getDictTextByCodeAndValue,saveTicketsRecords,setStorageWithExpiry,getStorageWithExpiry} from "@/utils/utils";
import {getUserInfo,setJSONData} from '@/utils/auth'
import config from '@/config'
export default {
@ -685,6 +685,40 @@ export default {
url: `/pages-order/choosePeople/choosePeople?type=${type}`
})
},
//
getItemUnit(unitCode){
if(unitCode){
let dictArray = getStorageWithExpiry("repair_unit");
if(null==dictArray || undefined==dictArray){
request({
url: '/admin-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 "未知数据"
}
}
}
},
/**
* 点击配件申请单提醒查看相关配件
* @param wareId