仓库配料
This commit is contained in:
parent
551a7b8edb
commit
0b5b1662df
11
api/materialManagement/MaterialRequsition.js
Normal file
11
api/materialManagement/MaterialRequsition.js
Normal file
@ -0,0 +1,11 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
|
||||
|
||||
export function getIngredientTask(data) {
|
||||
return request({
|
||||
url: '/mes/mm/materialinput/getIngredientTask',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@ -208,6 +208,14 @@
|
||||
"navigationBarTitleText" : "仓库配料",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/materialManagement/MaterialRequisition/MaterialRequisition",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "车间叫料",
|
||||
"enablePullDownRefresh" : false
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@ -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++) {
|
||||
|
||||
@ -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>
|
||||
@ -35,7 +35,7 @@
|
||||
{
|
||||
name: '车间叫料',
|
||||
icon: 'grid-fill',
|
||||
url: 'pages/materialManagement/MaterialProductionInput/MaterialProductionInput',
|
||||
url: '/pages/materialManagement/MaterialRequisition/MaterialRequisition',
|
||||
type: 1,
|
||||
index: 2
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user