生箔工序
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user