生箔工序
This commit is contained in:
@@ -377,9 +377,7 @@ uni-button:after {
|
||||
padding: 6rpx 20rpx;
|
||||
white-space: normal;
|
||||
}
|
||||
.mini-btn {
|
||||
padding: 0 20rpx !important;
|
||||
}
|
||||
|
||||
|
||||
/** 提交栏 **/
|
||||
.submitbar {
|
||||
@@ -412,11 +410,26 @@ uni-button:after {
|
||||
// background: linear-gradient(90deg,#ff791a,#ffa400)
|
||||
background: #ff791a;
|
||||
}
|
||||
.btn-cancle {
|
||||
background: #fff;
|
||||
border-color: #fff;
|
||||
}
|
||||
.btn-info {
|
||||
color: #fff;
|
||||
border-color: #c9c9c9;
|
||||
background-color: #c9c9c9;
|
||||
}
|
||||
.btn-search-icon {
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.mini-btn {
|
||||
}
|
||||
uni-button[size=mini] {
|
||||
height: 54rpx;
|
||||
line-height: 54rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
uni-button[disabled]:not([type]) {
|
||||
color: #fff;
|
||||
border-color: #c9c9c9;
|
||||
|
||||
@@ -50,6 +50,9 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
|
||||
.jcflexstart {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
.jcflexend {
|
||||
justify-content: flex-end !important;
|
||||
}
|
||||
.jccenter {
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
132
components/SearchPopup.vue
Normal file
132
components/SearchPopup.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="msg_l_wrapper" :class="{ active: visible }">
|
||||
<view class="zd-row header">
|
||||
<span class="page_name">搜索</span>
|
||||
<uni-icons type="closeempty" size="20" @tap="handleClose"></uni-icons>
|
||||
</view>
|
||||
<view class="search-container">
|
||||
<view class="mgb40" v-for="e in conditions" :key="e.label">
|
||||
<view class="fil_name">{{e.label}}<span v-show="e.required" style="color: #D7592F;font-weight: 700;">*</span></view>
|
||||
<view v-if="e.key === 'scan'">
|
||||
<search-box v-model="e.value"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<slot></slot>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<view class="zd-col-4">
|
||||
<button class="btn-submit btn-cancle" @tap="handleClear">全部清除</button>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="btn-submit btn-success" @tap="handleSearch">查询</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
export default {
|
||||
components: {
|
||||
SearchBox
|
||||
},
|
||||
props: {
|
||||
conditions: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
},
|
||||
handleClose () {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000', // 导航栏文字颜色,只能是 '#ffffff' 或 '#000000'
|
||||
backgroundColor: '#d7592f', // 导航栏背景颜色
|
||||
animation: {
|
||||
duration: 300, // 动画持续时间(毫秒)
|
||||
timingFunc: 'ease-in-out' // 动画效果
|
||||
}
|
||||
});
|
||||
this.visible = false
|
||||
},
|
||||
handleClear () {
|
||||
this.$emit('clear')
|
||||
},
|
||||
handleSearch () {
|
||||
this.$emit('search')
|
||||
this.handleClose()
|
||||
},
|
||||
filterResults(key) {
|
||||
// 根据条件过滤结果
|
||||
const query = this.conditions.find((c) => c.key === key).value;
|
||||
this.searchResults = this.filterData(query, key);
|
||||
},
|
||||
filterData(query, key) {
|
||||
// 模拟数据过滤逻辑
|
||||
const allItems = ['苹果', '香蕉', '橙子', '葡萄', '西瓜']; // 示例数据
|
||||
return allItems.filter((item) => item.includes(query));
|
||||
},
|
||||
search() {
|
||||
this.$emit('search', this.conditions);
|
||||
this.$emit('update:visible', false); // 隐藏弹窗
|
||||
},
|
||||
selectItem(item) {
|
||||
this.$emit('select', item);
|
||||
this.searchQuery = item;
|
||||
this.searchResults = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '@/common/style/mixin.styl';
|
||||
.msg_l_wrapper
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: -100%;
|
||||
width: 100%;
|
||||
padding: 14rpx;
|
||||
z-index: 301;
|
||||
transition: all .3s;
|
||||
height: calc(100% - var(--status-bar-height));
|
||||
background-color: #ffffff;
|
||||
overflow: auto;
|
||||
transition: right 0.3s ease;
|
||||
.msg_l_wrapper.active {
|
||||
right: 0;
|
||||
}
|
||||
.header
|
||||
position absolute
|
||||
top 0
|
||||
left 0
|
||||
z-index: 301;
|
||||
_wh(100%, calc(var(--status-bar-height) + 88rpx))
|
||||
padding var(--status-bar-height) 20rpx 0 20rpx
|
||||
background-color #fff
|
||||
border-bottom 1px solid #f6f6f6
|
||||
.page_name
|
||||
_font(32rpx, 32rpx, #000,700,center)
|
||||
.fil_name
|
||||
line-height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
color: #323232;
|
||||
.submitbar
|
||||
position absolute
|
||||
z-index: 301;
|
||||
background-color: #fff;
|
||||
padding: 20rpx 28rpx;
|
||||
box-shadow: none;
|
||||
border-top 1px solid #f6f6f6
|
||||
.search-container
|
||||
width 100%
|
||||
padding calc(var(--status-bar-height) + 108rpx) 28rpx 120rpx 28rpx;
|
||||
</style>
|
||||
@@ -3,35 +3,12 @@
|
||||
<!-- <nav-bar title="生箔工序"></nav-bar> -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-19">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">母卷</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
ref="scanChild"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<button class="btn-submit btn-success" @tap="searchList">查询</button>
|
||||
</view>
|
||||
<view class="zd-row mgb10">
|
||||
<view class="zd-col-18">
|
||||
<button class="mgr20" size="mini" type="primary" :disabled="!pkId || disabled2" @tap="_confirmBlanking">准备就绪</button>
|
||||
<button size="mini" type="primary" :disabled="!pkId || disabled3" @tap="_rawStart">开始工单</button>
|
||||
</view>
|
||||
<button class="btn-search-icon" size="mini" @tap="toggleSearchPopup"><uni-icons type="search" size="24" color="#272727"></uni-icons></button>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
@@ -74,25 +51,37 @@
|
||||
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-3 btn-submit btn-success" :disabled="disabled1" @tap="_needEmptyAxis">呼叫</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :disabled="disabled4" @tap="_createOrder">创建工单</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !(val1 && !pkId)}" :disabled="disabled5" @tap="_needEmptyVehicle">呼叫空轴</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled2" @tap="_confirmBlanking">准备就绪</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled3" @tap="_finishBlanking">确认下卷</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="type === '1' && disabled4" @tap="_rawScrollDowm('1')">正常下卷</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="type === '3' && disabled4" @tap="_rawScrollDowm('3')">单下卷</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="type === '2' && disabled4" @tap="_rawScrollDowm('2')">单上轴</button>
|
||||
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="type === '4' && disabled4" @tap="_rawScrollDowm('4')">单下轴</button>
|
||||
</view>
|
||||
<up-top ref="UT" :scrollTop="top"></up-top>
|
||||
<SearchPopup
|
||||
ref= "SearchPopup"
|
||||
:conditions="conditions"
|
||||
@clear="handleClear"
|
||||
@search="searchList"
|
||||
>
|
||||
<view class="zd-row pdt26 mgb10 jcflexend">
|
||||
<view class="zd-col-8">
|
||||
<button size="mini" type="primary" :disabled="disabled1" @tap="_createOrder">新增工单</button>
|
||||
</view>
|
||||
</view>
|
||||
</SearchPopup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchPopup from '@/components/SearchPopup.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import UpTop from '@/components/upTop.vue'
|
||||
import {queryRawFoilList, needEmptyVehicle, confirmBlanking, finishBlanking, finish} from '@/utils/getData1.js'
|
||||
import {needEmptyAxis, createOrder} from '@/utils/getData3.js'
|
||||
import {queryRawFoilList, createOrder, confirmBlanking, rawStart, rawScrollDowm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchPopup,
|
||||
SearchBox,
|
||||
UpTop
|
||||
},
|
||||
@@ -100,8 +89,14 @@
|
||||
return {
|
||||
title: '',
|
||||
top: 0,
|
||||
val1: '',
|
||||
val2: '',
|
||||
initialConditions: [
|
||||
{ required: false, key: 'scan', label: '点位', value: ''},
|
||||
{ required: false, key: 'scan', label: '类型', value: '' }
|
||||
],
|
||||
conditions: [
|
||||
{ required: false, key: 'scan', label: '点位', value: ''},
|
||||
{ required: false, key: 'scan', label: '类型', value: '' }
|
||||
],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
@@ -119,7 +114,8 @@
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
pageSize: 10,
|
||||
type: ''
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -128,13 +124,23 @@
|
||||
onPageScroll(e) {
|
||||
this.$refs.UT.topData(e.scrollTop)
|
||||
},
|
||||
created () {
|
||||
// this._queryRawFoilList()
|
||||
},
|
||||
mounted () {
|
||||
this.$refs.scanChild.handleFocus()
|
||||
},
|
||||
methods: {
|
||||
toggleSearchPopup() {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#000000', // 导航栏文字颜色,只能是 '#ffffff' 或 '#000000'
|
||||
backgroundColor: '#ffffff', // 导航栏背景颜色
|
||||
animation: {
|
||||
duration: 300, // 动画持续时间(毫秒)
|
||||
timingFunc: 'ease-in-out' // 动画效果
|
||||
}
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$refs.SearchPopup.init()
|
||||
})
|
||||
},
|
||||
handleClear () {
|
||||
this.conditions = [...this.initialConditions]
|
||||
},
|
||||
searchList () {
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
@@ -143,12 +149,9 @@
|
||||
this.pageNum = 1
|
||||
this._queryRawFoilList()
|
||||
},
|
||||
handleChange (e) {
|
||||
// this.searchList()
|
||||
},
|
||||
/** 初始化查询 */
|
||||
// 查询列表
|
||||
async _queryRawFoilList () {
|
||||
let res = await queryRawFoilList(this.val1, this.val2, this.pageNum + '', this.pageSize + '')
|
||||
let res = await queryRawFoilList(this.conditions[0].value, this.conditions[1].value, this.pageNum + '', this.pageSize + '')
|
||||
this.totalCount = res.size
|
||||
if (res.size > 0) {
|
||||
const dataMap = res.data
|
||||
@@ -174,11 +177,11 @@
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
/** 呼叫 */
|
||||
async _needEmptyAxis () {
|
||||
// 新增工单
|
||||
async _createOrder () {
|
||||
this.disabled1 = true
|
||||
try {
|
||||
let res = await needEmptyAxis(this.val1, this.val2)
|
||||
let res = await createOrder(this.conditions[0].value, this.conditions[1].value)
|
||||
this.disabled1 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
@@ -188,38 +191,7 @@
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
/** 创建工单 */
|
||||
async _createOrder () {
|
||||
this.disabled4 = true
|
||||
try {
|
||||
let res = await createOrder(this.val1, this.val2)
|
||||
this.disabled4 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled4 = false
|
||||
}
|
||||
},
|
||||
async _needEmptyVehicle () {
|
||||
this.disabled5 = true
|
||||
if (!(this.val1 && !this.pkId)) {
|
||||
this.disabled5 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await needEmptyVehicle(this.val1)
|
||||
this.disabled5 = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.val1 = ''
|
||||
} catch (e) {
|
||||
this.disabled5 = false
|
||||
}
|
||||
},
|
||||
// 准备就绪
|
||||
async _confirmBlanking () {
|
||||
this.disabled2 = true
|
||||
if (!this.pkId) {
|
||||
@@ -240,58 +212,55 @@
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
async _finishBlanking () {
|
||||
// 开始工单
|
||||
async _rawStart () {
|
||||
this.disabled3 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await finishBlanking(this.pkObj)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
let res = await rawStart(this.pkObj)
|
||||
this.disabled3 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.searchList()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
async _finish () {
|
||||
// 开始工单
|
||||
async _rawScrollDowm (type) {
|
||||
this.disabled4 = true
|
||||
this.type = type
|
||||
if (!this.pkId) {
|
||||
this.disabled4 = false
|
||||
this.type = ''
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await finish(this.pkObj)
|
||||
let res = await rawScrollDowm(this.pkObj, type)
|
||||
this.disabled4 = false
|
||||
this.type = ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.searchList()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled4 = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.searchList()
|
||||
} catch (e) {
|
||||
this.disabled4 = false
|
||||
this.type = ''
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.container_name ? '' : e.container_name
|
||||
this.pkObj = this.pkId === e.container_name ? e : {}
|
||||
},
|
||||
cleanUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.totalCount = 0
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export const queryRawFoil = (pcode, cname, parea, page, size) => request({
|
||||
/**
|
||||
* 生箔工序
|
||||
*/
|
||||
// 1.1生箔工序初始化查询
|
||||
// 生箔工序初始化查询
|
||||
export const queryRawFoilList = (pcode, cname, page, size) => request({
|
||||
url: 'api/pda/raw/queryRawFoilList',
|
||||
data: {
|
||||
@@ -34,6 +34,43 @@ export const queryRawFoilList = (pcode, cname, page, size) => request({
|
||||
size: size
|
||||
}
|
||||
})
|
||||
// export const queryRawFoilList = (pcode, cname, page, size) => {
|
||||
// let res = {
|
||||
// size: 10,
|
||||
// data: [{container_name: '10000'}]
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
// 新增工单
|
||||
export const createOrder = (code, name) => request({
|
||||
url: 'api/pda/raw/createOrder',
|
||||
data: {
|
||||
point_code: code,
|
||||
container_name: name
|
||||
}
|
||||
})
|
||||
// 确认下卷-改为:准备就绪
|
||||
export const confirmBlanking = (rjo) => request({
|
||||
url: 'api/pda/raw/confirmBlanking',
|
||||
data: {
|
||||
raw_jo: rjo
|
||||
}
|
||||
})
|
||||
// 开始工单
|
||||
export const rawStart = (rjo) => request({
|
||||
url: 'api/pda/raw/start',
|
||||
data: {
|
||||
raw_jo: rjo
|
||||
}
|
||||
})
|
||||
// 正常下卷/单下卷/单上轴/单下轴
|
||||
export const rawScrollDowm = (rjo, type) => request({
|
||||
url: 'api/pda/raw/scrollDowm',
|
||||
data: {
|
||||
raw_jo: rjo,
|
||||
type: type
|
||||
}
|
||||
})
|
||||
// 1.2呼叫
|
||||
export const needEmptyAxis = (rjo, type, temperature, hours) => request({
|
||||
url: 'api/pda/raw/needEmptyAxis',
|
||||
@@ -51,13 +88,7 @@ export const needEmptyVehicle = (pcode) => request({
|
||||
point_code: pcode
|
||||
}
|
||||
})
|
||||
// 1.3确认下卷-改为:准备就绪
|
||||
export const confirmBlanking = (rjo) => request({
|
||||
url: 'api/pda/raw/confirmBlanking',
|
||||
data: {
|
||||
raw_jo: rjo
|
||||
}
|
||||
})
|
||||
|
||||
// 1.4下卷完成-改为:确认下卷
|
||||
export const finishBlanking = (rjo) => request({
|
||||
url: 'api/pda/raw/finishBlanking',
|
||||
|
||||
@@ -91,14 +91,6 @@ export const needEmptyAxis = (code, name) => request({
|
||||
container_name: name
|
||||
}
|
||||
})
|
||||
// 创建工单
|
||||
export const createOrder = (code, name) => request({
|
||||
url: 'api/pda/raw/createOrder',
|
||||
data: {
|
||||
point_code: code,
|
||||
container_name: name
|
||||
}
|
||||
})
|
||||
/**
|
||||
* 二期退货入库
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user