add母卷重量维护\烘烤区域母卷详情,修改烘烤工序、生箔工序

This commit is contained in:
2025-06-26 19:44:08 +08:00
parent 23403350e5
commit 244fcbbaae
15 changed files with 779 additions and 195 deletions

View File

@@ -0,0 +1,248 @@
<template>
<view class="zd_container">
<!-- <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">{{$t('filter.area')}}</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('grid.point-code')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('grid.mother-roll-number')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val2" />
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>{{$t('grid.point-code')}}</th>
<th>{{$t('grid.mother-roll-number')}}</th>
<th>{{$t('filter.area')}}</th>
<th>{{$t('grid.mother-roll-status')}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.container_name === pkId}">
<td>{{e.point_code}}</td>
<td>{{e.container_name}}</td>
<td>{{e.product_area}}</td>
<td>{{e.roll_status}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<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-7 btn-submit btn-success" @tap="searchList">{{$t('button.search')}}</button>
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled1" @tap="_inCoolIvt">{{$t('button.quality-approved')}}</button>
<button class="zd-col-7 btn-submit btn-success" :class="{'btn-info': !pkId}" :disabled="disabled2" @tap="_inCoolOrOven">质检不合格</button>
</view>
<view class="msg_wrapper" :class="active ? 'popshow' : 'pophide'" style="height: auto">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd_wrapper zd_wrapper-1">
<view class="filter_item">
<view class="filter_label">{{$t('filter.temperature')}}</view>
<view class="filter_input_wraper">
<NumberInput
v-model="val3"
input-class="filter_input"
mode="mixed"
:decimalLength="3"
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.time')}}({{$t('unit.minute')}})</view>
<view class="filter_input_wraper">
<NumberInput
v-model="val4"
input-class="filter_input"
mode="integer"
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">去向</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options1" placement="top"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-11 btn-submit btn-default letter-30" @tap="cancleModal">{{$t('button.cancel')}}</button>
<button class="zd-col-11 btn-submit btn-success letter-30" @tap="modalToSure">{{$t('button.confirm')}}</button>
</view>
</view>
<view v-if="active" class="msg_mask"></view>
<up-top ref="UT" :scrollTop="top"></up-top>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import UpTop from '@/components/upTop.vue'
import {queryProductArea, inCoolIvt, inCoolOrOven} from '@/utils/getData1.js'
import {queryHotPoints} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox,
NumberInput,
UpTop
},
data() {
return {
title: '',
top: 0,
val1: '',
val2: '',
options: [],
index: '',
dataList: [],
pkId: '',
pkObj: {},
reload: false,
status: 'more',
contentText: {
contentdown: '查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
},
totalCount: 0,
pageNum: 1,
pageSize: 10,
disabled1: false,
disabled2: false,
active: false,
val3: '',
val4: '',
index1: '',
options1: [{value: '1', text: '入冷却'}, {value: '2', text: '入烘箱'}]
};
},
onPageScroll(e) {
this.$refs.UT.topData(e.scrollTop)
},
onLoad (options) {
this.title = options.title
},
created () {
this._queryHotPoints()
this._queryProductArea()
},
methods: {
searchList () {
this.dataList = []
this.pageNum = 1
this._queryHotPoints()
},
/** 生产区域下拉框查询 */
async _queryProductArea () {
let res = await queryProductArea()
this.options = [...res.data]
},
/** 初始化查询 */
async _queryHotPoints () {
let res = await queryHotPoints(this.val1, this.val2, this.index, this.pageNum + '', this.pageSize + '')
this.totalCount = res.size
if (res.size > 0) {
const dataMap = res.data
this.dataList = this.reload ? dataMap : this.dataList.concat(dataMap)
this.reload = false
} else {
this.dataList = []
}
if (this.totalCount == this.dataList.length) {
this.reload = false
this.status = 'noMore'
}
},
onReachBottom () {
if (this.totalCount > this.dataList.length) {
this.status = 'loading'
setTimeout(() => {
this.pageNum++
this._queryHotPoints()
}, 1000)
} else { //停止加载
this.status = 'noMore'
}
},
toCheck (e) {
this.pkId = this.pkId === e.container_name ? '' : e.container_name
this.pkObj = this.pkId === e.container_name ? e : {}
},
async _inCoolIvt () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
try {
let res = await inCoolIvt(this.pkObj.point_code, this.pkObj.container_name)
uni.showToast({
title: res.message,
icon: 'none'
})
this.searchList()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
_inCoolOrOven () {
if (this.pkId) {
this.active = true
this.disabled2 = true
}
},
cancleModal () {
this.val3 = ''
this.val4 = ''
this.index1 = ''
this.active = false
this.disabled2 = false
},
async modalToSure () {
try {
let res = await inCoolOrOven(this.pkObj.point_code, this.pkObj.container_name, this.val3, this.val4, this.index1)
uni.showToast({
title: res.message,
icon: 'none'
})
this.cancleModal()
this.searchList()
} catch (e) {
this.disabled2 = false
}
}
}
}
</script>
<style lang="stylus" scoped>
</style>

