update: 更新出货明细
This commit is contained in:
parent
c13e89055d
commit
5262b3e78f
|
@ -7,65 +7,103 @@
|
||||||
@close="handleClose"
|
@close="handleClose"
|
||||||
>
|
>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<u-cell-group :border="false">
|
<view v-if="!isShipment">
|
||||||
<u-cell
|
<u-cell-group :border="false">
|
||||||
v-for="(item, index) in formAttrList"
|
<u-cell
|
||||||
:key="index"
|
v-for="(item, index) in formAttrList"
|
||||||
:title="item.name"
|
:key="index"
|
||||||
:titleStyle="{
|
:title="item.name"
|
||||||
fontSize: '26rpx',
|
:titleStyle="{
|
||||||
color: 'rgba(0, 0, 0, 1)',
|
fontSize: '26rpx',
|
||||||
fontWeight: 'bold',
|
color: 'rgba(0, 0, 0, 1)',
|
||||||
}"
|
fontWeight: 'bold',
|
||||||
isLink
|
}"
|
||||||
@click="item.fn"
|
isLink
|
||||||
:value="getValue(item.name)"
|
@click="item.fn"
|
||||||
></u-cell>
|
:value="getValue(item.name)"
|
||||||
</u-cell-group>
|
></u-cell>
|
||||||
<view class="title">收货单类型</view>
|
</u-cell-group>
|
||||||
<view class="btn-box">
|
<view class="title">收货单类型</view>
|
||||||
<view v-for="(item, index) in splBtnList" :key="index">
|
<view class="btn-box">
|
||||||
<u-button
|
<view v-for="(item, index) in splBtnList" :key="index">
|
||||||
:text="item.name"
|
<u-button
|
||||||
plain
|
:text="item.name"
|
||||||
shape="circle"
|
plain
|
||||||
type="info"
|
shape="circle"
|
||||||
size="small"
|
type="info"
|
||||||
:customStyle="
|
size="small"
|
||||||
item.key === currentSpl
|
:customStyle="
|
||||||
? { border: '1px solid #00dcee', color: '#00dcee' }
|
item.key === currentSpl
|
||||||
: ''
|
? { border: '1px solid #00dcee', color: '#00dcee' }
|
||||||
"
|
: ''
|
||||||
@click="currentSpl = item.key"
|
"
|
||||||
|
@click="currentSpl = item.key"
|
||||||
></u-button>
|
></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="title">收货单价区间</view>
|
||||||
|
<view class="range">
|
||||||
|
<view>
|
||||||
|
<u-input
|
||||||
|
shape="circle"
|
||||||
|
:fontSize="12"
|
||||||
|
:placeholderStyle="{ fontSize: '12px' }"
|
||||||
|
placeholder="最低价"
|
||||||
|
type="number"
|
||||||
|
size="small"
|
||||||
|
v-model="state.minPrice"
|
||||||
|
></u-input
|
||||||
|
></view>
|
||||||
|
-
|
||||||
|
<view>
|
||||||
|
<u-input
|
||||||
|
shape="circle"
|
||||||
|
:fontSize="12"
|
||||||
|
:placeholderStyle="{ fontSize: '12px' }"
|
||||||
|
placeholder="最高价"
|
||||||
|
type="number"
|
||||||
|
size="small"
|
||||||
|
v-model="state.maxPrice"
|
||||||
|
></u-input
|
||||||
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="title">收货单价区间</view>
|
<!-- 出货参数 -->
|
||||||
<view class="range">
|
<view v-else>
|
||||||
<view>
|
<u-cell-group :border="false">
|
||||||
<u-input
|
<u-cell
|
||||||
shape="circle"
|
v-for="(item, index) in formAttrList1"
|
||||||
:fontSize="12"
|
:key="index"
|
||||||
:placeholderStyle="{ fontSize: '12px' }"
|
:title="item.name"
|
||||||
placeholder="最低价"
|
:titleStyle="{
|
||||||
type="number"
|
fontSize: '26rpx',
|
||||||
size="small"
|
color: 'rgba(0, 0, 0, 1)',
|
||||||
v-model="state.minPrice"
|
fontWeight: 'bold',
|
||||||
></u-input
|
}"
|
||||||
></view>
|
isLink
|
||||||
-
|
@click="item.fn"
|
||||||
<view>
|
:value="getValue(item.name)"
|
||||||
<u-input
|
></u-cell>
|
||||||
shape="circle"
|
</u-cell-group>
|
||||||
:fontSize="12"
|
|
||||||
:placeholderStyle="{ fontSize: '12px' }"
|
<view class="title">提货方式</view>
|
||||||
placeholder="最高价"
|
<view class="btn-box">
|
||||||
type="number"
|
<view v-for="(item, index) in deliveryMethodBtnList" :key="index">
|
||||||
size="small"
|
<u-button
|
||||||
v-model="state.maxPrice"
|
:text="item.name"
|
||||||
></u-input
|
plain
|
||||||
></view>
|
shape="circle"
|
||||||
|
type="info"
|
||||||
|
size="small"
|
||||||
|
:customStyle="
|
||||||
|
item.key === deliveryMethod
|
||||||
|
? { border: '1px solid #00dcee', color: '#00dcee' }
|
||||||
|
: ''
|
||||||
|
"
|
||||||
|
@click="deliveryMethod = item.key"
|
||||||
|
></u-button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btn-box1">
|
<view class="btn-box1">
|
||||||
|
@ -76,7 +114,12 @@
|
||||||
shape="circle"
|
shape="circle"
|
||||||
@click="resetState"
|
@click="resetState"
|
||||||
></u-button>
|
></u-button>
|
||||||
<u-button type="primary" text="确定" shape="circle" @click="getFilter()"></u-button>
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
text="确定"
|
||||||
|
shape="circle"
|
||||||
|
@click="getFilter()"
|
||||||
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -90,13 +133,24 @@
|
||||||
:closeOnClickAction="true"
|
:closeOnClickAction="true"
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
</block>
|
</block>
|
||||||
|
<block v-for="(item, index) in formAttrList1" :key="index">
|
||||||
|
<u-action-sheet
|
||||||
|
:actions="contrlModalParams[item.childKey].list"
|
||||||
|
:title="contrlModalParams[item.childKey].title"
|
||||||
|
:show="contrlModalParams[item.childKey].isShow"
|
||||||
|
@select="(v: any) => handleSelect(item.childKey, v)"
|
||||||
|
@close="contrlModalParams[item.childKey].isShow = false"
|
||||||
|
:closeOnClickAction="true"
|
||||||
|
></u-action-sheet>
|
||||||
|
</block>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { GoodsApi, ProfileApi, SupplierApi } from "@/services";
|
import { CustomerApi, GoodsApi, ProfileApi, SupplierApi } from "@/services";
|
||||||
import _ from "underscore";
|
import _ from "underscore";
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
show: boolean;
|
show: boolean;
|
||||||
|
isShipment: boolean
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits(["handleDialog", "handleOk"]);
|
const emit = defineEmits(["handleDialog", "handleOk"]);
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
@ -110,7 +164,7 @@ const state = reactive({
|
||||||
productId: null, // 产品id,
|
productId: null, // 产品id,
|
||||||
productName: "", // 产品名称
|
productName: "", // 产品名称
|
||||||
minPrice: null,
|
minPrice: null,
|
||||||
maxPrice: null
|
maxPrice: null,
|
||||||
});
|
});
|
||||||
const currentSpl = ref<any>(null);
|
const currentSpl = ref<any>(null);
|
||||||
const splBtnList = [
|
const splBtnList = [
|
||||||
|
@ -118,6 +172,12 @@ const splBtnList = [
|
||||||
{ key: false, name: "补单" },
|
{ key: false, name: "补单" },
|
||||||
{ key: true, name: "未补单" },
|
{ key: true, name: "未补单" },
|
||||||
];
|
];
|
||||||
|
const deliveryMethod = ref<any>(null);
|
||||||
|
const deliveryMethodBtnList = [
|
||||||
|
{ key: null, name: "全部" },
|
||||||
|
{ key: 0, name: "送货" },
|
||||||
|
{ key: 1, name: "自提" },
|
||||||
|
];
|
||||||
const formAttrList = reactive<any>([
|
const formAttrList = reactive<any>([
|
||||||
{
|
{
|
||||||
name: "供应商",
|
name: "供应商",
|
||||||
|
@ -145,6 +205,25 @@ const formAttrList = reactive<any>([
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const formAttrList1 = reactive<any>([
|
||||||
|
{
|
||||||
|
name: "客户",
|
||||||
|
childKey: "customer",
|
||||||
|
fn: () => {
|
||||||
|
contrlModalParams.customer.isShow = true;
|
||||||
|
contrlModalParams.customer.title = "客户";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "出货产品",
|
||||||
|
childKey: "shipmentProduct",
|
||||||
|
fn: () => {
|
||||||
|
contrlModalParams.shipmentProduct.isShow = true;
|
||||||
|
contrlModalParams.shipmentProduct.title = "出货产品";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]);
|
||||||
const handleSelect = (key: string, v: any) => {
|
const handleSelect = (key: string, v: any) => {
|
||||||
contrlModalParams[key].isShow = false;
|
contrlModalParams[key].isShow = false;
|
||||||
if (key === "supplier") {
|
if (key === "supplier") {
|
||||||
|
@ -156,6 +235,12 @@ const handleSelect = (key: string, v: any) => {
|
||||||
} else if (key === "user") {
|
} else if (key === "user") {
|
||||||
state.pricingUserName = v.name;
|
state.pricingUserName = v.name;
|
||||||
state.pricingUserId = v.id;
|
state.pricingUserId = v.id;
|
||||||
|
} else if (key === "customer") {
|
||||||
|
state.userName = v.name;
|
||||||
|
state.userId = v.id;
|
||||||
|
} else if (key === "shipmentProduct") {
|
||||||
|
state.productName = v.name;
|
||||||
|
state.productId = v.id;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getValue = (v: string) => {
|
const getValue = (v: string) => {
|
||||||
|
@ -165,6 +250,10 @@ const getValue = (v: string) => {
|
||||||
return state.productName;
|
return state.productName;
|
||||||
} else if (v === "定价人") {
|
} else if (v === "定价人") {
|
||||||
return state.pricingUserName;
|
return state.pricingUserName;
|
||||||
|
} else if (v === "客户") {
|
||||||
|
return state.userName;
|
||||||
|
} else if (v === "出货产品") {
|
||||||
|
return state.productName;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const contrlModalParams = reactive<any>({
|
const contrlModalParams = reactive<any>({
|
||||||
|
@ -183,17 +272,30 @@ const contrlModalParams = reactive<any>({
|
||||||
title: "标题",
|
title: "标题",
|
||||||
list: [],
|
list: [],
|
||||||
},
|
},
|
||||||
|
customer: {
|
||||||
|
isShow: false,
|
||||||
|
title: "标题",
|
||||||
|
list: [],
|
||||||
|
},
|
||||||
|
shipmentProduct: {
|
||||||
|
isShow: false,
|
||||||
|
title: "标题",
|
||||||
|
list: [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
// 定价人
|
||||||
ProfileApi.getUserList({}).then((res: any) => {
|
ProfileApi.getUserList({}).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
contrlModalParams.user.list = res.data;
|
contrlModalParams.user.list = res.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 供应商
|
||||||
SupplierApi.getSupplierUserList({}).then((res: any) => {
|
SupplierApi.getSupplierUserList({}).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
contrlModalParams.supplier.list = res.data;
|
contrlModalParams.supplier.list = res.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 收货产品
|
||||||
GoodsApi.getReceiveProductList().then((res: any) => {
|
GoodsApi.getReceiveProductList().then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
contrlModalParams.product.list = _.map(
|
contrlModalParams.product.list = _.map(
|
||||||
|
@ -204,6 +306,24 @@ GoodsApi.getReceiveProductList().then((res: any) => {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// 客户信息
|
||||||
|
CustomerApi.getCustomUserList({}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
contrlModalParams.customer.list = res.data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 产品信息
|
||||||
|
GoodsApi.getShipmentProductList().then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
contrlModalParams.shipmentProduct.list = _.map(
|
||||||
|
res.data as any,
|
||||||
|
function (item: any) {
|
||||||
|
return { name: item.shmProductsName, ...item };
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// 重置 确定
|
// 重置 确定
|
||||||
const resetState = () => {
|
const resetState = () => {
|
||||||
|
@ -216,17 +336,18 @@ const resetState = () => {
|
||||||
state.minPrice = null;
|
state.minPrice = null;
|
||||||
state.maxPrice = null;
|
state.maxPrice = null;
|
||||||
currentSpl.value = null;
|
currentSpl.value = null;
|
||||||
|
deliveryMethod.value = null
|
||||||
};
|
};
|
||||||
|
|
||||||
const getFilter = () => {
|
const getFilter = () => {
|
||||||
emit("handleOk", {...state, repairFlag: currentSpl.value});
|
emit("handleOk", { ...state, repairFlag: currentSpl.value, deliveryMethod: deliveryMethod.value });
|
||||||
emit("handleDialog", false);
|
emit("handleDialog", false);
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.box {
|
.box {
|
||||||
padding: 60rpx 30rpx;
|
padding: 60rpx 30rpx;
|
||||||
::v-deep .u-cell__value{
|
::v-deep .u-cell__value {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
.title {
|
.title {
|
||||||
|
|
|
@ -130,6 +130,7 @@
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<FilterDialog
|
<FilterDialog
|
||||||
:show="showDialog.showFilter"
|
:show="showDialog.showFilter"
|
||||||
|
:isShipment="false"
|
||||||
@handleOk="handleOk"
|
@handleOk="handleOk"
|
||||||
@handleDialog="(v:boolean) => {handleDialog('showFilter', v)}"
|
@handleDialog="(v:boolean) => {handleDialog('showFilter', v)}"
|
||||||
/>
|
/>
|
||||||
|
@ -418,7 +419,8 @@ onMounted(() => {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin: 30rpx 0rpx 0rpx 0rpx;
|
margin: 30rpx 0rpx 0rpx 30rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
.box + .box {
|
.box + .box {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
|
|
@ -8,76 +8,106 @@
|
||||||
:bgColor="'#fff'"
|
:bgColor="'#fff'"
|
||||||
:borderColor="'rgba(0, 0, 0, 0.1)'"
|
:borderColor="'rgba(0, 0, 0, 0.1)'"
|
||||||
:placeholderColor="'#C1C1C1'"
|
:placeholderColor="'#C1C1C1'"
|
||||||
|
@search="handleSearch()"
|
||||||
></u-search>
|
></u-search>
|
||||||
<view class="btn" @click="handleAdd()"> 创建 </view>
|
<view class="btn" @click="handleAdd()"> 创建 </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter">
|
<view class="filter">
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<view><text>本月</text><u-icon name="arrow-down"></u-icon></view>
|
<view @click="handleDialog('showTime', true)"
|
||||||
|
><text>{{ state.name }}</text
|
||||||
|
><u-icon name="arrow-down"></u-icon
|
||||||
|
></view>
|
||||||
<view @click="state.isShowStatus = true"
|
<view @click="state.isShowStatus = true"
|
||||||
><text>单据状态</text><u-icon name="arrow-down"></u-icon
|
><text>单据状态</text><u-icon name="arrow-down"></u-icon
|
||||||
></view>
|
></view>
|
||||||
<view @click="state.isShowSort = true"
|
<view @click="state.isShowSort = true"
|
||||||
><text>排序</text><u-icon name="arrow-down"></u-icon
|
><text>排序</text><u-icon name="arrow-down"></u-icon
|
||||||
></view>
|
></view>
|
||||||
<view class="btn">筛选</view>
|
<view class="btn" @click="handleDialog('showFilter', true)">筛选</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="time">2024-01-01</view>
|
<view class="time">
|
||||||
|
<view v-if="state.name === '昨日' || state.name === '今日'">{{
|
||||||
|
state.startTime
|
||||||
|
}}</view>
|
||||||
|
<view v-else>{{ state.startTime }} - {{ state.endTime }}</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
<page-view
|
||||||
<view class="base">
|
@loadList="
|
||||||
<view>
|
(v) => {
|
||||||
<view class="no"> 出货单号:{{ item.orderNumber }} </view>
|
getList(v);
|
||||||
<view class="supplier"> {{ item.deviceName || "-" }} </view>
|
}
|
||||||
|
"
|
||||||
|
:noMoreData="pageList.noMoreData"
|
||||||
|
:list="pageList.list"
|
||||||
|
:height="200"
|
||||||
|
:isLoading="pageList.isLoading"
|
||||||
|
>
|
||||||
|
<view class="box" v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
<view class="base">
|
||||||
|
<view>
|
||||||
|
<view class="no"> 出货单号:{{ item.orderNumber }} </view>
|
||||||
|
<view class="supplier"> {{ item.deviceName || "-" }} </view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<text class="btn" @click="handleScenePhoto((item as any).id)"
|
||||||
|
>现场照片</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
|
||||||
<text class="btn" @click="handleScenePhoto((item as any).id)"
|
<view class="name"
|
||||||
>现场照片</text
|
>{{ 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="(cItem, index) in gridList1"
|
||||||
|
:key="index"
|
||||||
|
:style="cItem.isCustomStyle ? 'font-size: 22rpx;color:#999' : ''"
|
||||||
>
|
>
|
||||||
|
<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-else-if="cItem.name === '送货方式'">
|
||||||
|
<text v-if="cItem.name">{{ cItem.name }}:</text
|
||||||
|
><text
|
||||||
|
>{{ cItem.isBefore ? cItem.unit : "" }}
|
||||||
|
<text v-if="item[cItem.enName as string] === DeliveryMethod.Deliver">送货</text>
|
||||||
|
<text v-if="item[cItem.enName as string] === DeliveryMethod.SelfPickup">自提</text>
|
||||||
|
{{ cItem.isBefore ? "" : cItem.unit }}
|
||||||
|
</text>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<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>
|
</view>
|
||||||
|
</page-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="(cItem, index) in gridList1"
|
|
||||||
:key="index"
|
|
||||||
:style="cItem.isCustomStyle ? 'font-size: 22rpx;color:#999' : ''"
|
|
||||||
>
|
|
||||||
<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>
|
</view>
|
||||||
|
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
|
@ -87,6 +117,7 @@
|
||||||
:title="'单据状态'"
|
:title="'单据状态'"
|
||||||
:show="state.isShowStatus"
|
:show="state.isShowStatus"
|
||||||
@select="handleSelectStatus"
|
@select="handleSelectStatus"
|
||||||
|
@close="state.isShowStatus = false"
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
<u-action-sheet
|
<u-action-sheet
|
||||||
:closeOnClickOverlay="true"
|
:closeOnClickOverlay="true"
|
||||||
|
@ -95,12 +126,58 @@
|
||||||
:title="'排序'"
|
:title="'排序'"
|
||||||
:show="state.isShowSort"
|
:show="state.isShowSort"
|
||||||
@select="handleSelectSort"
|
@select="handleSelectSort"
|
||||||
|
@close="state.isShowSort = false"
|
||||||
></u-action-sheet>
|
></u-action-sheet>
|
||||||
|
|
||||||
|
<!-- 时间弹框 -->
|
||||||
|
<TimeDialog
|
||||||
|
ref="timeDialog"
|
||||||
|
:show="showDialog.showTime"
|
||||||
|
@handleDialog="(v:boolean) => {handleDialog('showTime', v)}"
|
||||||
|
@changeTime="changeTime"
|
||||||
|
/>
|
||||||
|
<!-- 筛选 -->
|
||||||
|
<FilterDialog
|
||||||
|
:show="showDialog.showFilter"
|
||||||
|
:isShipment="true"
|
||||||
|
@handleOk="handleOk"
|
||||||
|
@handleDialog="(v:boolean) => {handleDialog('showFilter', v)}"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ShipmentApi } from "@/services";
|
import { ReceiveApi, ShipmentApi } from "@/services";
|
||||||
import { ScaleStatus } from "@/utils/enum";
|
import { DeliveryMethod, ScaleStatus } from "@/utils/enum";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
import {
|
||||||
|
formatDate,
|
||||||
|
getCurrentMonthStartAndEnd,
|
||||||
|
filterNullUndefined,
|
||||||
|
} from "@/utils";
|
||||||
|
import TimeDialog from "./components/TimeDialog.vue";
|
||||||
|
import FilterDialog from "./components/FilterDialog.vue";
|
||||||
|
const showDialog = <
|
||||||
|
{
|
||||||
|
[key: string]: boolean;
|
||||||
|
}
|
||||||
|
>reactive({
|
||||||
|
showTime: false,
|
||||||
|
showFilter: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleDialog = (key: string, v: boolean) => {
|
||||||
|
showDialog[key] = v;
|
||||||
|
};
|
||||||
|
const changeTime = (obj: any) => {
|
||||||
|
state.startTime = obj.startTime;
|
||||||
|
state.endTime = obj.endTime;
|
||||||
|
state.name = obj.name;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
|
startTime: formatDate(getCurrentMonthStartAndEnd().start, "{y}-{m}-{d}"),
|
||||||
|
endTime: formatDate(getCurrentMonthStartAndEnd().end, "{y}-{m}-{d}"),
|
||||||
|
name: "本月",
|
||||||
currentScaleStatus: undefined,
|
currentScaleStatus: undefined,
|
||||||
currentSortName: undefined,
|
currentSortName: undefined,
|
||||||
isShowStatus: false,
|
isShowStatus: false,
|
||||||
|
@ -137,16 +214,19 @@ const state = reactive({
|
||||||
key: "update_time",
|
key: "update_time",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
params: {},
|
||||||
});
|
});
|
||||||
const handleSelectStatus = (v: any) => {
|
const handleSelectStatus = (v: any) => {
|
||||||
state.isShowStatus = false;
|
state.isShowStatus = false;
|
||||||
state.currentScaleStatus = v.key;
|
state.currentScaleStatus = v.key;
|
||||||
getOrderList();
|
resetPageList();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
const handleSelectSort = (v: any) => {
|
const handleSelectSort = (v: any) => {
|
||||||
state.isShowSort = false;
|
state.isShowSort = false;
|
||||||
state.currentSortName = v.key;
|
state.currentSortName = v.key;
|
||||||
getOrderList();
|
resetPageList();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
const keyword = ref("");
|
const keyword = ref("");
|
||||||
|
@ -238,7 +318,7 @@ const gridList1 = reactive([
|
||||||
]);
|
]);
|
||||||
const handleScenePhoto = (id: string) => {
|
const handleScenePhoto = (id: string) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesScenePhoto/index?orderType=1&id=" + id, // 要跳转到的页面路径
|
url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getScaleStatus = (type: number) => {
|
const getScaleStatus = (type: number) => {
|
||||||
|
@ -260,35 +340,73 @@ const handleAdd = () => {
|
||||||
url: "/pagesApp/shipmentSpl", // 要跳转到的页面路径
|
url: "/pagesApp/shipmentSpl", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
interface PageResult<T> {
|
|
||||||
total: number;
|
|
||||||
list: T[];
|
|
||||||
pageNum: number;
|
|
||||||
pageSize: number;
|
|
||||||
}
|
|
||||||
const pageList: PageResult<Order> = reactive({
|
const pageList: PageResult<Order> = reactive({
|
||||||
|
isLoading: false,
|
||||||
|
noMoreData: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
list: [],
|
list: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
});
|
});
|
||||||
const getOrderList = () => {
|
|
||||||
let params: any = { pageNumber: 1, pageSize: 10 };
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleOk = (obj: any) => {
|
||||||
|
state.params = obj;
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleSearch = () => {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
};
|
||||||
|
const getList = (v?: boolean) => {
|
||||||
|
if (v) {
|
||||||
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
|
pageList.pageNum++;
|
||||||
|
} else {
|
||||||
|
pageList.noMoreData = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let params: any = {
|
||||||
|
pageSize: pageList.pageSize,
|
||||||
|
pageNumber: pageList.pageNum,
|
||||||
|
startTime: state.startTime + " 00:00:00",
|
||||||
|
endTime: state.endTime + " 23:59:59",
|
||||||
|
};
|
||||||
if (state.currentScaleStatus !== undefined) {
|
if (state.currentScaleStatus !== undefined) {
|
||||||
params.scaleStatus = state.currentScaleStatus;
|
params.scaleStatus = state.currentScaleStatus;
|
||||||
}
|
}
|
||||||
if (state.currentSortName !== undefined) {
|
if (state.currentSortName !== undefined) {
|
||||||
params.sortName = state.currentSortName;
|
params.sortName = state.currentSortName;
|
||||||
}
|
}
|
||||||
|
if (keyword.value !== undefined) {
|
||||||
ShipmentApi.getOrderPage(params).then((res) => {
|
params.orderNumber = keyword.value;
|
||||||
|
}
|
||||||
|
pageList.isLoading = true;
|
||||||
|
ShipmentApi.getOrderPage({
|
||||||
|
...params,
|
||||||
|
...filterNullUndefined(state.params),
|
||||||
|
}).then((res: any) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
(pageList as any).list = res.data.list;
|
pageList.isLoading = false;
|
||||||
|
(pageList as any).list = (pageList as any).list = pageList.list.concat(
|
||||||
|
res.data.list
|
||||||
|
);
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOrderList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -335,7 +453,7 @@ onMounted(() => {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin: 30rpx 0rpx;
|
margin: 30rpx 0rpx 0rpx 30rpx;
|
||||||
}
|
}
|
||||||
.box + .box {
|
.box + .box {
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
|
|
Loading…
Reference in New Issue