修改
This commit is contained in:
@@ -69,7 +69,8 @@
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.workorder_status}}</td>
|
||||
<!-- <td>{{e.workorder_status}}</td> -->
|
||||
<td>{{e.workorder_status_name}}</td>
|
||||
<td>{{e.operator}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
<td>{{e.plan_weight}}</td>
|
||||
@@ -93,7 +94,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {regionList, pointList, getWeight, getOrderList, downMaterial} from '@/utils/getData4.js'
|
||||
import {regionList, pointList, getWeight, jbGetVehicleCode, getOrderList, downMaterial} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -115,7 +116,15 @@
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
flag: '',
|
||||
dupWeight: '',
|
||||
orgWeight: '',
|
||||
standError: '',
|
||||
disabled: false,
|
||||
statusMap: {
|
||||
'1': '未开始',
|
||||
'3': '生产中',
|
||||
'5': '已结束'
|
||||
},
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
@@ -166,6 +175,7 @@
|
||||
},
|
||||
selectChange2 (e) {
|
||||
this.index2 = e
|
||||
this._jbGetVehicleCode()
|
||||
this.seachList()
|
||||
},
|
||||
handleChange (e) {
|
||||
@@ -188,7 +198,11 @@
|
||||
async _getOrderList () {
|
||||
let res = await getOrderList(this.index2, '2')
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.dataList = res.data
|
||||
this.taskList = res.data.map(item => ({
|
||||
...item,
|
||||
workorder_status_name: this.statusMap[item.workorder_status] || ''
|
||||
}))
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
@@ -227,6 +241,19 @@
|
||||
console.log(11111)
|
||||
this.val3 = res.data.weight
|
||||
this.flag = res.data.flag
|
||||
this.dupWeight = res.data.weight
|
||||
this.orgWeight = res.data.org_weight
|
||||
this.standError = res.data.stand_error
|
||||
}
|
||||
},
|
||||
async _jbGetVehicleCode () {
|
||||
if (!this.index2) {
|
||||
return
|
||||
}
|
||||
let res = await jbGetVehicleCode(this.index2)
|
||||
if (res.code === '200') {
|
||||
this.val1 = res.data.tp_code
|
||||
this.val2 = res.data.lt_code
|
||||
}
|
||||
},
|
||||
xlconfirm () {
|
||||
@@ -236,18 +263,38 @@
|
||||
return
|
||||
}
|
||||
if (this.flag === '2') {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认以重量:' + this.val3 + '提交?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
||||
if ( chazhi > Number(this.standError)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '输⼊的重量:' + this.val3 + '与吨袋的重量:' + this.orgWeight + '误差过⼤!是否继续?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
if (this.flag === '1') {
|
||||
let chazhi = Number(this.val3) - Number(this.orgWeight)
|
||||
if ( chazhi > Number(this.standError)) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您修改的重量:' + this.val3 + '与吨袋的重量:' + this.orgWeight + '误差过⼤!是否以您输⼊的重量继续?',
|
||||
confirmColor: '#ff6a00',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this._downMaterial()
|
||||
} else if (res.cancel) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
async _downMaterial () {
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.workorder_status}}</td>
|
||||
<!-- <td>{{e.workorder_status}}</td> -->
|
||||
<td>{{e.workorder_status_name}}</td>
|
||||
<td>{{e.operator}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
@@ -165,7 +166,11 @@
|
||||
async _getOrderList () {
|
||||
let res = await getOrderList(this.index2, '2')
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.dataList = res.data
|
||||
this.taskList = res.data.map(item => ({
|
||||
...item,
|
||||
workorder_status_name: this.statusMap[item.workorder_status] || ''
|
||||
}))
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.workorder_status}}</td>
|
||||
<!-- <td>{{e.workorder_status}}</td> -->
|
||||
<td>{{e.workorder_status_name}}</td>
|
||||
<td>{{e.operator}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
<td>{{e.plan_weight}}</td>
|
||||
@@ -86,6 +87,11 @@
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false,
|
||||
statusMap: {
|
||||
'1': '未开始',
|
||||
'3': '生产中',
|
||||
'5': '已结束'
|
||||
},
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
@@ -106,6 +112,10 @@
|
||||
this._regionList()
|
||||
},
|
||||
methods: {
|
||||
// 获取状态名称
|
||||
getStatusName (status) {
|
||||
return this.statusMap[status] || ''
|
||||
},
|
||||
async _regionList () {
|
||||
try {
|
||||
let res = await regionList()
|
||||
@@ -150,7 +160,11 @@
|
||||
async _getOrderList () {
|
||||
let res = await getOrderList(this.index2, '1')
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.dataList = res.data
|
||||
this.taskList = res.data.map(item => ({
|
||||
...item,
|
||||
workorder_status_name: this.statusMap[item.workorder_status] || ''
|
||||
}))
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
|
||||
202
pages/zw/mancar-safe.vue
Normal file
202
pages/zw/mancar-safe.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 人车安全 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">管控区域</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>姓名</th>
|
||||
<th>进入时间</th>
|
||||
<th>进入区域</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toChek(e)" :class="{'checked': pkId === e.record_id}">
|
||||
<td>{{e.into_member}}</td>
|
||||
<td>{{e.in_time}}</td>
|
||||
<td>{{e.region_code}}</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 submit-bar">
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index}" @tap="seachList">刷新</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !index || !pkId}" @tap="_intoRegion">进入区域</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !index || !pkId}" @tap="_outRegion">退出区域</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {regionList, getAllIntoRegionMembers, intoRegion, outRegion} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
id: '',
|
||||
code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false,
|
||||
disabled2: false,
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this.id = options.id
|
||||
},
|
||||
created () {
|
||||
this._regionList()
|
||||
this.seachList()
|
||||
},
|
||||
methods: {
|
||||
async _regionList () {
|
||||
try {
|
||||
let res = await regionList()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
this.seachList()
|
||||
},
|
||||
seachList () {
|
||||
if (!this.index) {
|
||||
return
|
||||
}
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._getAllIntoRegionMembers()
|
||||
},
|
||||
async _getAllIntoRegionMembers () {
|
||||
let res = await getAllIntoRegionMembers(this.index)
|
||||
if (res.code === '200') {
|
||||
this.dataList = res.data
|
||||
// this.totalCount = res.totalElements
|
||||
// if (res.totalElements > 0) {
|
||||
// const dataMap = res.content
|
||||
// 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._getAllIntoRegionMembers()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toChek (e) {
|
||||
this.pkId = this.pkId === e.record_id ? '' : e.record_id
|
||||
this.pkObj = this.pkId === e.record_id ? e : {}
|
||||
},
|
||||
clearUp () {
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
},
|
||||
async _intoRegion () {
|
||||
this.disabled = true
|
||||
if (!index || !pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await intoRegion(this.index, this.pkObj.into_member)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _outRegion () {
|
||||
this.disabled2 = true
|
||||
if (!index || !pkId) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await outRegion(this.index, this.pkObj.into_member, this.dataList)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled2 = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 料桶入库 -->
|
||||
<!-- 料桶出入 -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
@@ -21,14 +21,89 @@
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">托盘码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.storagevehicle_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.pcsn" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">单位</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.qty_unit_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">供应商</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.supp_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料规格</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_spec" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label filter_input_disabled">物料类型</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_model" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_checkStruct">检查站点</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2 || flag === '2'}" :disabled="disabled2" @tap="_confirmSet">确认放置</button>
|
||||
<!-- <button class="zd-col-11 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_checkStruct">检查站点</button> -->
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val2}" :disabled="disabled" @tap="_checkStruct">刷新数据</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled3" @tap="_checkStruct">空桶取出</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2 || flag === '2'}" :disabled="disabled2" @tap="_confirmSet">确认放置</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -36,7 +111,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {checkStruct, confirmSet} from '@/utils/getData4.js'
|
||||
import {checkStruct, jbGetLtInfo, jbEmptyTakeOut, confirmSet} from '@/utils/getData4.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -48,8 +123,10 @@
|
||||
val1: '',
|
||||
val2: '',
|
||||
flag: '',
|
||||
currentData: {},
|
||||
disabled: false,
|
||||
disabled2: false,
|
||||
disabled3: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
@@ -68,6 +145,15 @@
|
||||
this.val2 = ''
|
||||
this.disabled2 = false
|
||||
},
|
||||
clearUp3 () {
|
||||
this.val1 = ''
|
||||
this.disabled3 = false
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._jbGetLtInfo()
|
||||
}
|
||||
},
|
||||
async _checkStruct () {
|
||||
console.log(1111)
|
||||
this.disabled = true
|
||||
@@ -95,6 +181,57 @@
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _jbGetLtInfo () {
|
||||
this.disabled = true
|
||||
if (!this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await jbGetLtInfo(this.val2)
|
||||
if (res.code === '200') {
|
||||
this.currentData = res.data
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _jbEmptyTakeOut () {
|
||||
this.disabled3 = true
|
||||
if (!this.val1) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await jbEmptyTakeOut(this.val1)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp3()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled3 = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
async _confirmSet () {
|
||||
this.disabled2 = true
|
||||
if (!this.val1 || !this.val2 || this.flag === '2') {
|
||||
|
||||
Reference in New Issue
Block a user