init
This commit is contained in:
216
pages/Material/dlx-move-store.vue
Normal file
216
pages/Material/dlx-move-store.vue
Normal file
@@ -0,0 +1,216 @@
|
||||
<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">
|
||||
<search-box
|
||||
placeholder="扫码或输入点位/载具号"
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
@handleDel="handleDel"
|
||||
/>
|
||||
</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>重量(kg)</th>
|
||||
<th>生产日期</th>
|
||||
<th>供应商编码</th>
|
||||
<th>供应商名称</th>
|
||||
<th>烘干次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<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">
|
||||
<search-box
|
||||
placeholder="扫码或输入点位/载具号"
|
||||
v-model="val2"
|
||||
@handleChange="handleChange2"
|
||||
@handleDel="handleDel2"
|
||||
/>
|
||||
</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>重量(kg)</th>
|
||||
<th>生产日期</th>
|
||||
<th>供应商编码</th>
|
||||
<th>供应商名称</th>
|
||||
<th>烘干次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList2" :key="i">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 button-primary" :class="{'button-info': !dataList.length || !dataList2.length}" :disabled="disabled" @tap="_materialBoxMoveConfirm">确认移库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getMoveDocumentInfo, materialBoxMoveConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
dataList2: [],
|
||||
mdid: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleDel() {
|
||||
this.dataList = []
|
||||
},
|
||||
handleDel2() {
|
||||
this.dataList2 = []
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.dataList = []
|
||||
this._getMoveDocumentInfo()
|
||||
}
|
||||
},
|
||||
handleChange2 (e) {
|
||||
if (e && !this.mdid && this.dataList.length) {
|
||||
this.dataList2 = []
|
||||
this._getMoveDocumentInfo2()
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.dataList = []
|
||||
this.dataList2 = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _getMoveDocumentInfo () {
|
||||
try {
|
||||
let res = await getMoveDocumentInfo('1', this.val1, this.mdid)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
this.mdid = this.dataList[0].moveinvdtl_id
|
||||
if (this.dataList.length && this.mdid) {
|
||||
this._getMoveDocumentInfo2()
|
||||
}
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
async _getMoveDocumentInfo2 () {
|
||||
try {
|
||||
let res = await getMoveDocumentInfo('2', this.val2, this.mdid)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList2 = [...res.data]
|
||||
} else {
|
||||
this.dataList2 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList2 = []
|
||||
}
|
||||
},
|
||||
async _materialBoxMoveConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.dataList.length || !this.dataList2.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await materialBoxMoveConfirm(this.dataList, this.dataList2)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
156
pages/Material/dlx-out-store.vue
Normal file
156
pages/Material/dlx-out-store.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<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-6">
|
||||
<span class="filter_label">日期</span>
|
||||
</view>
|
||||
<view class="zd-col-18 filter_picker">
|
||||
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
|
||||
<view class="uni-input">{{date}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">单据</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="keyword" @focus="handleFocus">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="_getIoDisDocumentInfo">查询</button>
|
||||
</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>重量(kg)</th>
|
||||
<th>出库重量(kg)</th>
|
||||
<th>生产日期</th>
|
||||
<th>供应商编码</th>
|
||||
<th>供应商名称</th>
|
||||
<th>烘干次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.iostorinv_id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.bill_code}}</td>
|
||||
<td>{{e.bill_type_name}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.total_qty}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 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 {getDate} from '@/utils/utils.js'
|
||||
import {getIoDisDocumentInfo} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
const currentDate = getDate({
|
||||
format: true
|
||||
})
|
||||
return {
|
||||
title: '',
|
||||
keyword: null,
|
||||
date: currentDate,
|
||||
dataList: [],
|
||||
statusMap: {
|
||||
'1001': '领料出库',
|
||||
'1002': '质检出库',
|
||||
'1003': '退货出库',
|
||||
'1004': '烘干出库',
|
||||
'1009': '手工出库'
|
||||
},
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
startDate() {
|
||||
return getDate('start');
|
||||
},
|
||||
endDate() {
|
||||
return getDate('end');
|
||||
}
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._getIoDisDocumentInfo()
|
||||
},
|
||||
methods: {
|
||||
handleFocus () {
|
||||
this.keyword = null
|
||||
},
|
||||
bindDateChange: function(e) {
|
||||
this.date = e.detail.value
|
||||
},
|
||||
async _getIoDisDocumentInfo () {
|
||||
try {
|
||||
let res = await getIoDisDocumentInfo(this.keyword, this.date, '1')
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = res.data.map(item => ({
|
||||
...item,
|
||||
bill_type_name: this.statusMap[item.bill_type] || ''
|
||||
}))
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.iostorinv_id ? '' : e.iostorinv_id
|
||||
this.pkObj = this.pkId === e.iostorinv_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/hw-out-store?title=货位出库'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
122
pages/Material/dlx-pan-store.vue
Normal file
122
pages/Material/dlx-pan-store.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<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-14">
|
||||
<input type="text" placeholder="输入盘库单号" class="filter_input" v-model="keyword">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="_getCheckDocumentInfo">查询</button>
|
||||
</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>重量(kg)</th>
|
||||
<th>盘点重量(kg)</th>
|
||||
<th>生产日期</th>
|
||||
<th>供应商编码</th>
|
||||
<th>供应商名称</th>
|
||||
<th>烘干次数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.check_id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{i+1}}</td>
|
||||
<td>{{e.check_result_name}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.base_qty}}</td>
|
||||
<td>{{e.fac_qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 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 {getDate} from '@/utils/utils.js'
|
||||
import {getCheckDocumentInfo} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
keyword: '',
|
||||
dataList: [],
|
||||
statusMap: {
|
||||
'10': '生成',
|
||||
'20': '盘点中',
|
||||
'99': '完成'
|
||||
},
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._getCheckDocumentInfo()
|
||||
},
|
||||
methods: {
|
||||
async _getCheckDocumentInfo () {
|
||||
try {
|
||||
let res = await getCheckDocumentInfo(this.keyword, '1')
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = res.data.map(item => ({
|
||||
...item,
|
||||
check_result_name: this.statusMap[item.check_result] || ''
|
||||
}))
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.check_id ? '' : e.check_id
|
||||
this.pkObj = this.pkId === e.check_id ? e : {}
|
||||
},
|
||||
toSure () {
|
||||
if (this.pkId) {
|
||||
this.$store.dispatch('setPublicObj', this.pkObj)
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/hw-check?title=货位盘点'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
151
pages/Material/hw-check.vue
Normal file
151
pages/Material/hw-check.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
<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-6">
|
||||
<span class="filter_label filter_input_disabled">单据号</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.check_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">点位/载具</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">点位</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.struct_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">物料编码</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">库存数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="kcqty" class="filter_input" disabled>
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">盘点数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="materialData.fac_qty" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-24 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_materialBoxInventoryConfirm">确认盘点</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getInvInfoQty, materialBoxInventoryConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
kcqty: '',
|
||||
materialData: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.materialData = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getInvInfoQty()
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _getInvInfoQty () {
|
||||
let res = await getInvInfoQty(this.val1)
|
||||
this.kcqty = res.data.ivt_qty
|
||||
this.materialData.qty1 = res.data.ivt_qty
|
||||
this.materialData.fac_qty = this.kcqty
|
||||
},
|
||||
async _materialBoxInventoryConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.materialData.base_qty = this.kcqty
|
||||
this.materialData.storagevehicle_code = this.val1
|
||||
let res = await materialBoxInventoryConfirm(this.materialData)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/dlx-pan-store?title=大料箱盘库'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
215
pages/Material/hw-out-store.vue
Normal file
215
pages/Material/hw-out-store.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<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-6">
|
||||
<span class="filter_label filter_input_disabled">单据号</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.bill_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">点位/载具</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">点位</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.struct_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">出库物料</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_code" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">物料名称</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="materialData.material_name" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">库存数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="kcqty" class="filter_input" disabled>
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">出库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="materialData.plan_qty" class="filter_input" disabled>
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">配送载具</span>
|
||||
</view>
|
||||
<view class="zd-col-17">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': !val1}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
||||
<button class="zd-col-9 button-primary" :class="{'button-info': !val1 || kcqty === ''}" :disabled="disabled" @tap="_materialBoxOutConfirm">确认出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getInvInfoQty, materialBoxOutConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
kcqty: '',
|
||||
materialData: {},
|
||||
// suppData: {},
|
||||
disabled: false,
|
||||
disabled1: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.materialData = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.kcqty = ''
|
||||
this.materialData = {}
|
||||
this.disabled = false
|
||||
},
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this._getInvInfoQty()
|
||||
}
|
||||
},
|
||||
async _getInvInfoQty () {
|
||||
let res = await getInvInfoQty(this.val1)
|
||||
this.kcqty = res.data.ivt_qty
|
||||
this.materialData.qty1 = res.data.ivt_qty
|
||||
},
|
||||
async _materialBoxOutConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || this.kcqty === '') {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await materialBoxOutConfirm(this.materialData.iostorinvdis_id, this.materialData.storagevehicle_code, this.materialData.struct_code, this.val2, this.materialData.plan_qty)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/dlx-out-store?title=大料箱出库'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
labelPrint () {
|
||||
this.disabled1 = true
|
||||
let data = Object.assign({}, this.materialData, this.suppData, {pcsn: this.pcsn, produce_time: this.date, bake_num: this.num})
|
||||
this.toPrint(data)
|
||||
},
|
||||
toPrint (data) {
|
||||
let iparr = this.$store.getters.printUrl.split(":")
|
||||
let printUrl = iparr[1].slice(2)
|
||||
let LODOP = getCLodop();
|
||||
if (!(LODOP.webskt && LODOP.webskt.readyState === 1)) {
|
||||
uni.showToast({
|
||||
title: '当前配置ip:' + printUrl + '网络不通,请检查',
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
LODOP.SET_LICENSES('浙江省烟草专卖局(公司)', 'C0C4A46A3A0D1F526D426018D9F11921', '', '')
|
||||
// 更换为打印服务器ip 不需要加前缀
|
||||
LODOP.PRINT_INIT(null, printUrl);
|
||||
// 打印机序号 规则为打印服务器打印机列表倒数从0开始 -1为默认打印机
|
||||
LODOP.SET_PRINTER_INDEX(-1);
|
||||
// 设置打印纸大小
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '130mm', '67mm', '');
|
||||
LODOP.ADD_PRINT_RECT('1mm', '3mm', '124mm', '61mm', 0, 1);
|
||||
LODOP.SET_PRINT_STYLE('FontSize', 12);
|
||||
LODOP.SET_PRINT_STYLE('Bold', 1);
|
||||
LODOP.ADD_PRINT_BARCODE('2mm', '4mm', '33mm', '33mm', 'QRCode', data.material_code + '##' + data.supp_code);
|
||||
LODOP.ADD_PRINT_TEXT('5mm', '35mm', '80mm', '15mm', '物料编码:' + data.material_code);
|
||||
LODOP.ADD_PRINT_TEXT('12mm', '35mm', '80mm', '15mm', '物料名称:' + data.material_name);
|
||||
LODOP.ADD_PRINT_TEXT('19mm', '35mm', '80mm', '15mm', ' 规格:' + data.material_spec);
|
||||
LODOP.ADD_PRINT_TEXT('26mm', '35mm', '80mm', '15mm', ' 型号:' + data.material_model);
|
||||
LODOP.ADD_PRINT_TEXT('34mm', '5mm', '80mm', '15mm', ' 执行标准:' + data.execution_stand)
|
||||
LODOP.ADD_PRINT_TEXT('34mm', '59mm', '80mm', '15mm', '有效期(天):' + data.quality_time)
|
||||
LODOP.ADD_PRINT_TEXT('41mm', '5mm', '80mm', '15mm', ' 批次:' + data.pcsn)
|
||||
LODOP.ADD_PRINT_TEXT('41mm', '59mm', '80mm', '15mm', ' 生产日期:' + data.produce_time)
|
||||
LODOP.ADD_PRINT_TEXT('48mm', '5mm', '80mm', '15mm', '供应商编码:' + data.supp_code)
|
||||
LODOP.ADD_PRINT_TEXT('48mm', '59mm', '80mm', '15mm', '供应商名称:' + data.supp_name)
|
||||
LODOP.ADD_PRINT_TEXT('55mm', '5mm', '80mm', '15mm', ' 烘干次数:' + data.bake_num)
|
||||
// LODOP.PRINT();
|
||||
LODOP.PREVIEW()
|
||||
uni.showToast({
|
||||
title: '打印成功',
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
116
pages/Material/kzj-in-store.vue
Normal file
116
pages/Material/kzj-in-store.vue
Normal file
@@ -0,0 +1,116 @@
|
||||
<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-17">
|
||||
<search-box
|
||||
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">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</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="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_vehicleIn">呼叫入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {querySectCode, vehicleIn} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._querySectCode()
|
||||
},
|
||||
methods: {
|
||||
async _querySectCode () {
|
||||
try {
|
||||
let res = await querySectCode()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _vehicleIn () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.index) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleIn(this.val2, this.val1, this.index)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
112
pages/Material/kzj-inout-store.vue
Normal file
112
pages/Material/kzj-inout-store.vue
Normal file
@@ -0,0 +1,112 @@
|
||||
<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-17">
|
||||
<search-box
|
||||
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">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<!-- <button class="zd-col-6 button-default" @tap="clearUp">清空</button> -->
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_bindEmptyVehicle">绑定</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_unBindEmptyVehicle">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {bindEmptyVehicle, unBindEmptyVehicle} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _bindEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await bindEmptyVehicle(this.val1, this.val2)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
async _unBindEmptyVehicle () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await unBindEmptyVehicle(this.val1, this.val2)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
144
pages/Material/kzj-out-store.vue
Normal file
144
pages/Material/kzj-out-store.vue
Normal file
@@ -0,0 +1,144 @@
|
||||
<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-17">
|
||||
<search-box
|
||||
v-model="val2"
|
||||
/>
|
||||
</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="index" :localdata="options" @change="selectChange"></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-24 filter_select">
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></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">
|
||||
<NumberInput v-model="qty" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !qty || !val2 || !index || !index2}" :disabled="disabled" @tap="_vehicleOut">呼叫出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import NumberInput from '@/components/NumberInput.vue'
|
||||
import {queryVehicleType} from '@/utils/getData2.js'
|
||||
import {querySectCode, vehicleOut} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox,
|
||||
NumberInput
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
qty: 1,
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._queryVehicleType()
|
||||
this._querySectCode()
|
||||
},
|
||||
methods: {
|
||||
async _queryVehicleType () {
|
||||
try {
|
||||
let res = await queryVehicleType()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
async _querySectCode () {
|
||||
try {
|
||||
let res = await querySectCode()
|
||||
if (res) {
|
||||
this.options2 = res.data
|
||||
} else {
|
||||
this.options2 = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options2 = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index2 = e
|
||||
},
|
||||
clearUp () {
|
||||
this.qty = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.index2 = ''
|
||||
this.disabled = false
|
||||
},
|
||||
async _vehicleOut () {
|
||||
this.disabled = true
|
||||
if (!this.qty || !this.val2 || !this.index || !this.index2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await vehicleOut(this.qty, this.val2, this.index, this.index2)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
this.clearUp()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
171
pages/Material/lx-in-store.vue
Normal file
171
pages/Material/lx-in-store.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<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 class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
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-24 filter_select">
|
||||
<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>重量(kg)</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>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_model}}</td>
|
||||
<td>{{e.quality_time_day}}</td>
|
||||
<td>{{e.execution_stand}}</td>
|
||||
<td>{{['', '待检', '合格', '不合格'][Number(e.quality_type)]}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !index || !val2 || !val1 || !dataList.length}" :disabled="disabled" @tap="_materialBoxInConfirm">确认入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {largeMaterialBoxgetType, getInGroupInfo, materialBoxInConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._largeMaterialBoxgetType()
|
||||
},
|
||||
methods: {
|
||||
async _largeMaterialBoxgetType () {
|
||||
try {
|
||||
let res = await largeMaterialBoxgetType('ST_INV_IN_TYPE')
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this._getInGroupInfo()
|
||||
},
|
||||
async _getInGroupInfo () {
|
||||
try {
|
||||
let res = await getInGroupInfo(this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _materialBoxInConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.index || !this.val2 || !this.val1 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await materialBoxInConfirm(this.index, this.val2, this.val1, this.dataList)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
168
pages/Material/mater-in-store.vue
Normal file
168
pages/Material/mater-in-store.vue
Normal file
@@ -0,0 +1,168 @@
|
||||
<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 class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
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-24 filter_select">
|
||||
<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>重量(kg)</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>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_mode}}</td>
|
||||
<td>{{e.quality_time}}</td>
|
||||
<td>{{e.execution_stand}}</td>
|
||||
<td>{{['', '待检', '合格', '不合格'][Number(e.quality_type)]}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="toAddMater">加入物料</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {largeMaterialBoxgetType, getInGroupInfo, materialBoxInConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
created () {
|
||||
this._largeMaterialBoxgetType()
|
||||
},
|
||||
methods: {
|
||||
async _largeMaterialBoxgetType () {
|
||||
try {
|
||||
let res = await largeMaterialBoxgetType('ST_INV_IN_TYPE')
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this._getInGroupInfo()
|
||||
},
|
||||
async _getInGroupInfo () {
|
||||
try {
|
||||
let res = await getInGroupInfo(this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
toAddMater () {
|
||||
if (!this.dataList.length){
|
||||
return
|
||||
}
|
||||
this.$store.dispatch('setPublicArr', this.dataList)
|
||||
let fobj = {
|
||||
bill_type: this.index,
|
||||
struct_code: this.val2,
|
||||
storagevehicle_code: this.val1
|
||||
}
|
||||
this.$store.dispatch('setPublicObj', fobj)
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/mater-save?title=物料维护'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
189
pages/Material/mater-save.vue
Normal file
189
pages/Material/mater-save.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<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-6">
|
||||
<span class="filter_label">入库数量</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="qty" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">加入物料</span>
|
||||
</view>
|
||||
<view class="zd-col-14">
|
||||
<input type="text" placeholder="输入物料关键字" class="filter_input" v-model="val1">
|
||||
</view>
|
||||
<button class="mini-btn" type="primary" size="mini" @tap="searchList">查询</button>
|
||||
</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.material_id === pkId}" @tap="toCheck(e)">
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_model}}</td>
|
||||
<td>{{e.quality_time}}</td>
|
||||
<td>{{e.execution_stand}}</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-24 button-primary" :class="{'button-info': !pkId || !qty}" @tap="_materialInConfirm">确认入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getMaterialInfo, materialInConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fobj: {},
|
||||
tableData: [],
|
||||
title: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
qty: '',
|
||||
reload: false,
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: '查看更多',
|
||||
contentrefresh: '加载中',
|
||||
contentnomore: '没有更多'
|
||||
},
|
||||
totalCount: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this.type = options.type
|
||||
},
|
||||
onShow () {
|
||||
if (this.$store.getters.publicObj !== '') {
|
||||
this.fobj = this.$store.getters.publicObj
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
}
|
||||
if (this.$store.getters.publicArr.length) {
|
||||
this.tableData = this.$store.getters.publicArr
|
||||
this.$store.dispatch('setpublicArr', '')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleFocus () {
|
||||
this.val1 = null
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this.pageNum = 1
|
||||
this._getMaterialInfo()
|
||||
},
|
||||
async _getMaterialInfo () {
|
||||
let res = await getMaterialInfo(this.val1)
|
||||
this.dataList = res.data
|
||||
// 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._getMaterialInfo()
|
||||
}, 1000)
|
||||
} else { //停止加载
|
||||
this.status = 'noMore'
|
||||
}
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.material_id ? '' : e.material_id
|
||||
this.pkObj = this.pkId === e.material_id ? e : {}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.qty = ''
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _materialInConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.pkId || !this.qty) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
this.pkObj.material_qty = this.qty
|
||||
let res = await materialInConfirm(this.fobj.bill_type, this.fobj.struct_code, this.fobj.storagevehicle_code, this.tableData, this.pkObj)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
this.$store.dispatch('setPublicObj', '')
|
||||
this.$store.dispatch('setpublicArr', '')
|
||||
uni.navigateTo({
|
||||
url: '/pages/Material/mater-in-store?title=物料入库'
|
||||
})
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.filter_picker {
|
||||
text-align: center
|
||||
}
|
||||
</style>
|
||||
172
pages/Material/tuiku-confirm.vue
Normal file
172
pages/Material/tuiku-confirm.vue
Normal file
@@ -0,0 +1,172 @@
|
||||
<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">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
@handleChange="handleChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">所属机台</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="val2" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label filter_input_disabled">工单</span>
|
||||
</view>
|
||||
<view class="zd-col-18">
|
||||
<input type="text" class="filter_input filter_input_disabled" v-model="val3" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-6">
|
||||
<span class="filter_label">剩余物料</span>
|
||||
</view>
|
||||
<view class="zd-col-16">
|
||||
<input type="number" v-model="val4" class="filter_input">
|
||||
</view>
|
||||
<view class="zd-col-2"><span class="filter_unit">KG</span></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>重量(kg)</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>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_model}}</td>
|
||||
<td>{{e.material_model}}</td>
|
||||
<td>{{e.execution_stand}}</td>
|
||||
<td>{{['', '待检', '合格', '不合格'][Number(e.quality_type)]}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val3 || !val4 || !dataList.length}" :disabled="disabled" @tap="_returnConfirm">确认退回</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {getBomMaterDtl, returnConfirm} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
materialData: {},
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
if (e) {
|
||||
this.searchList()
|
||||
}
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this._getBomMaterDtl()
|
||||
},
|
||||
async _getBomMaterDtl () {
|
||||
try {
|
||||
let res = await getBomMaterDtl(this.val1)
|
||||
if (res && res.data.data.length > 0) {
|
||||
this.val2 = res.data.device_code
|
||||
this.val3 = res.data.bom_code
|
||||
this.dataList = res.data.data
|
||||
console.log(this.dataList, 666)
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _returnConfirm () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val3 || !this.val4 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await returnConfirm(this.val1, this.val3, this.val4, this.dataList)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
171
pages/Material/xlx-in-store.vue
Normal file
171
pages/Material/xlx-in-store.vue
Normal file
@@ -0,0 +1,171 @@
|
||||
<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 class="zd-row border-bottom">
|
||||
<view class="zd-col-7">
|
||||
<span class="filter_label">载具</span>
|
||||
</view>
|
||||
<view class="zd-col-24 filter_select">
|
||||
<search-box
|
||||
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-24 filter_select">
|
||||
<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>重量(kg)</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>{{i+1}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.produce_time}}</td>
|
||||
<td>{{e.supp_code}}</td>
|
||||
<td>{{e.supp_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_model}}</td>
|
||||
<td>{{e.quality_time_day}}</td>
|
||||
<td>{{e.execution_stand}}</td>
|
||||
<td>{{['', '待检', '合格', '不合格'][Number(e.quality_type)]}}</td>
|
||||
<td>{{e.bake_num}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
|
||||
<button class="zd-col-18 button-primary" :class="{'button-info': !index || !val2 || !dataList.length}" :disabled="disabled" @tap="_pdaSmallBoxconfirmIn">确认入库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryInBillType, queryGroupInfo, pdaSmallBoxconfirmIn} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
options: [],
|
||||
index: '',
|
||||
val1: '',
|
||||
val2: '',
|
||||
dataList: [],
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
this._queryInBillType()
|
||||
},
|
||||
methods: {
|
||||
async _queryInBillType () {
|
||||
try {
|
||||
let res = await queryInBillType()
|
||||
if (res) {
|
||||
this.options = res.data
|
||||
} else {
|
||||
this.options = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.options = []
|
||||
}
|
||||
},
|
||||
selectChange (e) {
|
||||
this.index = e
|
||||
},
|
||||
searchList () {
|
||||
this.dataList = []
|
||||
this._queryGroupInfo()
|
||||
},
|
||||
async _queryGroupInfo () {
|
||||
try {
|
||||
let res = await queryGroupInfo(this.val1)
|
||||
if (res && res.data.length > 0) {
|
||||
this.dataList = [...res.data]
|
||||
} else {
|
||||
this.dataList = []
|
||||
}
|
||||
} catch (e) {
|
||||
this.dataList = []
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.index = ''
|
||||
this.dataList = []
|
||||
this.disabled = false
|
||||
},
|
||||
async _pdaSmallBoxconfirmIn () {
|
||||
this.disabled = true
|
||||
if (!this.index || !this.val2 || !this.dataList.length) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pdaSmallBoxconfirmIn(this.index, this.val2, this.dataList)
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.clearUp()
|
||||
}
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user