| | |
| | | <template> |
| | | <view> |
| | | <ProductCard /> |
| | | <view class="pt-2"> |
| | | <ProductCard |
| | | :data="cardData" |
| | | :map="{ |
| | | deviceModel: 'deviceModel', |
| | | model: 'model', |
| | | totalAmount: 'totalAmount', |
| | | amount: 'amount', |
| | | unAmount: 'unAmount', |
| | | }" |
| | | /> |
| | | <view class="mx-3"> |
| | | <wd-grid class="rounded-lg" clickable> |
| | | <wd-grid-item |
| | | icon="computer" |
| | | link-type="navigateTo" |
| | | url="/pages/production/wire/report/wire" |
| | | :url="`/pages/production/wire/report/wire?id=${paramsId}`" |
| | | text="报工" |
| | | /> |
| | | <!-- <wd-grid-item |
| | |
| | | <wd-grid-item |
| | | icon="tips" |
| | | link-type="navigateTo" |
| | | url="/pages/production/wire/backman/index" |
| | | :url="`/pages/production/wire/backman/index?id=${paramsId}`" |
| | | text="杂工" |
| | | /> |
| | | <wd-grid-item |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { onLoad } from "@dcloudio/uni-app"; |
| | | import ProductCard from "@/components/product_card/index.vue"; |
| | | import WireApi from "@/api/product/wire"; |
| | | |
| | | const paramsId = ref(); |
| | | const cardData = reactive({ |
| | | deviceModel: undefined, |
| | | model: undefined, |
| | | totalAmount: undefined, |
| | | amount: undefined, |
| | | unAmount: undefined, |
| | | }); |
| | | |
| | | const getDetailData = async (id: string) => { |
| | | const { data } = await WireApi.getWireDetailById({ |
| | | id: id, |
| | | }); |
| | | cardData.deviceModel = data.deviceModel; |
| | | cardData.model = data.model; |
| | | cardData.totalAmount = data.totalAmount; |
| | | cardData.amount = data.amount; |
| | | cardData.unAmount = data.unAmount; |
| | | }; |
| | | |
| | | onLoad((options: any) => { |
| | | paramsId.value = options.id; |
| | | getDetailData(options.id); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |