update: 更新收货入库
This commit is contained in:
parent
970f6ee148
commit
d9d0024c73
|
@ -3,19 +3,26 @@
|
||||||
:scroll-y="true"
|
:scroll-y="true"
|
||||||
class="scroll-view-custom"
|
class="scroll-view-custom"
|
||||||
@scrolltolower="loadMore"
|
@scrolltolower="loadMore"
|
||||||
:style="{ 'max-height': clientHeight + 'px' }"
|
:style="{ height: clientHeight + 'px' }"
|
||||||
>
|
>
|
||||||
<slot> </slot>
|
<slot> </slot>
|
||||||
<!-- 加载更多提示 -->
|
<!-- 加载更多提示 -->
|
||||||
<view v-if="noMoreData || isLoading" class="no-more-data-text">
|
<view
|
||||||
|
v-if="noMoreData || isLoading"
|
||||||
|
class="no-more-data-text"
|
||||||
|
style="padding: 20rpx"
|
||||||
|
>
|
||||||
<u-loadmore
|
<u-loadmore
|
||||||
:status="isLoading ? 'loading' :'nomore'"
|
:status="isLoading ? 'loading' : 'nomore'"
|
||||||
:line="true"
|
:line="true"
|
||||||
:fontSize="12"
|
:fontSize="12"
|
||||||
:marginTop="30"
|
:marginTop="30"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="!isLoading && list.length === 0" style="justify-content: center">
|
<view
|
||||||
|
v-if="!isLoading && list.length === 0"
|
||||||
|
style="justify-content: center; padding: 20rpx"
|
||||||
|
>
|
||||||
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||||||
</u-empty>
|
</u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
@ -28,7 +35,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
noMoreData: boolean;
|
noMoreData: boolean;
|
||||||
isLoading: boolean
|
isLoading: boolean;
|
||||||
list: any;
|
list: any;
|
||||||
height: number;
|
height: number;
|
||||||
}>(),
|
}>(),
|
||||||
|
@ -44,6 +51,7 @@ const emit = defineEmits(["loadList"]);
|
||||||
const clientHeight = ref(500);
|
const clientHeight = ref(500);
|
||||||
|
|
||||||
const loadMore = () => {
|
const loadMore = () => {
|
||||||
|
console.log("**** 加载更多");
|
||||||
if (props.noMoreData) return; // 如果没有更多数据,直接返回
|
if (props.noMoreData) return; // 如果没有更多数据,直接返回
|
||||||
emit("loadList", true);
|
emit("loadList", true);
|
||||||
};
|
};
|
||||||
|
@ -68,6 +76,15 @@ const getClineHeight = () => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.height,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
getClineHeight();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
// ,{ deep: true, immediate:true}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// #ifdef APP-PLUS || MP-WEIXIN
|
// #ifdef APP-PLUS || MP-WEIXIN
|
||||||
getClineHeight();
|
getClineHeight();
|
||||||
|
|
|
@ -1,19 +1,20 @@
|
||||||
// 不同的环境变量配置
|
// 不同的环境变量配置
|
||||||
const development = {
|
const development = {
|
||||||
// VITE_APP_BASE_URL: 'http://47.100.31.83:8081',
|
// VITE_APP_BASE_URL: 'http://47.100.31.83:8081',
|
||||||
VITE_APP_BASE_URL: 'http://47.100.31.83:8081',
|
// VITE_APP_BASE_URL: 'https://47.100.31.83:8081',
|
||||||
|
// appid: '',
|
||||||
appid: '',
|
VITE_APP_BASE_URL: 'https://ifanda.52zaisheng.cn/prod',
|
||||||
|
appid: 'wx9251d74fe0e87028',
|
||||||
}
|
}
|
||||||
|
|
||||||
const test = {
|
const test = {
|
||||||
VITE_APP_BASE_URL: 'http://47.100.31.83:8081',
|
VITE_APP_BASE_URL: 'https://47.100.31.83:8081',
|
||||||
appid: 'wxd5xxxxee0fce1c81',
|
appid: 'wxd5xxxxee0fce1c81',
|
||||||
}
|
}
|
||||||
|
|
||||||
const production = {
|
const production = {
|
||||||
VITE_APP_BASE_URL: 'http://124.70.167.140:8081',
|
VITE_APP_BASE_URL: 'https://ifanda.52zaisheng.cn/prod',
|
||||||
appid: 'wx3xxxx1ce403cab3',
|
appid: 'wx9251d74fe0e87028',
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -113,7 +113,7 @@ const gridList1 = reactive([
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "作废人",
|
name: "作废人",
|
||||||
enName: "updateUserName",
|
enName: "updateName",
|
||||||
unit: "",
|
unit: "",
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
isCustomStyle: true,
|
isCustomStyle: true,
|
||||||
|
|
|
@ -391,12 +391,13 @@ const startSave = () => {
|
||||||
PictureApi.addListAnnex({ annexPos: res.filter((item) => item) }).then(
|
PictureApi.addListAnnex({ annexPos: res.filter((item) => item) }).then(
|
||||||
(res1) => {
|
(res1) => {
|
||||||
if (res1.code === 200) {
|
if (res1.code === 200) {
|
||||||
updateOrder()
|
console.log("*** 资源文件更新成功");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
updateOrder();
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateOrder = () => {
|
const updateOrder = () => {
|
||||||
|
@ -427,20 +428,28 @@ const updateOrder = () => {
|
||||||
ReceiveApi.updateOne({ ...model1.order }).then((res) => {
|
ReceiveApi.updateOne({ ...model1.order }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
// 定价后 若是零皮-》跳转到【付款审核】 有皮重->【待过皮重】
|
// 定价后 若是零皮-》跳转到【付款审核】 有皮重->【待过皮重】
|
||||||
uni.showToast({
|
// 当上一页为审核页
|
||||||
title: "定价成功",
|
if (prePage.value === "review") {
|
||||||
icon: "success",
|
uni.redirectTo({
|
||||||
});
|
url:
|
||||||
// 0:有皮重 1:零皮重
|
"/pagesReceive/review/index?id=" +
|
||||||
uni.redirectTo({
|
model1.order.id +
|
||||||
url: "/pagesHome/index", // 要跳转到的页面路径
|
`&scaleStatus=` +
|
||||||
});
|
model1.order.scaleStatus, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 0:有皮重 1:零皮重
|
||||||
|
uni.redirectTo({
|
||||||
|
url: "/pagesHome/index", // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const prePage = ref("");
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
model1.order.id = parseInt((option as any).id);
|
model1.order.id = parseInt((option as any).id);
|
||||||
|
prePage.value = (option as any).prePage;
|
||||||
if (model1.order.id) {
|
if (model1.order.id) {
|
||||||
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
|
ReceiveApi.getDetailById({ id: model1.order.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
|
@ -28,79 +28,109 @@
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<block v-for="(item, index) in pageList.list" :key="index">
|
<page-view
|
||||||
<view class="c-layout">
|
@loadList="
|
||||||
<view
|
(v) => {
|
||||||
><checkbox
|
getList(v);
|
||||||
value="cb"
|
}
|
||||||
:color="'#00D2E3'"
|
"
|
||||||
:checked="state.checkMap[(item.id as number)]"
|
:noMoreData="pageList.noMoreData"
|
||||||
style="transform: scale(0.5)"
|
:list="pageList.list"
|
||||||
/></view>
|
:height="ScaleStatus.Paid === currentTab ? 160 : 240 "
|
||||||
<view class="inner-box">
|
:isLoading="pageList.isLoading"
|
||||||
<view class="top-flex-box">
|
>
|
||||||
<view>
|
<block v-for="(item, index) in pageList.list" :key="index">
|
||||||
|
<view class="c-layout">
|
||||||
|
<view style="min-width: 20px;">
|
||||||
|
<checkbox
|
||||||
|
v-if="
|
||||||
|
ScaleStatus.ToBeReview === currentTab ||
|
||||||
|
ScaleStatus.ToBePay === currentTab
|
||||||
|
"
|
||||||
|
value="cb"
|
||||||
|
:color="'#00D2E3'"
|
||||||
|
:checked="item.isChecked"
|
||||||
|
style="transform: scale(0.5)"
|
||||||
|
@click="item.isChecked = !item.isChecked"
|
||||||
|
/></view>
|
||||||
|
<view class="inner-box">
|
||||||
|
<view class="top-flex-box">
|
||||||
<view>
|
<view>
|
||||||
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
<view>
|
||||||
</view>
|
<text class="number">收货单号:{{ item.receiptNumber }}</text>
|
||||||
<view>
|
</view>
|
||||||
<text class="name">{{ item.userName }}</text>
|
<view>
|
||||||
|
<text class="name">{{ item.userName }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="bottom-flex-box">
|
||||||
<view class="bottom-flex-box">
|
|
||||||
<view>
|
|
||||||
<view>
|
<view>
|
||||||
<text class="desc"
|
<view>
|
||||||
>过磅总净重:{{ item.netWeight || 0 }}KG</text
|
<text class="desc"
|
||||||
>
|
>过磅总净重:{{ item.netWeight || 0 }}KG</text
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
<view class="flex-box">
|
||||||
|
<text>货款金额:{{ item.balanceTotalPrice || 0 }}元</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box">
|
<view>
|
||||||
<text>货款金额:{{ item.totalPrice || 0 }}元</text>
|
<text class="btn">
|
||||||
|
<text
|
||||||
|
v-if="currentTab === 2"
|
||||||
|
@click="handleReview(item.id as number, 2, '去审核')"
|
||||||
|
>去审核</text
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
v-if="currentTab === 3"
|
||||||
|
@click="handleReview(item.id as number, 3, '去支付')"
|
||||||
|
>去支付</text
|
||||||
|
>
|
||||||
|
<text
|
||||||
|
v-if="currentTab === 4"
|
||||||
|
@click="handleReview(item.id as number, 4, '查看详情')"
|
||||||
|
>查看</text
|
||||||
|
>
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
|
||||||
<text class="btn">
|
|
||||||
<text
|
|
||||||
v-if="currentTab === 2"
|
|
||||||
@click="handleReview(item.id as number, 2)"
|
|
||||||
>去审核</text
|
|
||||||
>
|
|
||||||
<text v-if="currentTab === 3" @click="handleReview(item.id as number, 3)">去支付</text>
|
|
||||||
<text v-if="currentTab === 4" @click="handleReview(item.id as number, 4)">查看</text>
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<u-gap
|
||||||
<u-gap
|
height="10"
|
||||||
height="10"
|
bgColor="#f8f8f8"
|
||||||
bgColor="#f8f8f8"
|
v-if="index < pageList.list.length - 1"
|
||||||
v-if="index < pageList.list.length - 1"
|
></u-gap>
|
||||||
></u-gap>
|
</block>
|
||||||
</block>
|
</page-view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn-box" v-if="(currentTab === 2 || currentTab === 3) && pageList.list.length > 0">
|
<view
|
||||||
|
class="btn-box"
|
||||||
|
v-if="(currentTab === 2 || currentTab === 3) && pageList.list.length > 0"
|
||||||
|
>
|
||||||
<u-button
|
<u-button
|
||||||
text="全选/取消"
|
text="全选/取消"
|
||||||
color="#fff"
|
color="#fff"
|
||||||
:customStyle="{ color: '#00DCEE', border: '1px solid #00DCEE' }"
|
:customStyle="{ color: '#00DCEE', border: '1px solid #00DCEE' }"
|
||||||
@click="handleSelect"
|
@click="handleSelect"
|
||||||
></u-button>
|
></u-button>
|
||||||
<u-button type="primary" :text="`${currentTab === 2 ? '批量审核' : '批量支付'}`"></u-button>
|
<u-button
|
||||||
|
type="primary"
|
||||||
|
:text="`${currentTab === 2 ? '批量审核' : '批量支付'}`"
|
||||||
|
@click="handleReviewOrPay(currentTab)"
|
||||||
|
></u-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ReceiveApi } from "@/services/index";
|
import { ReceiveApi } from "@/services/index";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import PageView from "@/components/PageView/index.vue";
|
||||||
|
import { ScaleStatus } from "@/utils/enum";
|
||||||
// scaleStatus
|
// scaleStatus
|
||||||
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,
|
||||||
|
@ -111,7 +141,6 @@ const isShowSearch = ref(false);
|
||||||
const state = reactive<{
|
const state = reactive<{
|
||||||
[attrName: string]: any;
|
[attrName: string]: any;
|
||||||
}>({
|
}>({
|
||||||
checkMap: {},
|
|
||||||
isAll: false,
|
isAll: false,
|
||||||
});
|
});
|
||||||
const tabList = reactive([
|
const tabList = reactive([
|
||||||
|
@ -128,40 +157,87 @@ const tabList = reactive([
|
||||||
key: 4,
|
key: 4,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const resetPageList = () => {
|
||||||
|
pageList.noMoreData = false;
|
||||||
|
pageList.total = 0;
|
||||||
|
pageList.list = [];
|
||||||
|
pageList.pageNum = 1;
|
||||||
|
pageList.pageSize = 10;
|
||||||
|
};
|
||||||
const currentTab = ref(2);
|
const currentTab = ref(2);
|
||||||
const handleTab = (item: any) => {
|
const handleTab = (item: any) => {
|
||||||
currentTab.value = item.key;
|
currentTab.value = item.key;
|
||||||
getOrderList();
|
resetPageList();
|
||||||
|
getList();
|
||||||
};
|
};
|
||||||
const handleReview = (id: number, scaleStatus: number) => {
|
const handleReview = (id: number, scaleStatus: number, title: string) => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesReceive/review/index?id=" + id + `&scaleStatus=`+ scaleStatus, // 要跳转到的页面路径
|
url:
|
||||||
|
"/pagesReceive/review/index?id=" +
|
||||||
|
id +
|
||||||
|
`&scaleStatus=` +
|
||||||
|
scaleStatus +
|
||||||
|
`&title=${title}`, // 要跳转到的页面路径
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const handleReviewOrPay = (status: number) => {
|
||||||
|
// 批量审核
|
||||||
|
if (ScaleStatus.ToBeReview === status) {
|
||||||
|
updateStatus(ScaleStatus.ToBePay);
|
||||||
|
} else if (ScaleStatus.ToBePay === status) {
|
||||||
|
// 批量支付
|
||||||
|
updateStatus(ScaleStatus.Paid);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const updateStatus = (status: number) => {
|
||||||
|
const list = pageList.list
|
||||||
|
.filter((item) => item.isChecked)
|
||||||
|
.map((item) => {
|
||||||
|
return { ...item, scaleStatus: status };
|
||||||
|
});
|
||||||
|
ReceiveApi.updateOrderIn({ orderInPos: list }).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
resetPageList();
|
||||||
|
getList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const handleSelect = () => {
|
const handleSelect = () => {
|
||||||
state.isAll = !state.isAll;
|
state.isAll = !state.isAll;
|
||||||
Object.keys(state.checkMap).forEach((item) => {
|
console.log(state.isAll);
|
||||||
state.checkMap[item] = state.isAll;
|
pageList.list = pageList.list.map((item) => {
|
||||||
|
return { ...item, isChecked: state.isAll };
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const getOrderList = () => {
|
const getList = (v?: boolean) => {
|
||||||
ReceiveApi.getOrderPage({ pageNumber: 1, pageSize: 10, scaleStatus: currentTab.value }).then(
|
if (v) {
|
||||||
(res) => {
|
if (Math.ceil(pageList.total / pageList.pageSize) > pageList.pageNum) {
|
||||||
if (res.code === 200) {
|
pageList.pageNum++;
|
||||||
(pageList as any).list = res.data.list;
|
} else {
|
||||||
(res.data.list as any).forEach((item: any) => {
|
pageList.noMoreData = true;
|
||||||
state.checkMap[parseInt(item.id)] = false;
|
return;
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
ReceiveApi.getOrderPage({
|
||||||
|
pageSize: pageList.pageSize,
|
||||||
|
pageNumber: pageList.pageNum,
|
||||||
|
scaleStatus: currentTab.value,
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
(pageList as any).list = (res.data.list as any).map((item: any) => {
|
||||||
|
return { ...item, isChecked: false };
|
||||||
|
});
|
||||||
|
pageList.total = (res.data as any).total;
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getOrderList();
|
getList();
|
||||||
});
|
});
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
currentTab.value = parseInt((option as any).scaleStatus);
|
currentTab.value = parseInt((option as any).scaleStatus);
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.search {
|
.search {
|
||||||
|
|
|
@ -95,12 +95,12 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
deleteId.value = id;
|
deleteId.value = id;
|
||||||
};
|
};
|
||||||
const handleScenePhoto = (imagesId: number) => {
|
const handleScenePhoto = (imagesId: number) => {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: `/pagesScenePhoto/index?orderType=1&id=${imagesId}&imagesType=1`, // 要跳转到的页面路径
|
url: `/pagesScenePhoto/index?orderType=1&id=${imagesId}&imagesType=1`, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const pricingDetail = (id: number) => {
|
const pricingDetail = (id: number) => {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesReceive/form/pricingForm?id=" + id, // 要跳转到的页面路径
|
url: "/pagesReceive/form/pricingForm?id=" + id, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
plain
|
plain
|
||||||
shape="circle"
|
shape="circle"
|
||||||
:bgColor="'rgba(237, 254, 255, 1)'"
|
:bgColor="'rgba(237, 254, 255, 1)'"
|
||||||
@click="handleScenePhoto(state.order.imagesId as number)"
|
@click="handleScenePhoto(state.order.id)"
|
||||||
></u-tag
|
></u-tag
|
||||||
></view>
|
></view>
|
||||||
<view
|
<view
|
||||||
|
@ -43,13 +43,17 @@
|
||||||
></view>
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box" v-if="state.order.scaleStatus === 2">
|
<view
|
||||||
|
class="flex-box"
|
||||||
|
v-if="state.order.scaleStatus === ScaleStatus.ToBeReview"
|
||||||
|
>
|
||||||
<text>定价人:{{ state.order.pricingUserName || "-" }}</text>
|
<text>定价人:{{ state.order.pricingUserName || "-" }}</text>
|
||||||
<text>创建时间:{{ state.order.createTime }}</text>
|
<text>过磅时间:{{ state.order.grossTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 入库 过磅时间对应过毛时间 -->
|
<!-- 入库 过磅时间对应过毛时间 -->
|
||||||
<view class="flex-box" v-if="getIsShow()" style="border: none">
|
<view class="flex-box" v-if="getIsShow()" style="border: none">
|
||||||
<text>过磅时间:{{ state.order.grossTime || "-" }}</text>
|
<text>过磅时间:{{ state.order.grossTime || "-" }}</text>
|
||||||
|
<!-- {{ state.order.createTime }} -->
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-box" v-if="getIsShow()">
|
<view class="flex-box" v-if="getIsShow()">
|
||||||
<text>定价人:{{ state.order.pricingUserName || "-" }}</text>
|
<text>定价人:{{ state.order.pricingUserName || "-" }}</text>
|
||||||
|
@ -61,10 +65,24 @@
|
||||||
<view v-if="getIsShow()"></view>
|
<view v-if="getIsShow()"></view>
|
||||||
<view v-for="(item, index) in gridList1" :key="index">
|
<view v-for="(item, index) in gridList1" :key="index">
|
||||||
<text v-if="item.name">{{ item.name }}:</text
|
<text v-if="item.name">{{ item.name }}:</text
|
||||||
><text
|
><text>
|
||||||
>{{ item.isBefore ? item.unit : "" }}
|
{{ item.isBefore ? item.unit : "" }}
|
||||||
{{ item.num }}
|
{{ item.num }}
|
||||||
{{ item.isBefore ? "" : item.unit }}
|
{{ item.isBefore ? "" : item.unit }}
|
||||||
|
<text
|
||||||
|
v-if="item.name === '货款金额' && ScaleStatus.ToBeReview === state.order.scaleStatus"
|
||||||
|
@click="handleEdit()"
|
||||||
|
:style="{
|
||||||
|
color: 'rgba(0, 220, 238, 1)',
|
||||||
|
border: '1px solid #00DCEE',
|
||||||
|
'border-radius': '20rpx',
|
||||||
|
fontSize: '12px',
|
||||||
|
padding: '1px 10px',
|
||||||
|
marginLeft: '10rpx'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
编辑
|
||||||
|
</text>
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -123,11 +141,27 @@
|
||||||
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
@handleModal="(v:boolean) => {handleModal(v, deleteId)}"
|
||||||
@handleOk="handleOk()"
|
@handleOk="handleOk()"
|
||||||
/>
|
/>
|
||||||
|
<u-modal
|
||||||
|
showCancelButton
|
||||||
|
:confirmColor="'#00D2E3'"
|
||||||
|
:show="isInput"
|
||||||
|
:title="'修改货款金额'"
|
||||||
|
@confirm="handleConfirm"
|
||||||
|
@cancel="isInput = false"
|
||||||
|
>
|
||||||
|
<up-input
|
||||||
|
placeholder="请输入货款金额"
|
||||||
|
type="number"
|
||||||
|
v-model="amount"
|
||||||
|
></up-input>
|
||||||
|
</u-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ReceiveApi } from "@/services/index";
|
import { ReceiveApi } from "@/services/index";
|
||||||
import { onLoad } from "@dcloudio/uni-app";
|
import { onLoad } from "@dcloudio/uni-app";
|
||||||
|
import SmallModal from "@/components/Modal/smallModal.vue";
|
||||||
|
import { ScaleStatus } from "@/utils/enum";
|
||||||
const keyword = ref("");
|
const keyword = ref("");
|
||||||
const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
const contrlModalParams = reactive<{ [attrName: string]: any }>({
|
||||||
paySelect: {
|
paySelect: {
|
||||||
|
@ -236,7 +270,7 @@ const gridList1 = reactive([
|
||||||
isBefore: false,
|
isBefore: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "货款总价",
|
name: "货款金额",
|
||||||
enName: "balanceTotalPrice",
|
enName: "balanceTotalPrice",
|
||||||
num: "",
|
num: "",
|
||||||
unit: "元",
|
unit: "元",
|
||||||
|
@ -246,21 +280,42 @@ const gridList1 = reactive([
|
||||||
const getIsShow = () => {
|
const getIsShow = () => {
|
||||||
return state.order.scaleStatus === 3 || state.order.scaleStatus === 4;
|
return state.order.scaleStatus === 3 || state.order.scaleStatus === 4;
|
||||||
};
|
};
|
||||||
const handleScenePhoto = (imagesId: number) => {
|
const handleScenePhoto = (id: any) => {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesScenePhoto/index?orderType=1&id=" + imagesId, // 要跳转到的页面路径
|
url: "/pagesScenePhoto/index?orderType=1&imagesType=1&id=" + id, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 审核暂不支付 // 更新状态为3
|
// 审核暂不支付 // 更新状态为3
|
||||||
const handleReviewNoPay = () => {
|
const handleReviewNoPay = () => {
|
||||||
ReceiveApi.updateOne({ ...state.order, scaleStatus: 3 }).then((res) => {
|
ReceiveApi.updateOne({ ...state.order, scaleStatus: 3 }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesReceive/payReview?scaleStatus=3", // 要跳转到的页面路径
|
url: "/pagesReceive/payReview?scaleStatus=3", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const isInput = ref(false);
|
||||||
|
const amount = ref(null);
|
||||||
|
const handleEdit = () => {
|
||||||
|
isInput.value = true;
|
||||||
|
};
|
||||||
|
const handleConfirm = () => {
|
||||||
|
ReceiveApi.updateOrderIn({
|
||||||
|
orderInPos: [
|
||||||
|
{
|
||||||
|
...state.order,
|
||||||
|
balanceTotalPrice: amount.value,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
uni.showToast({ title: "修改成功" });
|
||||||
|
gridList1[gridList1.length - 1].num = amount.value || "";
|
||||||
|
isInput.value = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
// 审核立即支付
|
// 审核立即支付
|
||||||
const handleReviewPay = () => {
|
const handleReviewPay = () => {
|
||||||
contrlModalParams.paySelect.isShow = true;
|
contrlModalParams.paySelect.isShow = true;
|
||||||
|
@ -280,7 +335,7 @@ const handleSelect = (key: string, v: any) => {
|
||||||
title: "支付成功",
|
title: "支付成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
});
|
});
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesReceive/payReview?scaleStatus=4", // 要跳转到的页面路径
|
url: "/pagesReceive/payReview?scaleStatus=4", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -299,7 +354,7 @@ const handleModal = (v: boolean, id: number) => {
|
||||||
const handleOk = () => {
|
const handleOk = () => {
|
||||||
ReceiveApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
|
ReceiveApi.deleteOrder({ ids: [deleteId.value] }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesReceive/payReview?scaleStatus=2", // 要跳转到的页面路径
|
url: "/pagesReceive/payReview?scaleStatus=2", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -307,15 +362,15 @@ const handleOk = () => {
|
||||||
};
|
};
|
||||||
const handleUpdateOrder = () => {
|
const handleUpdateOrder = () => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pagesReceive/form/pricingForm?id=" + state.order.id, // 要跳转到的页面路径
|
url: "/pagesReceive/form/pricingForm?prePage=review&id=" + state.order.id, // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
// 重新过皮
|
// 重新过皮
|
||||||
const handleReWeight = () => {
|
const handleReWeight = () => {
|
||||||
ReceiveApi.reTare({ id: state.order.id }).then((res) => {
|
ReceiveApi.reTare({ id: state.order.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
uni.navigateTo({
|
uni.redirectTo({
|
||||||
url: "/pagesReceive/tareing", // 要跳转到的页面路径
|
url: "/pagesReceive/pricing?scaleStatus=1", // 要跳转到的页面路径
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -323,6 +378,9 @@ const handleReWeight = () => {
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
state.order.id = parseInt((option as any).id);
|
state.order.id = parseInt((option as any).id);
|
||||||
state.scaleStatus = parseInt((option as any).scaleStatus);
|
state.scaleStatus = parseInt((option as any).scaleStatus);
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: (option as any).title,
|
||||||
|
});
|
||||||
if (state.order.id) {
|
if (state.order.id) {
|
||||||
ReceiveApi.getDetailById({ id: state.order.id }).then((res) => {
|
ReceiveApi.getDetailById({ id: state.order.id }).then((res) => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
|
Loading…
Reference in New Issue