半成品出库

This commit is contained in:
2023-06-30 18:12:06 +08:00
parent c26db923f4
commit c2bc8e1799
5 changed files with 70 additions and 71 deletions

View File

@@ -15,7 +15,10 @@ export const authority = () => {
path: 'RF02',
name: '半成品管理',
sonTree: [
{menu_id: '1', name: '半成品入库', path: '/semifinishedinstore'}
{menu_id: '1', name: '半成品入库', path: '/semifinishedinstore'},
{menu_id: '2', name: '半成品出库', path: '/semifinishedoutstore'},
{menu_id: '3', name: '半成品盘点', path: '/semifinishedcheck'},
{menu_id: '4', name: '半成品拼盘', path: '/semifinishedcomposesearch'}
]
},
{menu_id: '3',

View File

@@ -2,19 +2,6 @@
<div class="order-wraper">
<div class="search-confirm-wrap">
<div class="search-wrap">
<!-- <div class="search-item">
<div class="search-label">类别</div>
<div class="filter_input_wraper">
<el-select v-model="value1" filterable clearable placeholder="请选择">
<el-option
v-for="item in options1"
:key="item.stor_id"
:label="item.stor_name"
:value="item.stor_id">
</el-option>
</el-select>
</div>
</div> -->
<div class="search-item">
<div class="search-label">货位</div>
<div class="filter_input_wraper">

View File

@@ -15,12 +15,12 @@
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label search-label_1">日期</div>
<div class="filter_input_wraper filter_input_wraper_1">
<div class="search-item search-item_2">
<div class="search-label">日期</div>
<div class="filter_input_wraper">
<el-date-picker
v-model="date"
type="daterange"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
@@ -52,7 +52,7 @@
<input type="text" class="filter-input">
</div>
</div>
<div class="search-item flexend">
<div class="search-item flexend" style="width: 100%">
<button class="button button--primary" @click="_getAll">查询</button>
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === ''}" @click="toSure">强制确认</button>
</div>
@@ -106,6 +106,7 @@
<script>
import {getBcpStor, getBillType, getAll, bcpInConfirm} from '@config/getData2.js'
import {dateFtt} from '@config/utils.js'
export default {
data () {
return {
@@ -140,7 +141,7 @@ export default {
},
// grid
async _getAll () {
let res = await getAll(this.value1, this.date[0], this.date[1], this.material_code, this.storagevehicle_code, this.value2)
let res = await getAll(this.value1, this.date !== null ? dateFtt(this.date[0]) : '', this.date !== null ? dateFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.value2)
this.dataList = [...res.data]
},
toRadio (e) {
@@ -168,8 +169,15 @@ export default {
</script>
<style lang="stylus" scoped>
.search-item
&:nth-child(2), &:nth-child(5)
margin-right 0
&:nth-child(4)
margin-left 2%
.search-item_2
width 66%
.grid_wraper
height calc(100% - 95px)
height calc(100% - 135px)
.filter_input_wraper_1
width calc(100% - 45px)
.search-label_1

View File

@@ -226,8 +226,7 @@ export default {
this.$router.push('/matersearch')
},
toJumpSearch () {
console.log(this.unit_weight)
// this.$router.push('/semifinishedinstoresearch')
this.$router.push('/semifinishedinstoresearch')
},
handleBlur ($event) {
$event.target.value = Number($event.target.value).toFixed(3)

View File

@@ -40,18 +40,6 @@
<input type="text" class="filter-input" v-model="material_spec" disabled>
</div>
</div>
<div class="search-item">
<div class="search-label">重量(kg)</div>
<div class="filter_input_wraper">
<input type="number" class="filter-input" v-model="total_qty">
</div>
</div>
<div class="search-item">
<div class="search-label">单重(g)</div>
<div class="filter_input_wraper">
<input type="number" class="filter-input" v-model="unit_weight">
</div>
</div>
<div class="search-item">
<div class="search-label">数量</div>
<div class="filter_input_wraper">
@@ -59,9 +47,33 @@
</div>
</div>
<div class="search-item">
<div class="search-label">入库点</div>
<div class="search-label">单重(g)</div>
<div class="filter_input_wraper">
<el-select v-model="value3" filterable clearable placeholder="请选择">
<input type="number" class="filter-input" v-model="unit_weight" disabled>
</div>
</div>
<div class="search-item">
<div class="search-label">重量(kg)</div>
<div class="filter_input_wraper">
<input type="number" class="filter-input" v-model="total_qty" disabled>
</div>
</div>
<div class="search-item">
<div class="search-label">货位</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="struct_code" disabled>
</div>
</div>
<div class="search-item">
<div class="search-label">载具号</div>
<div class="filter_input_wraper">
<input type="text" class="filter-input" v-model="storagevehicle_code" disabled>
</div>
</div>
<div class="search-item">
<div class="search-label">出库点</div>
<div class="filter_input_wraper">
<el-select v-model="value3" filterable clearable placeholder="请选择" disabled>
<el-option
v-for="item in options3"
:key="item.point_code"
@@ -71,15 +83,6 @@
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-label">载具号</div>
<div class="filter_input_wraper filter_input_wraper_1">
<input type="text" class="filter-input" v-model="storagevehicle_code">
</div>
<div class="filter_button">
<button class="button button--primary" :disabled="disabled1" @click="_callVehicle">呼叫空载具</button>
</div>
</div>
<div class="search-item">
<div class="search-label">备注</div>
<div class="filter_input_wraper">
@@ -87,7 +90,7 @@
</div>
</div>
<div class="search-item_2">
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value1 === '' || value2 === '' || value3 === '' || material_code === '' || total_qty === '' || unit_weight === '' || storagevehicle_code === ''}" @click="toSure">确认</button>
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': value1 === '' || value2 === '' || value3 === ''}" @click="toSure">确认</button>
<button class="button button--primary" @click="toJumpSearch">作业查询</button>
</div>
</div>
@@ -96,7 +99,7 @@
</template>
<script>
import {outgetBcpStor, outgetBillType, getPoint, callVehicle, createIn} from '@config/getData2.js'
import {outgetBcpStor, outgetBillType, outgetPoint, outcreateIn} from '@config/getData2.js'
import {accMul, accDiv} from '@config/utils.js'
export default {
name: 'semifinishedoutstore',
@@ -111,8 +114,9 @@ export default {
material_id: '',
material_code: '',
material_spec: '',
total_qty: '',
unit_weight: '',
qty: '',
struct_code: '',
storagevehicle_code: '',
remark: '',
disabled1: false,
@@ -120,10 +124,13 @@ export default {
}
},
computed: {
qty () {
total_qty () {
let res = ''
let res1 = accMul(this.total_qty, 1000)
res = accDiv(res1, this.unit_weight)
if (this.unit_weight !== '') {
let res1 = accMul(this.unit_weight, this.qty)
res = accDiv(res1, 1000)
res = Number(res).toFixed(3)
}
return res
}
},
@@ -138,12 +145,16 @@ export default {
this.material_id = JSON.parse(this.$store.getters.materObj).material_id
this.material_code = JSON.parse(this.$store.getters.materObj).material_code
this.material_spec = JSON.parse(this.$store.getters.materObj).material_spec
this.unit_weight = JSON.parse(this.$store.getters.materObj).net_weight
this.unit_weight = Number(JSON.parse(this.$store.getters.materObj).net_weight).toFixed(3)
this.qty = Number(JSON.parse(this.$store.getters.materObj).canuse_qty).toFixed(3)
this.struct_code = JSON.parse(this.$store.getters.materObj).struct_name
this.storagevehicle_code = JSON.parse(this.$store.getters.materObj).storagevehicle_code
}
},
created () {
this._outgetBcpStor()
this._outgetBillType()
this._outgetPoint()
},
methods: {
// 仓库下拉框
@@ -156,26 +167,15 @@ export default {
let res = await outgetBillType()
this.options2 = [...res.data]
},
// 库点下拉框
async _getPoint () {
let res = await getPoint()
// 库点下拉框
async _outgetPoint () {
let res = await outgetPoint()
this.options3 = [...res.data]
},
// 呼叫空载具
async _callVehicle () {
this.disabled1 = true
try {
let res = await callVehicle()
this.toast(res.message)
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
},
// 确认入库
// 确认出库
async toSure () {
this.disabled2 = true
if (this.value1 === '' || this.value2 === '' || this.value3 === '' || this.material_code === '' || this.total_qty === '' || this.unit_weight === '' || this.storagevehicle_code === '') {
if (this.value1 === '' || this.value2 === '' || this.value3 === '') {
this.disabled2 = false
return
}
@@ -190,10 +190,11 @@ export default {
unit_weight: this.unit_weight,
qty: this.qty,
point_code: this.value3,
struct_code: this.struct_code,
storagevehicle_code: this.storagevehicle_code,
remark: this.remark
}
let res = await createIn(from)
let res = await outcreateIn(from)
this.toast(res.message)
this.value1 = ''
this.value2 = ''
@@ -203,6 +204,7 @@ export default {
this.material_spec = ''
this.total_qty = ''
this.unit_weight = ''
this.struct_code = ''
this.storagevehicle_code = ''
this.remark = ''
this.disabled2 = false
@@ -216,7 +218,7 @@ export default {
this.$router.push('/outmatersearch')
},
toJumpSearch () {
this.$router.push('/semifinishedinstoresearch')
this.$router.push('/semifinishedoutstoresearch')
}
}
}