This commit is contained in:
aihe 2024-05-08 01:20:45 +08:00
parent 6b0befafc8
commit 7788f46652
3 changed files with 19 additions and 8 deletions

View File

@ -30,11 +30,16 @@ export const getRSDStaffList = (data = {})=> {
}
// 货物列表
// 历史-货物列表
export const getGoodsList = (data = {})=> {
return coreRequest(url.getGoodsList, data, {}, "GET")
}
// 热门-货物列表
export const getHotGoodsList = (data = {})=> {
return coreRequest(url.getHotGoodsList, data, {}, "GET")
}
// 月结账户列表
export const getMonthpayAccountList = (data = {})=> {
return coreRequest(url.getMonthpayAccountList, data, {}, "GET")

View File

@ -25,6 +25,7 @@ export default {
getCustomerUserList: `/emis/emisCustomerUser/listSimple`, // 获取网点客户列表
getPickStaffList: `/emis/emisStaff/getStaffList`, // 获取操作、收派 员用户列表
getGoodsList: `/emis/emisGoods/listSimple`, // 获取历史--货物列表
getHotGoodsList: `/emis/emisGoods/listHotGoods`, // 获取热门--货物列表
getMonthpayAccountList: `/emis/emisMonthpayAccount/listSimple`, // 月结账号列表
getDestPositionList: `/emis/emisDestination/listSimple`, // 目的地 列表
getCaculteDestSite: `/emis/emisDestination/getDestSite`, // 自动计算目的地

View File

@ -10,7 +10,7 @@
</view>
<view class="dt-cont">
<view class="dt-block mt-10">
<tpx-tags v-model:value="checkedGoodId" type="single" :list="goodsRes.list.slice(0,6)" @onChange="handleChooseGood"></tpx-tags>
<tpx-tags v-model:value="checkedGoodId" type="single" :list="hotGoods" @onChange="handleChooseGood"></tpx-tags>
</view>
</view>
</view>
@ -165,6 +165,7 @@
<script>
import * as apiService from "@/common/api"
import { transListKeyTitle } from "@/common/util"
export default {
computed: {
dicData() {
@ -179,7 +180,7 @@
handler: function(cval, oval) {
if(cval) {
this.modelInfo = JSON.parse(JSON.stringify(this.value || {}))
this.checkedGoodId = ''
this.initData()
}
}
}
@ -201,14 +202,12 @@
modelInfo: {},
goodsRes: { list: [] },
checkedGoodId: '',
// hotGoods: [
// { title: '604', val: 1 },
// { title: '热门2', val: 2 },
// ]
hotGoods: [
]
}
},
created() {
this.initData()
},
onHide() {
@ -218,6 +217,12 @@
methods: {
getGoodsList: apiService.getGoodsList,
async initData() {
this.checkedGoodId = ''
let res = await apiService.getHotGoodsList({ customerCode: this.modelInfo.customerCode, pageSize: 5 })
debugger
this.hotGoods = transListKeyTitle({ valKey: 'goodsCode',titleKey: 'goodsName', list: [] })
},
handleCloseModal() {
this.$emit('update:show', false)
},