仓库配料

This commit is contained in:
qianhao.xu 2024-04-29 09:56:46 +08:00
parent 551a7b8edb
commit 0b5b1662df
5 changed files with 119 additions and 2 deletions

View File

@ -0,0 +1,11 @@
import request from '@/utils/request'
export function getIngredientTask(data) {
return request({
url: '/mes/mm/materialinput/getIngredientTask',
method: 'post',
data
})
}

View File

@ -208,6 +208,14 @@
"navigationBarTitleText" : "仓库配料",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/materialManagement/MaterialRequisition/MaterialRequisition",
"style" :
{
"navigationBarTitleText" : "车间叫料",
"enablePullDownRefresh" : false
}
}
]

View File

@ -89,6 +89,8 @@
<u-button type="primary" size="big" text="生成配料任务" @click="generatetask"></u-button>
<u-modal :show="task.show" :title="task.title" :content="task.content" @confirm="task.show = false"></u-modal>
<u-loading-page :loading="loading" loading-text="加载数据中..." loading-color="#00ff00" icon-size="150"></u-loading-page>
</view>
</template>
@ -112,7 +114,8 @@ export default {
show: false,
title: '生成配料任务',
content: ''
}
},
loading:false
};
},
filters: {
@ -156,6 +159,8 @@ export default {
},
//todo
get_workorder_list() {
this.loading=true;
// let date = new Date(this.workerorder_time);
// date = new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
@ -173,6 +178,7 @@ export default {
};
getworkorderlist(query).then((res) => {
if (res.code == 200) {
this.loading=false;
this.workerorder_list = res.data;
for (let item = 0; item < this.workerorder_list.length; item++) {

View File

@ -0,0 +1,92 @@
<template>
<view>
<u-subsection :list="list" :current="current" @change="sectionChange" mode="subsection" fontSize="1.5rem"></u-subsection>
<view v-if="current == 0">
<view class="area">
<u-row>
<u-col span="8">
<u-button @click="timeshow = true">选择日期</u-button>
<u-datetime-picker :show="timeshow" v-model="queryParams.workerorder_time" mode="date" @confirm="confirm()" @cancel="timeshow = false"></u-datetime-picker>
</u-col>
<u-col span="4">
<view style="font-size: 1.2rem">{{ queryParams.workerorder_time | formatDate }}</view>
</u-col>
</u-row>
<u-gap height="10" bgColor="#bbb"></u-gap>
<u-list @scrolltolower="scrolltolower">
<u-list-item v-for="(item, index) in indexList" :key="index">
<u-cell :title="`列表长度-${index + 1}`">
<u-avatar slot="icon" shape="square" size="35" :src="item.url" customStyle="margin: -3px 5px -3px 0"></u-avatar>
</u-cell>
</u-list-item>
</u-list>
</view>
</view>
<view v-if="current == 1"></view>
</view>
</template>
<script>
import { getIngredientTask } from '@/api/materialManagement/MaterialProductionInput.js';
export default {
data() {
return {
list: ['车间叫料', '空车返程'],
current: 0,
queryParams: {
workerorder_time:Number(new Date()),
pageNum: 1,
pageSize: 10,
sort: undefined,
sortType: undefined,
totalNum: 0
},
timeshow: false
};
},
filters: {
formatDate: function (value) {
// Date 使
const date = new Date(value);
//
const year = date.getFullYear();
const month = date.getMonth() + 1; // 0 1
const day = date.getDate();
return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
}
},
mounted() {},
methods: {
// todo
getInitList() {
getIngredientTask(this.queryParams).then((res) => {});
},
sectionChange(index) {
this.current = index;
},
scrolltolower() {
this.loadmore();
},
loadmore() {
for (let i = 0; i < 30; i++) {
this.indexList.push({
url: this.urls[uni.$u.random(0, this.urls.length - 1)]
});
}
},
//todo
confirm() {
this.timeshow = false;
}
}
};
</script>
<style scoped>
.area {
height: 500px;
background-color: white;
}
</style>

View File

@ -35,7 +35,7 @@
{
name: '车间叫料',
icon: 'grid-fill',
url: 'pages/materialManagement/MaterialProductionInput/MaterialProductionInput',
url: '/pages/materialManagement/MaterialRequisition/MaterialRequisition',
type: 1,
index: 2
},