恒森类似项目
This commit is contained in:
182
pages/outbound/bill-list.vue
Normal file
182
pages/outbound/bill-list.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 单据列表 -->
|
||||
<nav-bar title="单据列表"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-9">
|
||||
<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 class="zd-row">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">单据编码</span>
|
||||
</view>
|
||||
<view class="zd-col-24">
|
||||
<search-box
|
||||
v-model="code"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</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>
|
||||
<th>计划数量</th>
|
||||
<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.code}">
|
||||
<td>{{e.code}}</td>
|
||||
<td>{{e.form_type}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.assign_qty}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.unit_name}}</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-6 button-primary" @tap="seachList">查询</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageOrder, outStorageOrderList} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
id: '',
|
||||
code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: 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._outStorageOrder()
|
||||
},
|
||||
methods: {
|
||||
/** 下拉框*/
|
||||
async _outStorageOrder () {
|
||||
let res = await outStorageOrder()
|
||||
this.options = [...res]
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(e, this.code)
|
||||
}
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(this.index, e)
|
||||
}
|
||||
},
|
||||
seachList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
this._outStorageOrderList(this.index, this.code)
|
||||
},
|
||||
async _outStorageOrderList (index, e) {
|
||||
let res = await outStorageOrderList(this.pageNum + '', this.pageSize + '', index, e)
|
||||
if (res.code === '200') {
|
||||
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._outStorageOrderList(this.index, this.code)
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toChek (e) {
|
||||
this.pkId = this.pkId === e.code ? '' : e.code
|
||||
this.pkObj = this.pkId === e.code ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateTo({
|
||||
url: '/pages/outbound/bill-out-store?title=单据出库'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
243
pages/outbound/bill-out-store.vue
Normal file
243
pages/outbound/bill-out-store.vue
Normal file
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 单据出库 -->
|
||||
<nav-bar :title="title" :inner="true"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper">
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">单据编码</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.code}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">单据类型</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{formTypeName}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">创建时间</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.create_time}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">创建人</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.create_name}}</span></view>
|
||||
</view>
|
||||
<!-- <view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-6"><span class="filter_label">物料编码</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.material_code}}</span></view>
|
||||
<view class="zd-col-6"><span class="filter_label">单位</span></view>
|
||||
<view class="zd-col-6"><span class="filter_input">{{currentData.unit_name}}</span></view>
|
||||
</view> -->
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6"><span class="filter_label">仓库</span></view>
|
||||
<view class="zd-col-6 filter_select">
|
||||
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
<view class="zd-col-6"><span class="filter_label">车间</span></view>
|
||||
<view class="zd-col-6 filter_select">
|
||||
<uni-data-select v-model="currentData.product_area" :localdata="options2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row jcflexstart">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">加急单据</span>
|
||||
</view>
|
||||
<view class="relative zd-col-6">
|
||||
<switch :checked="isChecked" color="#4e6ef2" style="transform:scale(0.8); transform-origin: left;"/>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="JSON.stringify(currentData) !== '{}'" class="grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th @tap="toAllCheck"><uni-icons :type="allCheck ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></th>
|
||||
<th class="td_3">
|
||||
<view class="td_3">
|
||||
物料名称
|
||||
</view>
|
||||
</th>
|
||||
<th>物料编码</th>
|
||||
<th>计划数量</th>
|
||||
<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">
|
||||
<td @tap="toCheck(e)"><uni-icons :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons></td>
|
||||
<td class="td_3">{{e.material_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.sto_qty}}</td>
|
||||
<td><input type="number" class="sin_input" v-model="e.now_assign_qty" @blur="handleBlur(e)"></td>
|
||||
<td>{{e.assign_qty}}</td>
|
||||
<td>{{e.actual_qty}}</td>
|
||||
<td><input type="text" class="sin_input" v-model="e.pcsn"></td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="toEmpty">返回</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageConfirm">出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageOrder, outStorageConfirm, outStorageOrderConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
currentData: {},
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
options1: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
||||
index1: '',
|
||||
options2: [{value: 'A1', text: 'A1车间'}, {value: 'A2', text: 'A2车间'}, {value: 'A3', text: 'A3车间'}],
|
||||
allCheck: false,
|
||||
formTypeName: '',
|
||||
isChecked: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
this._outStorageOrder()
|
||||
this.dataList = [...this.currentData.children]
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'now_assign_qty', el.qty)
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
this.index1 = this.currentData.stor_code
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
setWStatus () {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
// 出库单类型
|
||||
async _outStorageOrder () {
|
||||
let res = await outStorageOrder()
|
||||
res.map(el => {
|
||||
if (el.value === this.currentData.form_type) {
|
||||
this.formTypeName = el.text
|
||||
}
|
||||
})
|
||||
},
|
||||
selectChange1 (e) {
|
||||
if (e) {
|
||||
this._outStorageOrderConfirm(e)
|
||||
}
|
||||
},
|
||||
async _outStorageOrderConfirm (e) {
|
||||
try {
|
||||
let res = await outStorageOrderConfirm(this.currentData.code, e)
|
||||
if (res.code === '200') {
|
||||
if (res.content.length > 0) {
|
||||
this.currentData = res.content[0]
|
||||
this.dataList = [...this.currentData.children]
|
||||
this.dataList.map(el => {
|
||||
this.$set(el, 'now_assign_qty', el.qty)
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
handleBlur (e) {
|
||||
if (e.now_assign_qty < 0 || e.now_assign_qty > e.qty) {
|
||||
e.now_assign_qty = e.qty
|
||||
}
|
||||
if (parseFloat(e.sto_qty) < parseFloat(e.now_assign_qty) && e.checked) {
|
||||
e.checked = false
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
uni.navigateBack()
|
||||
},
|
||||
toAllCheck () {
|
||||
this.allCheck = !this.allCheck
|
||||
this.dataList.map(el => {
|
||||
el.checked = this.allCheck
|
||||
})
|
||||
},
|
||||
toCheck (e) {
|
||||
if (parseFloat(e.sto_qty) < parseFloat(e.now_assign_qty)) {
|
||||
return
|
||||
}
|
||||
e.checked = !e.checked
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
this.allCheck = arr.length === this.dataList.length
|
||||
},
|
||||
async _outStorageConfirm () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
let urgent = this.isChecked ? '1' : '0'
|
||||
let obj = Object.assign(this.currentData, {children: arr, stor_code: this.index1, urgent: urgent})
|
||||
try {
|
||||
let res = await outStorageConfirm(obj)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.toEmpty()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.filter_input
|
||||
font-size 26rpx
|
||||
.filter_label
|
||||
font-size: 26rpx;
|
||||
.slide_new
|
||||
// padding-bottom 110px
|
||||
.slide_new table td
|
||||
overflow visible
|
||||
/deep/ .uni-select__input-text
|
||||
width calc(100% - 25px)
|
||||
/deep/ .zd_icon_wraper
|
||||
width 25px
|
||||
/deep/ .uni-icons
|
||||
vertical-align: bottom;
|
||||
</style>
|
||||
82
pages/outbound/out-store-confirm.vue
Normal file
82
pages/outbound/out-store-confirm.vue
Normal file
@@ -0,0 +1,82 @@
|
||||
<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">
|
||||
<search-box
|
||||
v-model="code"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !code}" :disabled="disabled" @tap="_ioStorageOut">扫码出库确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {ioStorageOut} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
code: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.code = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _ioStorageOut () {
|
||||
this.disabled = true
|
||||
if (!this.code) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await ioStorageOut(this.code)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
99
pages/outbound/pick-confirm-2nd.vue
Normal file
99
pages/outbound/pick-confirm-2nd.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-8">
|
||||
<span class="filter_label">产线站点编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">取货确认状态</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<span v-show="val1" class="filter_input" style="font-size: 34rpx; color: #ff6a00; font-weight: 700;">{{status === '1' ? '已确认取货' : '未确认取货'}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-primary" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_takeConfirm">扫码取货确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getPointStatus, takeConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
status: null,
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e) {
|
||||
this._getPointStatus(e)
|
||||
},
|
||||
// 产线站点编码验证
|
||||
async _getPointStatus (e) {
|
||||
try {
|
||||
let res = await getPointStatus(e)
|
||||
if (res) {
|
||||
this.val1 = res.code
|
||||
this.status = res.point_location
|
||||
}
|
||||
} catch (e) {
|
||||
this.val1 = ''
|
||||
this.status = null
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.status = null
|
||||
this.disabled = false
|
||||
},
|
||||
async _takeConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await takeConfirm(this.val1)
|
||||
if (res.code === '200') {
|
||||
this.toEmpty()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
234
pages/outbound/produce-out-store-2nd.vue
Normal file
234
pages/outbound/produce-out-store-2nd.vue
Normal file
@@ -0,0 +1,234 @@
|
||||
<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-8">
|
||||
<span class="filter_label">产线站点编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">出库单据编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16 zd-row relative">
|
||||
<link-scan
|
||||
:editValue="editValue"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
@linkDel="toDel"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">已选物料数</span>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<span class="filter_input" style="font-size: 34rpx; color: #ff6a00; font-weight: 700;">{{selectedNum}}</span>
|
||||
</view>
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">可选物料数</span>
|
||||
</view>
|
||||
<view class="zd-col-4">
|
||||
<span class="filter_input" style="font-size: 34rpx; color: #4e6ef2; font-weight: 700;">{{selectedNum !== null ? (9 - selectedNum) : null}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>选择</th>
|
||||
<th class="td_3"><view class="td_3">物料名称</view></th>
|
||||
<th>物料编码</th>
|
||||
<th>物料状态</th>
|
||||
<th>数量</th>
|
||||
<th>单位</th>
|
||||
<th>单据编码</th>
|
||||
<th>载具号</th>
|
||||
<th>批次号</th>
|
||||
<th><view style="width: 150px;">出库进度</view></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>
|
||||
<uni-icons v-show="e.status === '1'" @tap="toCheck(e)" :type="e.checked ? 'checkbox' : 'circle'" size="24" color="#4e6ef2"></uni-icons>
|
||||
<uni-icons v-show="e.status !== '1'" type="smallcircle-filled" size="24" color="#fff"></uni-icons>
|
||||
</td>
|
||||
<td class="td_3">{{e.material_name}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_status}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.unit_name}}</td>
|
||||
<td>{{e.prd_ppbom_no}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td style="width: 150px;line-height: 28rpx;white-space: unset;">{{e.remark}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': checkData.length === 0}" :disabled="disabled" @tap="_ctuOutConfirm">出库物料提交</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import LinkScan from '@/components/LinkScan.vue'
|
||||
import {queryTargetPoint, getCtuOrderList, ctuOutConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
LinkScan
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
editValue: [], // 出库单据编号集合
|
||||
selectedNum: null, // 已选物料数
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
checkData: []
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange1 (e) {
|
||||
this._queryTargetPoint(e)
|
||||
},
|
||||
// 产线站点编码验证
|
||||
async _queryTargetPoint (e) {
|
||||
try {
|
||||
let res = await queryTargetPoint(e)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.val1 = res.site_code
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.val1 = ''
|
||||
}
|
||||
} catch (e) {
|
||||
this.val1 = ''
|
||||
}
|
||||
},
|
||||
handleChange2 (e) {
|
||||
if (this.editValue.indexOf(e) === -1) {
|
||||
this._getCtuOrderList(e)
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '出库单据编号已存在',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.val2 = null
|
||||
}, 300)
|
||||
},
|
||||
async _getCtuOrderList (e) {
|
||||
try {
|
||||
let res = await getCtuOrderList(this.val1, e)
|
||||
if (res.code === '200') {
|
||||
this.checkData = []
|
||||
for (let i = 0; i < res.content.length; i++) {
|
||||
if (this.selectedNum < 9 && res.content[i].status === '1') {
|
||||
this.$set(res.content[i], 'checked', true)
|
||||
this.selectedNum += 1
|
||||
} else {
|
||||
this.$set(res.content[i], 'checked', false)
|
||||
}
|
||||
}
|
||||
this.dataList = [...this.dataList, ...res.content]
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
this.checkData = arr
|
||||
if (res.data !== null) {
|
||||
this.editValue.push(res.data)
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
if (!e.checked && this.selectedNum >= 9) {
|
||||
return
|
||||
} else if (!e.checked && this.selectedNum < 9) {
|
||||
e.checked = true
|
||||
this.selectedNum++
|
||||
} else if (e.checked) {
|
||||
e.checked = false
|
||||
this.selectedNum--
|
||||
}
|
||||
let arr = this.dataList.filter(el => el.checked === true)
|
||||
this.checkData = arr
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.selectedNum = null
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
this.checkData = []
|
||||
this.editValue = []
|
||||
},
|
||||
async _ctuOutConfirm () {
|
||||
this.disabled = true
|
||||
if (this.checkData.length === 0) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await ctuOutConfirm(this.val1, this.editValue.toString(), this.checkData)
|
||||
if (res.code === '200') {
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toDel () {
|
||||
this.editValue = []
|
||||
this.selectedNum = null
|
||||
this.dataList = []
|
||||
this.checkData = []
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
152
pages/outbound/shelf-bind-2nd.vue
Normal file
152
pages/outbound/shelf-bind-2nd.vue
Normal file
@@ -0,0 +1,152 @@
|
||||
<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-8">
|
||||
<span class="filter_label">地面站点编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-8">
|
||||
<span class="filter_label">货架编号</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{e.code}}</td>
|
||||
<td>{{e.name}}</td>
|
||||
<td>{{e.remark}}</td>
|
||||
<td>{{$getStatusText({ '00': '未锁定', '10': '入库锁', '20': '出库锁' }, e.lock_type)}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_pointUnbind">CTU站点解绑</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type === '00'" class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('1')">货架绑定</button>
|
||||
<button v-if="dataList.length > 0 && dataList[0].lock_type !== '00'" class="zd-col-8 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="toSure('0')">货架解绑</button>
|
||||
<button v-if="!dataList.length" class="zd-col-8 button-primary button-info">货架绑定/解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getPointStatus, bindOrUnbind, pointUnbind} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
disabled: false,
|
||||
dataList: []
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getPointStatus(e)
|
||||
}
|
||||
},
|
||||
async _getPointStatus (e) {
|
||||
try {
|
||||
let res = await getPointStatus(e)
|
||||
this.dataList = []
|
||||
this.dataList.push(res)
|
||||
this.val2 = res.vehicle_code
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
this.dataList = []
|
||||
},
|
||||
toSure (type) {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
this._bindOrUnbind(type)
|
||||
},
|
||||
async _bindOrUnbind (type) {
|
||||
try {
|
||||
let res = await bindOrUnbind(this.val1, this.val2, type)
|
||||
if (res.code === '200') {
|
||||
this._getPointStatus(this.val1)
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _pointUnbind () {
|
||||
try {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let res = await pointUnbind(this.val1, this.val2)
|
||||
if (res.code === '200') {
|
||||
this._getPointStatus(this.val1)
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
176
pages/outbound/stock-list.vue
Normal file
176
pages/outbound/stock-list.vue
Normal file
@@ -0,0 +1,176 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- 库存出库 -->
|
||||
<nav-bar :title="title" :inner="true"></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-17 filter_select">
|
||||
<uni-data-select v-model="index" :localdata="options"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val3">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">仓位编码</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val4">
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">物料批次</span>
|
||||
</view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<input type="text" class="filter_input" v-model="val2">
|
||||
</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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.stor_code}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</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-5 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-8 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId}" @tap="toSure">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {structattrPage} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
options: [{value: 'FStockPallet', text: '托盘库'}, {value: 'FStockId', text: '料箱库'}],
|
||||
index: 'FStockId',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this._structattrPage()
|
||||
},
|
||||
async _structattrPage () {
|
||||
let res = await structattrPage(this.pageNum + '', this.pageSize + '', this.index, this.val1, true, this.val2, this.val3, this.val4)
|
||||
if (res.code === '200') {
|
||||
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._structattrPage()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.id ? '' : e.id
|
||||
this.pkObj = this.pkId === e.id ? e : {}
|
||||
},
|
||||
toEmpty () {
|
||||
this.index = ''
|
||||
this.val1 = ''
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this.pkId = ''
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
</style>
|
||||
132
pages/outbound/stock-out-store.vue
Normal file
132
pages/outbound/stock-out-store.vue
Normal file
@@ -0,0 +1,132 @@
|
||||
<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">
|
||||
<input type="text" class="filter_input" v-model="val1" @tap="toJump">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="JSON.stringify(currentData) !== '{}'" class="zd_wrapper">
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-7"><span class="filter_label">库位</span></view>
|
||||
<view class="zd-col-17"><span class="filter_input">{{currentData.struct_code}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-7"><span class="filter_label">载具编码</span></view>
|
||||
<view class="zd-col-17"><span class="filter_input">{{currentData.vehicle_code}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-7"><span class="filter_label">物料编码</span></view>
|
||||
<view class="zd-col-17"><span class="filter_input">{{currentData.material_code}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom filter_input_disabled">
|
||||
<view class="zd-col-7"><span class="filter_label">批号</span></view>
|
||||
<view class="zd-col-17"><span class="filter_input">{{currentData.pcsn}}</span></view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7"><span class="filter_label">车间</span></view>
|
||||
<view class="zd-col-17 filter_select">
|
||||
<uni-data-select v-model="currentData.product_area" :localdata="options1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row">
|
||||
<view class="zd-col-7"><span class="filter_label">出库库存</span></view>
|
||||
<view class="zd-col-17">
|
||||
<input type="number" v-model="currentData.qty" class="filter_input">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="toEmpty">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': JSON.stringify(currentData) === '{}'}" :disabled="disabled" @tap="_outStorageMaterConfirm">确认出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {outStorageMaterConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
currentData: {},
|
||||
options1: [{value: 'A1', text: 'A1车间'}, {value: 'A2', text: 'A2车间'}, {value: 'A3', text: 'A3车间'}],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.currentData = this.$store.getters.publicObj
|
||||
if (this.currentData.stor_code === 'FStockPallet') {
|
||||
this.val1 = '托盘库'
|
||||
} else if (this.currentData.stor_code === 'FStockId') {
|
||||
this.val1 = '料箱库'
|
||||
}
|
||||
if (!this.currentData.product_area) {
|
||||
this.currentData.product_area = 'A1'
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toJump () {
|
||||
uni.navigateTo({
|
||||
url: '/pages/outbound/stock-list?title=库存列表'
|
||||
})
|
||||
},
|
||||
async _outStorageMaterConfirm () {
|
||||
this.disabled = true
|
||||
if (JSON.stringify(this.currentData) === '{}') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
let obj = Object.assign(this.currentData, {now_assign_qty: this.currentData.qty})
|
||||
try {
|
||||
let res = await outStorageMaterConfirm(obj)
|
||||
if (res.code === '200') {
|
||||
this.toEmpty()
|
||||
}
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
toEmpty () {
|
||||
this.val1 = ''
|
||||
this.currentData = {}
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
@import '../../common/style/mixin.styl';
|
||||
.button-primary, .button-default
|
||||
_fj(center)
|
||||
font-size 26rpx
|
||||
height 88rpx
|
||||
line-height 30rpx
|
||||
</style>
|
||||
115
pages/outbound/tray-out-store.vue
Normal file
115
pages/outbound/tray-out-store.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<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="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">出库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<input type="number" class="filter_input" v-model="qty">
|
||||
</view>
|
||||
</view>
|
||||
<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="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-6 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-16 button-primary" :class="{'button-info': !qty || !index1 || !index2}" :disabled="disabled" @tap="_pdaPalletIostorinvOut">托盘库出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {targetPoint, pdaPalletIostorinvOut} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options1: [{text:'堆叠托盘', value:'11111111'},{text:'料箱',value: '22222222'},{text:'白色EPH',value: '33333333'}],
|
||||
index1: '',
|
||||
qty: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._targetPoint()
|
||||
},
|
||||
methods: {
|
||||
selectChange1 (e) {
|
||||
this.index1 = e
|
||||
},
|
||||
selectChange2 (e) {
|
||||
this.index2 = e
|
||||
},
|
||||
async _targetPoint () {
|
||||
let res = await targetPoint()
|
||||
this.options2 = [...res]
|
||||
this.options2.map(el => {
|
||||
this.$set(el, 'text', el.label)
|
||||
})
|
||||
},
|
||||
clearUp () {
|
||||
this.qty = ''
|
||||
this.index1 = ''
|
||||
this.index2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _pdaPalletIostorinvOut () {
|
||||
this.disabled = true
|
||||
if (!this.qty || !this.index1 || !this.index2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaPalletIostorinvOut(this.index1, this.qty, this.index2)
|
||||
if (res.code === '200') {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
}
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user