生产下料、点位更新
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<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="zd-row border-bottom">
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
@@ -54,6 +54,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
@@ -61,6 +62,9 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<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="zd-row border-bottom">
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<!-- <view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
@@ -52,6 +52,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
// options2: [],
|
||||
@@ -60,6 +61,9 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<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="zd-row border-bottom">
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
@@ -64,7 +64,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>载具编码</th>
|
||||
<th class="fontcol1">载具编码</th>
|
||||
<th>载具类型</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
@@ -74,7 +74,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.vehicle_code === pkId}">
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td class="fontcol1">{{e.vehicle_code}}</td>
|
||||
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
|
||||
<td class="fontcol2">{{e.material_code}}</td>
|
||||
@@ -143,6 +143,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
@@ -163,6 +164,9 @@
|
||||
disabled4: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
this._queryMaterial()
|
||||
@@ -344,5 +348,4 @@
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<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="zd-row border-bottom">
|
||||
@@ -11,7 +11,7 @@
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @change="selectChange"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">出库点位</span>
|
||||
</view>
|
||||
@@ -27,7 +27,7 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>点位编码</th>
|
||||
<th class="fontcol1">点位编码</th>
|
||||
<th>点位名称</th>
|
||||
<th>载具编码</th>
|
||||
<th>物料编码</th>
|
||||
@@ -69,6 +69,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
@@ -77,6 +78,9 @@
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._queryMaterial()
|
||||
},
|
||||
@@ -111,6 +115,7 @@
|
||||
let res = await fullVehicleOut(this.pkId, this.val1)
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
this._queryLinkMaterial(this.index1)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
@@ -130,4 +135,5 @@
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
@import '../../common/style/mixin.styl';
|
||||
</style>
|
||||
|
||||
127
pages/manage/point-update.vue
Normal file
127
pages/manage/point-update.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<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-5">
|
||||
<span class="filter_label">当前点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">载具类型</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_picker">
|
||||
<picker @change="pickerChange" :value="index1" :range="options1" range-key="text">
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': index1 === '' || !val1 || !val2}" :disabled="disabled1" @tap="_bindVehicle">绑定</button>
|
||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="_unbindVehicle">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getVehicleType, bindVehicle, unbindVehicle} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
},
|
||||
methods: {
|
||||
/** 载具类型下拉框 */
|
||||
async _getVehicleType () {
|
||||
let res = await getVehicleType()
|
||||
this.options1 = [...res]
|
||||
},
|
||||
pickerChange (e) {
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
async _bindVehicle () {
|
||||
this.disabled1 = true
|
||||
if (!this.val1 || this.index1 === '' || !this.val2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await bindVehicle(this.val1, this.index1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
async _unbindVehicle () {
|
||||
this.disabled2 = true
|
||||
if (!this.val1) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await unbindVehicle(this.val1, this.index1, this.val2)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
99
pages/manage/produce-cut.vue
Normal file
99
pages/manage/produce-cut.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<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-5">
|
||||
<span class="filter_label">当前点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">下一点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': index1 === '' || !val1}" :disabled="disabled" @tap="_createP2pTask">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryEndPointsByStart, createP2pTask} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
this._queryEndPointsByStart(e)
|
||||
},
|
||||
/** 下一点位下拉框 */
|
||||
async _queryEndPointsByStart (e) {
|
||||
let res = await queryEndPointsByStart(e)
|
||||
if (res.length > 0) {
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.point_code2)
|
||||
this.$set(el, 'text', el.point_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
this.index1 = this.options1[0].value
|
||||
}
|
||||
},
|
||||
async _createP2pTask () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.index1 === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await createP2pTask(this.val1, this.index1)
|
||||
this.clearUp()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.options1 = []
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
Reference in New Issue
Block a user