原料出库
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right" @tap="toPhone"></view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right" @tap="toPhone"></view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
</view>
|
||||
<!-- <view class="zd-row">
|
||||
<view class="zd-col-5">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="uni-input">{{index1 !== '' ? options1[index1].text : ''}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="uni-icons icon_right" @tap="toPhone"></view>
|
||||
<view class="uni-icons icon_right"></view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
@@ -55,7 +55,7 @@
|
||||
<span class="filter_label">是否配盘</span>
|
||||
</view>
|
||||
<view class="zd-col-19 zd-row jcflexend">
|
||||
<switch :checked="isSwitchOn" color="#FFCC33" style="transform:scale(0.7)" @change="switch1Change"/>
|
||||
<switch :checked="isSwitchOn" color="#4e6ef2" style="transform:scale(0.7)" @change="switch1Change"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -76,7 +76,7 @@
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.vehicle_code === pkId}">
|
||||
<td class="fontcol1">{{e.vehicle_code}}</td>
|
||||
<td><view class="fontbg fontbg1">{{e.vehicle_type}}</view></td>
|
||||
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
|
||||
<td class="fontcol2">{{e.material_code}}</td>
|
||||
<td class="fontcol2">{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
@@ -112,7 +112,7 @@
|
||||
<tbody>
|
||||
<tr v-for="e in dataList1" :key="e.group_id" @click="toCheck(e)" :class="{'checked': e.checked}">
|
||||
<td class="fontcol1">{{e.vehicle_code}}</td>
|
||||
<td><view class="fontbg fontbg1">{{e.vehicle_type}}</view></td>
|
||||
<td><view class="fontbg">{{e.vehicle_type}}</view></td>
|
||||
<td class="fontcol2">{{e.material_code}}</td>
|
||||
<td class="fontcol2">{{e.material_name}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
@@ -165,7 +165,7 @@
|
||||
},
|
||||
created () {
|
||||
this._getVehicleType()
|
||||
this._getMaterial()
|
||||
this._queryMaterial()
|
||||
this._queryExistGroup()
|
||||
},
|
||||
methods: {
|
||||
@@ -178,7 +178,7 @@
|
||||
this.index1 = e.detail.value
|
||||
},
|
||||
/** 物料下拉框*/
|
||||
async _getMaterial (e) {
|
||||
async _queryMaterial (e) {
|
||||
let res = await queryMaterial(e)
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.material_id)
|
||||
|
||||
133
pages/manage/mater-out-storage.vue
Normal file
133
pages/manage/mater-out-storage.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<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-5">
|
||||
<span class="filter_label">物料</span>
|
||||
</view>
|
||||
<view class="zd-col-19 filter_select">
|
||||
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @change="selectChange"></zxz-uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row border-bottom">
|
||||
<view class="zd-col-5">
|
||||
<span class="filter_label">出库点位</span>
|
||||
</view>
|
||||
<view class="zd-col-19">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>点位编码</th>
|
||||
<th>点位名称</th>
|
||||
<th>载具编码</th>
|
||||
<th>物料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>配盘批次</th>
|
||||
<th>物料数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.point_code === pkId}">
|
||||
<td class="fontcol1">{{e.point_code}}</td>
|
||||
<td class="fontcol2">{{e.point_name}}</td>
|
||||
<td>{{e.vehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.pcsn}}</td>
|
||||
<td>{{e.material_qty}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-11 button-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId || !val1}" :disabled="disabled" @tap="_fullVehicleOut">出库</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryMaterial, queryLinkMaterial, fullVehicleOut} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
options1: [],
|
||||
index1: '',
|
||||
val1: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._queryMaterial()
|
||||
},
|
||||
methods: {
|
||||
/** 物料下拉框*/
|
||||
async _queryMaterial (e) {
|
||||
let res = await queryMaterial(e)
|
||||
res.map(el => {
|
||||
this.$set(el, 'value', el.material_id)
|
||||
this.$set(el, 'text', el.material_name)
|
||||
})
|
||||
this.options1 = [...res]
|
||||
},
|
||||
selectChange (e) {
|
||||
this._queryLinkMaterial(e)
|
||||
},
|
||||
/** grid */
|
||||
async _queryLinkMaterial (e) {
|
||||
let res = await queryLinkMaterial(e)
|
||||
this.dataList = [...res]
|
||||
},
|
||||
toChose (e) {
|
||||
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
},
|
||||
async _fullVehicleOut () {
|
||||
this.disabled = true
|
||||
if (!this.pkId || !this.val1) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await fullVehicleOut(this.pkId, this.val1)
|
||||
this.pkId = ''
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
clearUp () {
|
||||
this.index1 = ''
|
||||
this.dataList = []
|
||||
this.val1 = ''
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
Reference in New Issue
Block a user