View File

@@ -43,20 +43,71 @@
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.type')}}</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options"></uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-5 btn-submit btn-success letter-30" :class="{'btn-info': !val1 || !val2 || !val3 || !val4}" :disabled="disabled" @tap="_ovenInAndOut1('1')">{{$t('button.enter-box')}}</button>
<button class="zd-col-5 btn-submit btn-success letter-30" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_ovenInAndOut2('2')">{{$t('button.out-box')}}</button>
<button class="zd-col-5 btn-submit btn-success" :class="{'btn-info': !val1 || !val2}" :disabled="disabled3" @tap="_inCoolIvt">{{$t('button.quality-approved')}}</button>
<button class="zd-col-5 btn-submit btn-success letter-30" :class="{'btn-info': !((val1 && val2 && index === '1') || (val1 && val2 && val3 && val4 && index === '2'))}" :disabled="disabled4" @tap="_inCoolOrOven">质检不合格</button>
<button class="zd-col-4 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-6 btn-submit btn-success" :class="{'btn-info': !val1 || !val2 || !val3 || !val4}" :disabled="disabled" @tap="_ovenInAndOut1('1')">{{$t('button.enter-box')}}</button>
<button class="zd-col-6 btn-submit btn-success" :class="{'btn-info': !val1}" :disabled="disabled" @tap="_ovenInAndOut2('2')">{{$t('button.out-box')}}</button>
<button class="zd-col-6 btn-submit btn-success" :disabled="disabled" @click="_inHotByPoint">定点入箱</button>
</view>
<view class="msg_wrapper" :class="active ? 'popshow' : 'pophide'" style="height: auto">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd_wrapper zd_wrapper-1">
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('filter.starting-point')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val5"/>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('grid.mother-roll-number')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val6" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.temperature')}}</view>
<view class="filter_input_wraper">
<NumberInput
v-model="val7"
input-class="filter_input"
mode="mixed"
:decimalLength="3"
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.time')}}({{$t('unit.minute')}})</view>
<view class="filter_input_wraper">
<NumberInput
v-model="val8"
input-class="filter_input"
mode="integer"
/>
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">{{$t('filter.end')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val9"/>
</view>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-11 btn-submit btn-default letter-30" @tap="cancleModal">{{$t('button.cancel')}}</button>
<button class="zd-col-11 btn-submit btn-success letter-30" @tap="modalToSure">{{$t('button.confirm')}}</button>
</view>
</view>
<view v-if="active" class="msg_mask"></view>
</view>
</template>
@@ -64,7 +115,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {ovenInAndOut, inCoolIvt, bakingquery, inCoolOrOven} from '@/utils/getData1.js'
import {ovenInAndOut, bakingquery, inHotByPoint} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -78,11 +129,13 @@
val2: '',
val3: '',
val4: '',
index: '',
options: [{value: '1', text: '入冷却'}, {value: '2', text: '入烘箱'}],
disabled: false,
disabled3: false,
disabled4: false
active: false,
val5: '',
val6: '',
val7: '',
val8: '',
val9: ''
};
},
onLoad (options) {
@@ -112,11 +165,7 @@
title: res.message,
icon: 'none'
})
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.disabled = false
this.clearUp()
} catch (e) {
this.disabled = false
}
@@ -133,56 +182,41 @@
title: res.message,
icon: 'none'
})
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.disabled = false
this.clearUp()
} catch (e) {
this.disabled = false
}
},
async _inCoolIvt () {
this.disabled3 = true
if (!this.val1 || !this.val2) {
this.disabled3 = false
return
}
try {
let res = await inCoolIvt(this.val1, this.val2)
uni.showToast({
title: res.message,
icon: 'none'
})
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.disabled3 = false
} catch (e) {
this.disabled3 = false
}
clearUp () {
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.disabled = false
},
// 质检不合格
async _inCoolOrOven () {
this.disabled4 = true
if (!((this.val1 && this.val2 && this.index === '1') || (this.val1 && this.val2 && this.val3 && this.val4 && this.index === '2'))) {
this.disabled4 = false
return
}
_inHotByPoint () {
this.active = true
this.disabled = true
},
cancleModal () {
this.val5 = ''
this.val6 = ''
this.val7 = ''
this.val8 = ''
this.val9 = ''
this.active = false
this.disabled = false
},
async modalToSure () {
try {
let res = await inCoolOrOven(this.val1, this.val2, this.val3, this.val4, this.index)
let res = await inHotByPoint(this.val5, this.val6, this.val7, this.val8, this.val9)
uni.showToast({
title: res.message,
icon: 'none'
})
this.val1 = ''
this.val2 = ''
this.val3 = ''
this.val4 = ''
this.disabled4 = false
this.cancleModal()
} catch (e) {
this.disabled4 = false
this.disabled = false
}
}
}

View File

@@ -0,0 +1,82 @@
<template>
<view class="zd_container">
<!-- <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">{{$t('filter.mother-roll')}}</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('grid.weight')}}</view>
<view class="filter_input_wraper">
<NumberInput
v-model="val2"
input-class="filter_input"
mode="integer"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !val1 && !val2}" :disabled="disabled" @tap="_confirmWeight">{{$t('button.confirm')}}</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import NumberInput from '@/components/NumberInput.vue'
import {confirmWeight} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox,
NumberInput
},
data() {
return {
title: '',
val1: '',
val2: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
async _confirmWeight () {
this.disabled = true
if (!this.val1 || !this.val2) {
this.disabled = false
return
}
try {
let res = await confirmWeight(this.val1, this.val2)
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
} catch (e) {
this.disabled = false
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.disabled = false
}
}
}
</script>

View File

@@ -17,6 +17,12 @@
</view>
</view>
<view class="zd_wrapper">
<view class="filter_item">
<view class="filter_label">{{$t('filter.area')}}</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :placeholder="$t('uni.dataSelect.placeholder')" :emptyTips="$t('uni.dataSelect.emptyTips')" :localdata="options"></uni-data-select>
</view>
</view>
<view class="filter_item">
<view class="filter_label">{{$t('filter.mother-roll')}}</view>
<view class="zd-row">
@@ -80,7 +86,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import UpTop from '@/components/upTop.vue'
import {queryRawFoilList, createOrder, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js'
import {queryProductArea, queryRawFoilList, createOrder, confirmBlanking, rawScrollDowm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -93,6 +99,8 @@
top: 0,
val1: '',
val2: '',
options: [],
index: '',
dataList: [],
pkId: '',
pkObj: {},
@@ -116,11 +124,17 @@
},
onLoad (options) {
this.title = options.title
this._queryProductArea()
},
onPageScroll(e) {
this.$refs.UT.topData(e.scrollTop)
},
methods: {
/** 生产区域下拉框查询 */
async _queryProductArea () {
let res = await queryProductArea()
this.options = [...res.data]
},
searchList () {
this.pkId = ''
this.pkObj = {}
@@ -131,7 +145,7 @@
},
// 查询列表
async _queryRawFoilList () {
let res = await queryRawFoilList(this.val1, this.val2, this.pageNum + '', this.pageSize + '')
let res = await queryRawFoilList(this.val1, this.index, this.val2, this.pageNum + '', this.pageSize + '')
this.totalCount = res.size
if (res.size > 0) {
const dataMap = res.data