出库
This commit is contained in:
@@ -175,6 +175,7 @@ uni-button:after {
|
|||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #323232;
|
color: #323232;
|
||||||
|
font-weight: bold;
|
||||||
text-align:justify;
|
text-align:justify;
|
||||||
text-align-last: justify;
|
text-align-last: justify;
|
||||||
text-justify: inter-ideograph;/*兼容ie*/
|
text-justify: inter-ideograph;/*兼容ie*/
|
||||||
@@ -348,9 +349,9 @@ uni-button:after {
|
|||||||
background-color: #fff
|
background-color: #fff
|
||||||
}
|
}
|
||||||
.btn-disabled, .submit-button[disabled] {
|
.btn-disabled, .submit-button[disabled] {
|
||||||
background-color: #c9c9c9;
|
background-color: #c9c9c9 !important;
|
||||||
border: 1px solid #c9c9c9;
|
border: 1px solid #c9c9c9 !important;
|
||||||
color: #fff;
|
color: #fff !important;
|
||||||
}
|
}
|
||||||
.more_btns_wraper {
|
.more_btns_wraper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -398,32 +399,28 @@ uni-button:after {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 弹窗 */
|
/** 弹窗 */
|
||||||
|
.popshow {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
.pophide {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
||||||
.msg_wrapper {
|
.msg_wrapper {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
width: 100%;
|
||||||
text-align: center;
|
padding: 60rpx 28rpx;
|
||||||
z-index: 201;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.msg_wrapper_1 {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.msg_box {
|
|
||||||
width: 90%;
|
|
||||||
padding: 20rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 4px;
|
box-shadow: 0 -8px 16px 0 rgba(28,31,33,.1);
|
||||||
border: 1px solid #ebeef5;
|
border-top-left-radius: 20rpx;
|
||||||
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
|
border-top-right-radius: 20rpx;
|
||||||
backface-visibility: hidden;
|
z-index: 301;
|
||||||
|
transition: all .3s;
|
||||||
|
}
|
||||||
|
.msg_box {
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_mask {
|
.msg_mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -432,33 +429,29 @@ uni-button:after {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
opacity: .7;
|
opacity: .7;
|
||||||
background: #000;
|
background: #000;
|
||||||
z-index: 200;
|
z-index: 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
.msg_btns {
|
.msg_btns {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 300px;
|
|
||||||
margin: 40rpx auto 0;
|
margin: 40rpx auto 0;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
.msg_btn {
|
.msg_btn {
|
||||||
width: 45%;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
margin: 0;
|
|
||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
line-height: 78rpx;
|
line-height: 78rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
|
||||||
background-color: #ff6a00;
|
background-color: #ff6a00;
|
||||||
|
border: 1rpx solid #ff6a00;
|
||||||
border-radius: 44rpx;
|
border-radius: 44rpx;
|
||||||
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
|
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
|
||||||
}
|
}
|
||||||
.msg_btn_cancle {
|
.msg_btn_cancle {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
border: 1rpx solid #ff6a00;
|
||||||
|
font-size: 34rpx;
|
||||||
|
line-height: 78rpx;
|
||||||
|
border-radius: 44rpx;
|
||||||
color: #000;
|
color: #000;
|
||||||
margin-right: 20rpx;
|
box-shadow: 0 8rpx 18rpx 0 rgba(0,0,0,.2);
|
||||||
}
|
}
|
||||||
.msg_btn:disabled {
|
.msg_btn:disabled {
|
||||||
background-color: #c9c9c9;
|
background-color: #c9c9c9;
|
||||||
|
|||||||
@@ -13,54 +13,92 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
<view class="filter_label_wraper">
|
<view class="filter_label_wraper">
|
||||||
<span class="filter_label">物料余量</span>
|
<span class="filter_label">起点点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<input type="number" class="filter_input" v-model="val2">
|
<input type="text" class="filter_input" v-model="val2">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_item">
|
<view class="filter_item">
|
||||||
<view class="filter_label_wraper">
|
<view class="filter_label_wraper">
|
||||||
<span class="filter_label">物料点位</span>
|
<span class="filter_label">终点点位</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="filter_input_wraper">
|
<view class="filter_input_wraper">
|
||||||
<input type="number" class="filter_input" v-model="val3">
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="flow_wrapper" v-for="e in dataList" :key="e.point_code">
|
|
||||||
<view class="zd-row">
|
|
||||||
<view class="zd-col-24">
|
|
||||||
<view class="zd-row">
|
|
||||||
<view class="zd-col-2">
|
|
||||||
<view class="zd-row flow_icon_item_1">
|
|
||||||
<view class="iconfont icon_start_point"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="zd-col-22">
|
|
||||||
<view class="zd-row flow_start_item" @tap="checkcode(e)" :class="{'flow_start_item_checked': pkId === e.point_code}">
|
|
||||||
<view class="zd-col-12 pdl20 pdr20 font-size-1">{{e.point_code}}</view>
|
|
||||||
<view class="zd-col-12 pdr20 font-size-2">{{e.point_name}}</view>
|
|
||||||
<view v-show="pkId === e.point_code" class="iconfont icon_choosed"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>点位编码</th>
|
||||||
|
<th>点位名称</th>
|
||||||
|
<th>载具编码</th>
|
||||||
|
<th>物料编码</th>
|
||||||
|
<th>物料名称</th>
|
||||||
|
<th>配盘批次</th>
|
||||||
|
<th>物料数量</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" @click="toCheck(e)" :class="{'checked': e.group_id === pkId}">
|
||||||
|
<td>{{e.point_code}}</td>
|
||||||
|
<td>{{e.point_name}}</td>
|
||||||
|
<td>{{e.vehicle_code}}</td>
|
||||||
|
<td>{{e.material_code}}</td>
|
||||||
|
<td>{{e.material_name}}</td>
|
||||||
|
<td>{{e.pcsn}}</td>
|
||||||
|
<td>{{e.material_qty}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-bar_new">
|
<view class="submit-bar_new">
|
||||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled1" @tap="_fullVehicleOut">满托出库</button>
|
<button class="zd-col-4 submit-button_new" @tap="clearUp">清空</button>
|
||||||
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled2" @tap="_vehicleGoBack">余料回库</button>
|
<button class="zd-col-6 submit-button_new" :class="{'btn-disabled': !val2 || !index1}" :disabled="disabled1" @tap="_fullVehicleOut">满托出库</button>
|
||||||
<button class="zd-col-10 submit-button_new" :class="{'btn-disabled': !pkId || !$store.getters.publicObj}" :disabled="disabled3" @tap="_fullVehicleOutConfirm">满托出库确认</button>
|
<button class="zd-col-6 submit-button_new" @tap="popUp(1)">余料回库</button>
|
||||||
|
<button class="zd-col-7 submit-button_new" @tap="popUp(2)">满托出库确认</button>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
|
||||||
|
<view class="msg_box">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">当前点位</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index2" :localdata="options1" @change="selectChange2"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">载具编码</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<search-box
|
||||||
|
v-model="val3"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">物料数量</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<input type="number" class="filter_input" v-model="val4">
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row msg_btns">
|
||||||
|
<button class="zd-col-9 msg_btn_cancle" @tap="toClear">清空</button>
|
||||||
|
<button class="zd-col-13 msg_btn" :class="{'btn-disabled': !index2 || !val3 || !val4}" :disabled="disabled2" @tap="toConfirm">确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="show" class="msg_mask" @click.stop="show = false"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {queryPoints, fullVehicleOut, vehicleGoBack, fullVehicleOutConfirm} from '@/utils/getData2.js'
|
import {queryLinkMaterial, queryPoints, fullVehicleOut, vehicleGoBack, fullVehicleOutConfirm} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -70,12 +108,18 @@
|
|||||||
return {
|
return {
|
||||||
val1: '',
|
val1: '',
|
||||||
val2: '',
|
val2: '',
|
||||||
|
options1: [],
|
||||||
|
index1: '',
|
||||||
|
index2: '',
|
||||||
val3: '',
|
val3: '',
|
||||||
|
val4: '',
|
||||||
dataList: [],
|
dataList: [],
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false,
|
disabled2: false,
|
||||||
disabled3: false,
|
disabled3: false,
|
||||||
pkId: ''
|
pkId: '',
|
||||||
|
show: false,
|
||||||
|
type: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -87,41 +131,51 @@
|
|||||||
onShow() {
|
onShow() {
|
||||||
if (this.$store.getters.publicObj) {
|
if (this.$store.getters.publicObj) {
|
||||||
this.val1 = this.$store.getters.publicObj.material_name
|
this.val1 = this.$store.getters.publicObj.material_name
|
||||||
this.val2 = this.$store.getters.publicObj.material_qty
|
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
|
||||||
this.val3 = this.$store.getters.publicObj.point_code
|
|
||||||
this.val4 = this.$store.getters.publicObj.vehicle_code
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 初始化查询 */
|
|
||||||
async _queryPoints () {
|
|
||||||
let res = await queryPoints('2')
|
|
||||||
this.dataList = [...res]
|
|
||||||
},
|
|
||||||
getMater () {
|
getMater () {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/manage/search-mater'
|
url: '/pages/manage/search-mater-1'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
checkcode (e) {
|
/** grid查询 */
|
||||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
async _queryLinkMaterial (e) {
|
||||||
|
let res = await queryLinkMaterial(e)
|
||||||
|
this.dataList = [...res]
|
||||||
|
},
|
||||||
|
/** 选择器 */
|
||||||
|
selectChange1(e) {
|
||||||
|
this.index1 = e
|
||||||
|
},
|
||||||
|
selectChange2(e) {
|
||||||
|
this.index2 = e
|
||||||
|
},
|
||||||
|
/** 点位下拉框 */
|
||||||
|
async _queryPoints () {
|
||||||
|
let res = await queryPoints('2')
|
||||||
|
res.map(el => {
|
||||||
|
this.$set(el, 'value', el.point_code)
|
||||||
|
this.$set(el, 'text', el.point_name)
|
||||||
|
})
|
||||||
|
this.options1 = [...res]
|
||||||
|
},
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.group_id ? '' : e.group_id
|
||||||
|
this.val2 = this.pkId === e.group_id ? e.point_code : ''
|
||||||
},
|
},
|
||||||
/** 满托出库 */
|
/** 满托出库 */
|
||||||
async _fullVehicleOut () {
|
async _fullVehicleOut () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (!this.pkId) {
|
if (!this.val2 || !this.index1) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await fullVehicleOut(this.val3, this.pkId)
|
let res = await fullVehicleOut(this.val2, this.index1)
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.pkId = ''
|
this._queryLinkMaterial(this.$store.getters.publicObj.material_id)
|
||||||
this.val1 = ''
|
|
||||||
this.val2 = ''
|
|
||||||
this.val3 = ''
|
|
||||||
this.val4 = ''
|
|
||||||
this.$store.dispatch('setPublicObj', '')
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@@ -130,53 +184,75 @@
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
popUp (type) {
|
||||||
|
this.show = true
|
||||||
|
this.type = type
|
||||||
|
},
|
||||||
|
toClear () {
|
||||||
|
this.index2 = ''
|
||||||
|
this.val3 =''
|
||||||
|
this.val4 =''
|
||||||
|
},
|
||||||
|
toConfirm () {
|
||||||
|
if (this.type === 1) {
|
||||||
|
this._vehicleGoBack()
|
||||||
|
}
|
||||||
|
if (this.type === 2) {
|
||||||
|
this._fullVehicleOutConfirm()
|
||||||
|
}
|
||||||
|
},
|
||||||
/** 余料回库 */
|
/** 余料回库 */
|
||||||
async _vehicleGoBack () {
|
async _vehicleGoBack () {
|
||||||
this.disabled2 = true
|
this.disabled2 = true
|
||||||
if (!this.pkId) {
|
if (!this.index2 || !this.val3 || !this.val4) {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await vehicleGoBack(this.pkId, this.val4, this.val2)
|
let res = await vehicleGoBack(this.index2, this.val3, this.val4)
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
this.pkId = ''
|
this.toClear()
|
||||||
this.val1 = ''
|
this.show = false
|
||||||
this.val2 = ''
|
|
||||||
this.val3 = ''
|
|
||||||
this.val4 = ''
|
|
||||||
this.$store.dispatch('setPublicObj', '')
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
|
this.toClear()
|
||||||
|
this.show = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 满托出库确认 */
|
/** 满托出库确认 */
|
||||||
async _fullVehicleOutConfirm () {
|
async _fullVehicleOutConfirm () {
|
||||||
this.disabled3 = true
|
this.disabled2 = true
|
||||||
if (!this.pkId) {
|
if (!this.index2 || !this.val3 || !this.val4) {
|
||||||
this.disabled3 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await fullVehicleOutConfirm(this.pkId, this.val4, this.val2)
|
let res = await fullVehicleOutConfirm(this.index2, this.val3, this.val4)
|
||||||
this.disabled3 = false
|
this.disabled2 = false
|
||||||
this.pkId = ''
|
this.toClear()
|
||||||
this.val1 = ''
|
this.show = false
|
||||||
this.val2 = ''
|
|
||||||
this.val3 = ''
|
|
||||||
this.val4 = ''
|
|
||||||
this.$store.dispatch('setPublicObj', '')
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled3 = false
|
this.disabled2 = false
|
||||||
|
this.toClear()
|
||||||
|
this.show = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
clearUp () {
|
||||||
|
this.index1 = ''
|
||||||
|
this.val1 = ''
|
||||||
|
this.val2 = ''
|
||||||
|
this.dataList = []
|
||||||
|
this.pkId = ''
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user