管芯备货
This commit is contained in:
153
pages/SecondPhase/slitting/TubeStock.vue
Normal file
153
pages/SecondPhase/slitting/TubeStock.vue
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- <nav-bar title="管芯备货"></nav-bar> -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label">区域</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="filter_item">
|
||||||
|
<view class="filter_label_wraper">
|
||||||
|
<span class="filter_label">管芯规格</span>
|
||||||
|
</view>
|
||||||
|
<view class="filter_input_wraper">
|
||||||
|
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>序号</th>
|
||||||
|
<th class="th_2">托盘号</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>{{Number(i) + 1}}</td>
|
||||||
|
<td class="td_2">{{e.vehicle_code}}</td>
|
||||||
|
<td>{{e.material_code}}</td>
|
||||||
|
<td>{{e.material_name}}</td>
|
||||||
|
<td>{{e.total_num}}</td>
|
||||||
|
<td>{{e.point_code}}</td>
|
||||||
|
<td>{{e.product_area}}</td>
|
||||||
|
<td>{{e.product_area_name}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submitbar">
|
||||||
|
<button class="zd-col-5 btn-submit btn-default letter-30" @tap="clearUp">清空</button>
|
||||||
|
<button class="zd-col-8 btn-submit btn-success letter-30" :class="{'btn-info': !index2}" :disabled="disabled" @tap="_moveStock">备货</button>
|
||||||
|
<button class="zd-col-8 btn-submit btn-success" @tap="_showPapervehicleView">刷新</button>
|
||||||
|
</view>
|
||||||
|
<up-top ref="UT" :scrollTop="top"></up-top>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {showPapervehicleView, moveStock, queryProductArea, queryPaperMaterial} from '@/utils/getData4.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
top: 0,
|
||||||
|
options1: [],
|
||||||
|
index1: '',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
|
disabled: false,
|
||||||
|
dataList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
this._queryProductArea()
|
||||||
|
this._queryPaperMaterial()
|
||||||
|
this._showPapervehicleView()
|
||||||
|
},
|
||||||
|
onPageScroll(e) {
|
||||||
|
this.$refs.UT.topData(e.scrollTop)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 区域下拉框查询 */
|
||||||
|
async _queryProductArea () {
|
||||||
|
let res = await queryProductArea()
|
||||||
|
this.options1 = [...res.data]
|
||||||
|
},
|
||||||
|
selectChange1(e) {
|
||||||
|
this.index1 = e
|
||||||
|
if (e) {
|
||||||
|
this._queryPaperMaterial(e)
|
||||||
|
} else {
|
||||||
|
this.index2 = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 管芯规格下拉框 */
|
||||||
|
async _queryPaperMaterial (e) {
|
||||||
|
let res = await queryPaperMaterial(e)
|
||||||
|
this.options2 = [...res.data]
|
||||||
|
},
|
||||||
|
selectChange2(e) {
|
||||||
|
this.index2 = e
|
||||||
|
},
|
||||||
|
async _paperQueryPaperMaterial () {
|
||||||
|
let res = await paperQueryPaperMaterial()
|
||||||
|
this.dataList = [...res.rows]
|
||||||
|
},
|
||||||
|
async _moveStock () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.index1 || !this.index2) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await moveStock(this.index1)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.disabled = false
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
clearUp () {
|
||||||
|
this.index1 = ''
|
||||||
|
this.index2 = ''
|
||||||
|
this.options2 = []
|
||||||
|
this.upL = ''
|
||||||
|
this.upR = ''
|
||||||
|
this.lowL = ''
|
||||||
|
this.lowR = ''
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _showPapervehicleView () {
|
||||||
|
let res = await showPapervehicleView(this.index1, this.index2)
|
||||||
|
if (res) {
|
||||||
|
this.dataList = [...res]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1 +1,35 @@
|
|||||||
// 新增接口
|
import request from './request.js'
|
||||||
|
/**
|
||||||
|
* add
|
||||||
|
*/
|
||||||
|
// 管芯备货-查询管芯库存
|
||||||
|
export const showPapervehicleView = (area, code) => request({
|
||||||
|
url:'api/pda/stockingivt/showPapervehicleView',
|
||||||
|
data: {
|
||||||
|
product_area: area,
|
||||||
|
material_code: code,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 管芯备货-备货
|
||||||
|
export const moveStock = (vcode, mcode, mname, tnum, pcode, parea, pareaname) => request({
|
||||||
|
url:'api/pda/stockingivt/moveStock',
|
||||||
|
data: {
|
||||||
|
vehicle_code: vcode,
|
||||||
|
material_code: mcode,
|
||||||
|
material_name: mname,
|
||||||
|
total_num: tnum,
|
||||||
|
point_code: pcode,
|
||||||
|
product_area: parea,
|
||||||
|
product_area_name: pareaname
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 管芯备货-区域下拉框
|
||||||
|
export const queryProductArea = () => request({
|
||||||
|
url:'api/pda/stockingivt/queryProductArea',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 管芯备货-管芯规格下拉框
|
||||||
|
export const queryPaperMaterial = () => request({
|
||||||
|
url:'api/pda/paper/queryPaperMaterial',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user