协同列表

master
mhsnet 2 months ago
parent b85c4ec20d
commit ac722e2784

@ -0,0 +1,15 @@
import request from "@/utils/request";
// 采购协同列表-App
export function getOrderList(params) {
let data = {
orderStatus: params.orderStatus,
moduleId: "591255416864768197",
menuId: "591260119262560581",
};
return request({
url: "/api/example/YysMaterialProcurementOrder/list",
method: "POST",
data,
});
}

@ -3,7 +3,8 @@
"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue", "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue",
"^jnpf-(.*)": "@/components/jnpf/jnpf-$1/index.vue" "^jnpf-(.*)": "@/components/jnpf/jnpf-$1/index.vue"
}, },
"pages": [{ "pages": [
{
"path": "pages/launch/index", "path": "pages/launch/index",
"style": { "style": {
"app-plus": { "app-plus": {
@ -56,6 +57,13 @@
} }
} }
}, },
{
"path": "pages/yys/materialProcurementOrder/index",
"style": {
"navigationStyle": "custom",
"navigationBarTextStyle": "white"
}
},
{ {
"path": "pages/login/index", "path": "pages/login/index",
"style": { "style": {
@ -170,18 +178,21 @@
// #ifdef H5 // #ifdef H5
{ {
"root": "pages/mpPortal", "root": "pages/mpPortal",
"pages": [{ "pages": [
"path": "index", {
"style": { "path": "index",
"navigationStyle": "custom", // "style": {
"navigationBarTextStyle": "black" // "navigationStyle": "custom", //
"navigationBarTextStyle": "black" //
}
} }
}] ]
}, },
// #endif // #endif
{ {
"root": "pages/message", "root": "pages/message",
"pages": [{ "pages": [
{
"path": "userDetail/index", "path": "userDetail/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
@ -213,7 +224,8 @@
}, },
{ {
"root": "pages/workFlow", "root": "pages/workFlow",
"pages": [{ "pages": [
{
"path": "flowBefore/index", "path": "flowBefore/index",
"style": { "style": {
"navigationBarTitleText": "" "navigationBarTitleText": ""
@ -313,7 +325,8 @@
}, },
{ {
"root": "pages/apply", "root": "pages/apply",
"pages": [{ "pages": [
{
"path": "reportLog/index", "path": "reportLog/index",
"style": { "style": {
"navigationBarTitleText": "汇报日志" "navigationBarTitleText": "汇报日志"
@ -396,11 +409,11 @@
} }
] ]
}, },
// #ifdef APP-PLUS // #ifdef APP-PLUS
{ {
"root": "pages/componentLibrary", "root": "pages/componentLibrary",
"pages": [{ "pages": [
{
"path": "index" "path": "index"
}, },
// parse- // parse-
@ -912,7 +925,8 @@
// #endif // #endif
{ {
"root": "pages/my", "root": "pages/my",
"pages": [{ "pages": [
{
"path": "settings/index", "path": "settings/index",
"style": { "style": {
"navigationBarTitleText": "设置", "navigationBarTitleText": "设置",

@ -1,102 +1,94 @@
<template> <template>
<view class="category"> <view class="category">
<template v-if="list.length"> <template v-if="list.length">
<view class="module" v-for="item in list"> <view class="module" v-for="item in list">
<view <view class="category-item" hover-class="none" v-for="item2 in item.children" :key="item2.path"
class="category-item" @click="handleToBooking(item2)">
hover-class="none" <image v-if="item2.auth" class="icon" :src="item2.imgUrl" mode="scaleToFill"></image>
v-for="item2 in item.children" <image v-else class="icon" :src="item2.defaultImgUrl" mode="scaleToFill"></image>
:key="item2.path" </view>
@click="handleToBooking(item2)" </view>
> </template>
<image <view v-else class="empty-data">
v-if="item2.auth" <image class="icon" src="/static/images/home-empty.png" mode="aspectFit"></image>
class="icon" </view>
:src="item2.imgUrl" </view>
mode="scaleToFill"
></image>
<image
v-else
class="icon"
:src="item2.defaultImgUrl"
mode="scaleToFill"
></image>
</view>
</view>
</template>
<view v-else class="empty-data">
<image
class="icon"
src="/static/images/home-empty.png"
mode="aspectFit"
></image>
</view>
</view>
</template> </template>
<script> <script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"; import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import { mapGetters } from "vuex"; import {
import { getIMReply, relocation } from "@/api/message.js"; mapGetters
export default { } from "vuex";
props: ["list"], import {
mixins: [], getIMReply,
data() { relocation
return { } from "@/api/message.js";
isLoading: false, export default {
}; props: ["list"],
}, mixins: [],
watch: {}, data() {
computed: {}, return {
onLoad() {}, isLoading: false,
onUnload() {}, };
methods: { },
handleToBooking(item) { watch: {},
console.log(item); computed: {},
}, onLoad() {},
}, onUnload() {},
}; methods: {
handleToBooking(item) {
uni.navigateTo({
url: '/pages/yys/materialProcurementOrder/index?test=1'
});
},
},
};
</script> </script>
<style lang="scss" scope> <style lang="scss" scope>
.category { .category {
padding: 32rpx 10rpx; padding: 32rpx 10rpx;
margin: 16rpx; margin: 16rpx;
border-radius: 4rpx; border-radius: 4rpx;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
// min-height: 80vh;
.module {
width: 100%;
// margin: 10rpx 0;
.module-title {
font-size: 32rpx;
color: #1d2129;
}
.category-item {
border-radius: 16rpx;
margin: 40rpx 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
width: 100%;
.icon {
width: 100%;
height: 240rpx;
}
}
}
.empty-data { // min-height: 80vh;
position: absolute; .module {
left: 50%; width: 100%;
top: 50%;
width: 480rpx; // margin: 10rpx 0;
height: 528rpx; .module-title {
transform: translate(-50%, -50%); font-size: 32rpx;
} color: #1d2129;
} }
</style>
.category-item {
border-radius: 16rpx;
margin: 40rpx 0;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
box-shadow: 0px 3px 12px 0px rgba(63, 112, 157, 0.5);
width: 100%;
.icon {
width: 100%;
height: 240rpx;
}
}
}
.empty-data {
position: absolute;
left: 50%;
top: 50%;
width: 480rpx;
height: 528rpx;
transform: translate(-50%, -50%);
}
}
</style>

@ -0,0 +1,23 @@
<template>
<u-navbar :is-back="true" title="采购协同" :background="{backgroundColor: '#375AC8'}" title-color="white" back-icon-color="white">
<!-- <view class="slot-wrap">
<u-image
width="100%"
height="100%"
src="/static/images/yyslogo.png"
mode="aspectFit"
></u-image>
</view> -->
</u-navbar>
</template>
<style lang="scss" scope>
.sty-nav /deep/ .u-slot-content {
height: 100%;
.slot-wrap {
width: 100%;
height: 100%;
background: #375AC8;
}
}
</style>

@ -0,0 +1,159 @@
<template>
<view class="viewport">
<CustomNavbar />
<u-tabs
:list="tabsList"
:is-scroll="false"
:current="tabsCurrent"
@change="fnTabsChg"
></u-tabs>
<u-card v-for="orderItem in orderList">
<view class="" slot="head">
<text>采购订单编号{{ orderItem.orderNumber }}</text>
</view>
<view class="" slot="body">
<u-row gutter="16">
<u-col span="12">
<text>订单日期</text><text>{{ orderItem.orderDate }}</text>
</u-col>
<u-col span="6">
<text>物料名称</text><text>{{ orderItem.materialName }}</text>
</u-col>
<u-col span="6">
<text>规格型号</text><text>{{ orderItem.specification }}</text>
</u-col>
<u-col span="6">
<text>物料编码</text><text>{{ orderItem.materialCode }}</text>
</u-col>
<u-col span="6">
<text>下单数量</text><text>{{ orderItem.orderQuantity }}</text>
</u-col>
<u-col span="6">
<text>要求到货日期</text><text>{{ orderItem.orderDate }}</text>
</u-col>
</u-row>
</view>
<view class="" slot="foot">
<u-button
size="mini"
:custom-style="{
color: 'white',
margin: '5px',
backgroundImage:
'linear-gradient(to right, rgb(111, 137, 221), rgb(42, 75, 180))',
}"
:plain="true"
shape="false"
>
接单
</u-button>
<u-button
size="mini"
:custom-style="{
color: 'white',
margin: '5px',
backgroundImage:
'linear-gradient(to right, rgb(255, 133, 133), rgb(249, 61, 61))',
}"
:plain="true"
shape="false"
>
延期发货
</u-button>
<u-button
size="mini"
:custom-style="{
color: 'white',
margin: '5px',
backgroundImage:
'linear-gradient(to right, rgb(255, 199, 131), rgb(252, 136, 13))',
}"
:plain="true"
shape="false"
>
缺货结单
</u-button>
<u-button
size="mini"
:custom-style="{
color: 'white',
margin: '5px',
backgroundImage:
'linear-gradient(to right, rgb(111, 137, 221), rgb(42, 75, 180))',
}"
:plain="true"
shape="false"
>
投产
</u-button>
<u-button
size="mini"
:custom-style="{
color: 'white',
margin: '5px',
backgroundImage:
'linear-gradient(to right, rgb(126, 237, 140), rgb(74, 215, 92))',
}"
:plain="true"
shape="false"
>
发货
</u-button>
</view>
</u-card>
</view>
</template>
<script>
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
import { mapGetters } from "vuex";
import { getOrderList } from "@/api/yys/materialProcurementOrder.js";
import CustomNavbar from "./components/CustomNavbar";
export default {
components: { CustomNavbar },
mixins: [],
data() {
return {
isLoading: false,
tabsList: [
{ name: "待接单", orderStatus: "1" },
{ name: "已接单", orderStatus: "2" },
{ name: "部分发货", orderStatus: "4" },
{ name: "发货完成", orderStatus: "5" },
],
tabsCurrent: 0,
orderList: [],
};
},
watch: {},
computed: {},
onLoad(params) {
this.fnGetList();
},
onUnload() {},
methods: {
fnTabsChg(index) {
this.tabsCurrent = index;
this.fnGetList();
},
fnGetList() {
let tabsNow = this.tabsList[this.tabsCurrent];
let params = {
orderStatus: tabsNow.orderStatus,
};
getOrderList(params)
.then((res) => {
if (res.code == 200) {
this.orderList = res.data;
}
console.log(res);
})
.catch((err) => {
console.log(err);
});
},
},
};
</script>
<style lang="scss"></style>
Loading…
Cancel
Save