update: 更新出货明细
This commit is contained in:
parent
c9aaa4f1d4
commit
871f42fda7
|
@ -9,145 +9,259 @@
|
|||
:borderColor="'rgba(0, 0, 0, 0.1)'"
|
||||
:placeholderColor="'#C1C1C1'"
|
||||
></u-search>
|
||||
<view class="btn"> 创建 </view>
|
||||
<view class="btn" @click="handleAdd()"> 创建 </view>
|
||||
</view>
|
||||
<view class="filter">
|
||||
<!-- -->
|
||||
<view><text>本月</text><u-icon name="arrow-down"></u-icon></view>
|
||||
<view><text>单据状态</text><u-icon name="arrow-down"></u-icon></view>
|
||||
<view><text>排序</text><u-icon name="arrow-down"></u-icon></view>
|
||||
<view @click="state.isShowStatus = true"><text>单据状态</text><u-icon name="arrow-down"></u-icon></view>
|
||||
<view @click="state.isShowSort = true"><text>排序</text><u-icon name="arrow-down"></u-icon></view>
|
||||
<view class="btn">筛选</view>
|
||||
</view>
|
||||
|
||||
<view class="time">2024-01-01</view>
|
||||
|
||||
<view class="box" v-for="item in 10" :key="item">
|
||||
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
||||
<view class="base">
|
||||
<view>
|
||||
<view class="no"> 出货单号:SHD20230901132333 </view>
|
||||
<view class="supplier"> 上海奉贤两网融合(大磅) </view>
|
||||
<view class="no"> 出货单号:{{ item.orderNumber }} </view>
|
||||
<view class="supplier"> {{ item.deviceName || "-" }} </view>
|
||||
</view>
|
||||
<view>
|
||||
<text class="btn" @click="handleScenePhoto">现场照片</text>
|
||||
<text class="btn" @click="handleScenePhoto((item as any).id)"
|
||||
>现场照片</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="name">吴小勇 <text>已结算</text></view>
|
||||
<view class="type">轻二</view>
|
||||
<view class="name"
|
||||
>{{ item.userName }}
|
||||
<text>{{ getScaleStatus((item as any).scaleStatus) }}</text>
|
||||
<text v-if="item.repairTime">补单</text>
|
||||
</view>
|
||||
<view class="type">{{ item.productName }}</view>
|
||||
<view class="flex-box">
|
||||
<text>定价人:{{ item.userName }}</text>
|
||||
<text>创建时间:{{ item.createTime }}</text>
|
||||
</view>
|
||||
|
||||
<view class="more">
|
||||
<view
|
||||
v-for="(item, index) in gridList1"
|
||||
v-for="(cItem, index) in gridList1"
|
||||
:key="index"
|
||||
:style="{'width': `${item.name === '创建时间' ? 'max-content' : ''}`, 'font-size': `${item.isCustomStyle ? '22rpx': ''}`, 'color': `${item.isCustomStyle ? '#999': ''}`}"
|
||||
:style="cItem.isCustomStyle ? 'font-size: 22rpx;color:#999' : ''"
|
||||
>
|
||||
<text v-if="item.name">{{ item.name }}:</text
|
||||
><text
|
||||
>{{ item.isBefore ? item.unit : "" }}
|
||||
{{ item.num }}
|
||||
{{ item.isBefore ? "" : item.unit }}
|
||||
<block v-if="cItem.name === '扣杂'">
|
||||
<text v-if="cItem.name">
|
||||
{{ item.buttonType === 0 ? '扣杂' : '扣点' }}:
|
||||
</text
|
||||
><text>
|
||||
{{ item.buttonType === 0 ? item[cItem.enName as string] : item['points'] }}
|
||||
{{ item.buttonType === 0 ? cItem.unit : '%' }}
|
||||
</text>
|
||||
</block>
|
||||
<block v-if="cItem.name !== '扣杂'">
|
||||
<text v-if="cItem.name">{{ cItem.name }}:</text
|
||||
><text
|
||||
>{{ cItem.isBefore ? cItem.unit : "" }}
|
||||
{{ item[cItem.enName as string] }}
|
||||
{{ cItem.isBefore ? "" : cItem.unit }}
|
||||
</text>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="true" :actions="state.statusList" :title="'单据状态'" :show="state.isShowStatus" @select="handleSelectStatus"></u-action-sheet>
|
||||
<u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="true" :actions="state.sortList" :title="'排序'" :show="state.isShowSort" @select="handleSelectSort"></u-action-sheet>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ShipmentApi } from "@/services";
|
||||
import { ScaleStatus } from "@/utils/enum";
|
||||
const state = reactive({
|
||||
currentScaleStatus: undefined,
|
||||
currentSortName: undefined,
|
||||
isShowStatus: false,
|
||||
statusList: [{
|
||||
name: '待出货',
|
||||
key: 0
|
||||
},{
|
||||
name: '待过毛',
|
||||
key: 1
|
||||
},{
|
||||
name: '待审核',
|
||||
key: 2
|
||||
},{
|
||||
name: '已审未付',
|
||||
key: 3
|
||||
},{
|
||||
name: '已审已付',
|
||||
key: 4
|
||||
}],
|
||||
isShowSort: false,
|
||||
sortList: [{
|
||||
name: '按创建时间降序',
|
||||
key: 'create_time'
|
||||
},
|
||||
{
|
||||
name: '按更新时间降序',
|
||||
key: 'update_time'
|
||||
}]
|
||||
})
|
||||
const handleSelectStatus = (v: any) => {
|
||||
state.isShowStatus = false
|
||||
state.currentScaleStatus = v.key
|
||||
getOrderList()
|
||||
}
|
||||
const handleSelectSort = (v: any) => {
|
||||
state.isShowSort = false
|
||||
state.currentSortName = v.key
|
||||
getOrderList()
|
||||
}
|
||||
|
||||
const keyword = ref("");
|
||||
const gridList1 = reactive([
|
||||
{
|
||||
{
|
||||
name: "卡号",
|
||||
num: "123123",
|
||||
enName: "cardNumber",
|
||||
},
|
||||
{},
|
||||
{
|
||||
name: "创建时间",
|
||||
num: "2023-09-01 13:23:33",
|
||||
enName: "createTime",
|
||||
},
|
||||
{},
|
||||
{
|
||||
name: "车牌号",
|
||||
num: "123",
|
||||
enName: "carNumber",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "送货方式",
|
||||
num: "自提",
|
||||
enName: "deliveryMethod",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "毛重",
|
||||
num: "4080.00",
|
||||
enName: "grossWeight",
|
||||
num: 0,
|
||||
unit: "KG",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "皮重",
|
||||
num: "3450.00",
|
||||
enName: "tare",
|
||||
num: 0,
|
||||
unit: "KG",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "净重",
|
||||
num: "640.00",
|
||||
enName: "netWeight",
|
||||
unit: "KG",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "数量",
|
||||
num: "1",
|
||||
enName: "number",
|
||||
unit: "件",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "过毛",
|
||||
num: "2023-09-01 13:23:33",
|
||||
enName: "grossTime",
|
||||
unit: "",
|
||||
isBefore: false,
|
||||
isCustomStyle: true,
|
||||
},
|
||||
{
|
||||
name: "过皮",
|
||||
num: "2023-09-01 13:23:33",
|
||||
enName: "tareTime",
|
||||
unit: "",
|
||||
isBefore: false,
|
||||
isCustomStyle: true,
|
||||
},
|
||||
{
|
||||
name: "结算重量",
|
||||
num: "640.00",
|
||||
enName: "settlementWeight",
|
||||
unit: "KG",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "单价",
|
||||
num: "2.48",
|
||||
name: "结算单价",
|
||||
enName: "unitPrice",
|
||||
unit: "元/千克",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "结算总价",
|
||||
num: "2.48",
|
||||
enName: "estimatePrice",
|
||||
unit: "元",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "实际金额",
|
||||
num: "2.48",
|
||||
enName: "totalPrice",
|
||||
unit: "元",
|
||||
isBefore: false,
|
||||
},
|
||||
{
|
||||
name: "实收金额",
|
||||
num: "2.48",
|
||||
unit: "元",
|
||||
isBefore: false,
|
||||
},
|
||||
|
||||
]);
|
||||
const handleScenePhoto = () => {
|
||||
const handleScenePhoto = (id: string) => {
|
||||
uni.navigateTo({
|
||||
url: "/pagesScenePhoto/index", // 要跳转到的页面路径
|
||||
url: "/pagesScenePhoto/index?orderType=1&id=" + id, // 要跳转到的页面路径
|
||||
});
|
||||
};
|
||||
const getScaleStatus = (type: number) => {
|
||||
if (type === ScaleStatus.ToBeShipment) {
|
||||
return "待出货";
|
||||
} else if (type === ScaleStatus.ToBeGrossWeight) {
|
||||
return "待过毛";
|
||||
} else if (type === ScaleStatus.ToBeShipmentReview) {
|
||||
return "待审核";
|
||||
} else if (type === ScaleStatus.ToBeShipmentPay) {
|
||||
return "待支付";
|
||||
} else if (type === ScaleStatus.ShipmentPaid) {
|
||||
return "已支付";
|
||||
}
|
||||
};
|
||||
|
||||
const handleAdd = () => {
|
||||
uni.navigateTo({
|
||||
url: "/pagesApp/shipmentSpl", // 要跳转到的页面路径
|
||||
});
|
||||
}
|
||||
interface PageResult<T> {
|
||||
total: number;
|
||||
list: T[];
|
||||
pageNum: number;
|
||||
pageSize: number;
|
||||
}
|
||||
const pageList: PageResult<Order> = reactive({
|
||||
total: 0,
|
||||
list: [],
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const getOrderList = () => {
|
||||
let params: any = { pageNumber: 1, pageSize: 10}
|
||||
if (state.currentScaleStatus !== undefined) {
|
||||
params.scaleStatus = state.currentScaleStatus
|
||||
}
|
||||
if (state.currentSortName !== undefined) {
|
||||
params.sortName = state.currentSortName
|
||||
}
|
||||
|
||||
|
||||
ShipmentApi.getOrderPage(params).then((res) => {
|
||||
if (res.code === 200) {
|
||||
(pageList as any).list = res.data.list;
|
||||
}
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getOrderList();
|
||||
});
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.c-card {
|
||||
|
@ -161,7 +275,7 @@ const handleScenePhoto = () => {
|
|||
border-radius: 24rpx;
|
||||
border: 1px solid #00dcee;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #ffffff;
|
||||
margin-left: 50rpx;
|
||||
padding: 6rpx 30rpx;
|
||||
|
@ -174,7 +288,7 @@ const handleScenePhoto = () => {
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
> view {
|
||||
display: inline-block;
|
||||
|
@ -185,13 +299,13 @@ const handleScenePhoto = () => {
|
|||
}
|
||||
}
|
||||
.btn {
|
||||
font-size: 27rpx;
|
||||
font-size: 26rpx;
|
||||
color: #00dcee;
|
||||
}
|
||||
}
|
||||
.time {
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
margin: 30rpx 0rpx;
|
||||
}
|
||||
|
@ -209,12 +323,12 @@ const handleScenePhoto = () => {
|
|||
justify-content: space-between;
|
||||
.no {
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.supplier {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
}
|
||||
.btn {
|
||||
|
@ -229,23 +343,35 @@ const handleScenePhoto = () => {
|
|||
}
|
||||
.name {
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
margin: 15rpx 0rpx;
|
||||
text {
|
||||
background-color: #ffaf75;
|
||||
font-weight: 500;
|
||||
font-size: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
padding: 5rpx 20rpx;
|
||||
margin-left: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
.type {
|
||||
font-weight: 400;
|
||||
font-size: 27rpx;
|
||||
font-size: 26rpx;
|
||||
color: #ec0f3e;
|
||||
margin-bottom: 20rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.flex-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
border-bottom: 1rpx solid rgba(233, 233, 233, 0.76);
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
}
|
||||
.more {
|
||||
|
@ -253,8 +379,9 @@ const handleScenePhoto = () => {
|
|||
grid-template-columns: repeat(2, 1fr);
|
||||
flex: 1;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
padding: 25rpx 0rpx 0rpx 0rpx;
|
||||
> view {
|
||||
line-height: 50rpx;
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
<view class="top-flex-box">
|
||||
<view>
|
||||
<view>
|
||||
<text class="number">出货单号:{{ item.receiptNumber }}</text>
|
||||
<text class="number">出货单号:{{ item.orderNumber }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="name">{{ item.userName }}</text>
|
||||
|
|
|
@ -99,9 +99,9 @@ interface Shipment {
|
|||
points?: string; //扣点
|
||||
buckleMiscellaneous?: string; //扣杂
|
||||
unitPrice?: string; //结算单价
|
||||
estimatePrice?: string; //预估金额
|
||||
totalPrice?: string; //结算金额
|
||||
realIncome?: string; //实际收入
|
||||
estimatePrice?: string; //预估金额 结算总价
|
||||
totalPrice?: string; //结算金额 实际金额
|
||||
realIncome?: string; //实际收入 实际收入 实收金额
|
||||
errorPrice?: string; //误差金额
|
||||
repairTime?: string; //补单时间
|
||||
createTime?: string; //undefined
|
||||
|
|
Loading…
Reference in New Issue