|
|
@@ -19,11 +19,11 @@
|
|
|
<div class="g-order-list__content">
|
|
|
<ul>
|
|
|
<li>
|
|
|
- <span>交料重量</span>
|
|
|
+ <span>{{ getTagName(item.buyorsell) }}重量</span>
|
|
|
<span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <span>实际交料重量</span>
|
|
|
+ <span>实际{{ getTagName(item.buyorsell) }}重量</span>
|
|
|
<span>{{ item.realdeliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
@@ -31,7 +31,7 @@
|
|
|
<span>{{ item.deliverypremium }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <span>交料价格</span>
|
|
|
+ <span>{{ getTagName(item.buyorsell) }}价格</span>
|
|
|
<span>{{ item.deliveryprice }}</span>
|
|
|
</li>
|
|
|
<li>
|
|
|
@@ -67,7 +67,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-
|
|
|
import { shallowRef, defineAsyncComponent, reactive } from 'vue'
|
|
|
import { formatDate, formatDecimal, handleRequestBigNumber } from '@/filters'
|
|
|
import { BuyOrSell } from '@/constants/order'
|
|
|
@@ -80,6 +79,10 @@ import { fullloading, dialog } from '@/utils/vant'
|
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
import { deliveryClientOperator } from '@/services/api/trade'
|
|
|
|
|
|
+const props = defineProps({
|
|
|
+ buyorsell: Number
|
|
|
+})
|
|
|
+
|
|
|
const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
|
|
|
const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
|
|
|
const error = shallowRef(false)
|
|
|
@@ -104,13 +107,19 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliv
|
|
|
if (pageIndex.value === 1) {
|
|
|
dataList.value = []
|
|
|
}
|
|
|
- dataList.value.push(...res.data)
|
|
|
+ const data = res.data.filter((e) => e.buyorsell === props.buyorsell)
|
|
|
+ dataList.value.push(...data)
|
|
|
},
|
|
|
onError: () => {
|
|
|
error.value = true
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+// 获取标签名称
|
|
|
+const getTagName = (value: number) => {
|
|
|
+ return value === BuyOrSell.Buy ? '提料' : '交料'
|
|
|
+}
|
|
|
+
|
|
|
const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {
|
|
|
selectedRow.value = row
|
|
|
openComponent(componentName)
|
|
|
@@ -119,7 +128,7 @@ const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOff
|
|
|
// 交收确认
|
|
|
const deliveryCommit = (item: Model.MyTradeGoodsDeliveryOfflineRsp) => {
|
|
|
dialog({
|
|
|
- message: '是否确认交料?',
|
|
|
+ message: `是否确认${getTagName(item.buyorsell)}?`,
|
|
|
showCancelButton: true,
|
|
|
}).then(() => {
|
|
|
formData.DeliveryOrderID = handleRequestBigNumber(item.deliveryorderid)
|
|
|
@@ -136,5 +145,4 @@ const deliveryCommit = (item: Model.MyTradeGoodsDeliveryOfflineRsp) => {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
</script>
|