刻字工序刻字机选择任务列表
This commit is contained in:
238
src/pages/modules/lettering/lettering-process.vue
Normal file
238
src/pages/modules/lettering/lettering-process.vue
Normal file
@@ -0,0 +1,238 @@
|
||||
<template>
|
||||
<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 search-label_1">日期</div>
|
||||
<div class="filter_input_wraper filter_input_wraper_1">
|
||||
<el-date-picker
|
||||
v-model="date"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">物料</div>
|
||||
<div class="filter_input_wraper">
|
||||
<input type="text" class="filter-input" v-model="material_code">
|
||||
</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">
|
||||
</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">
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">盘点位</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.point_code"
|
||||
:label="item.point_name"
|
||||
:value="item.point_code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_3">
|
||||
<button class="button button--primary" @click="_checkGetDtlAll">查询</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === '' || value2 === ''}" @click="_checkSendTask">确认上料</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid_wraper">
|
||||
<table class="filter-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>货位</th>
|
||||
<th>载具号</th>
|
||||
<th>物料规格</th>
|
||||
<th>重量(kg)</th>
|
||||
<th>数量</th>
|
||||
<th>物料编号</th>
|
||||
<th>入库时间</th>
|
||||
<th>是否已挑料</th>
|
||||
<th>入库类型</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.checkdtl_id}" @click="toRadio(e)">
|
||||
<td>{{ i + 1 }}</td>
|
||||
<td>{{e.struct_name}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.qty | numeric(3)}}</td>
|
||||
<td>{{e.base_qty | numeric(3)}}</td>
|
||||
<td><input type="number" class="input" v-model="e.fac_qty"></td>
|
||||
<td>{{ ['正常', '盘亏', '盘盈'][Number(e.check_result)] }}</td>
|
||||
<td>生成</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { checkGetBcpStor, checkGetDtlAll, checkGetPoint, checkSendTask, checkConfirm, checkConfirmOffer, checkConfirmFinance } from '@config/getData2.js'
|
||||
import {dateTimeFtt} from '@config/utils.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
|
||||
options2: [],
|
||||
value2: '',
|
||||
material_code: '',
|
||||
storagevehicle_code: '',
|
||||
struct_code: '',
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
disabled4: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
flag () {
|
||||
let flag = false
|
||||
if (this.dataList.length) {
|
||||
this.dataList.map(el => {
|
||||
if (el.fac_qty === '' || Number(el.fac_qty) < 0) {
|
||||
flag = true
|
||||
}
|
||||
})
|
||||
}
|
||||
return flag
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._checkGetBcpStor()
|
||||
this._checkGetDtlAll()
|
||||
this._checkGetPoint()
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
async _checkGetBcpStor () {
|
||||
let res = await checkGetBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
// grid
|
||||
async _checkGetDtlAll () {
|
||||
let res = await checkGetDtlAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.struct_code)
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
// 盘点位下拉框
|
||||
async _checkGetPoint () {
|
||||
let res = await checkGetPoint()
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.checkdtl_id ? '' : e.checkdtl_id
|
||||
this.pkObj = this.pkId === e.checkdtl_id ? e : {}
|
||||
},
|
||||
// 下发(按钮)
|
||||
async _checkSendTask () {
|
||||
this.disabled1 = true
|
||||
if (!this.pkId || !this.value2) {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkSendTask(this.pkObj, this.value2)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
},
|
||||
// 盘点确认
|
||||
async _checkConfirm () {
|
||||
this.disabled2 = true
|
||||
if (this.flag || this.dataList.length === 0) {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirm(this.dataList)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled2 = false
|
||||
}
|
||||
},
|
||||
// 实盘为准
|
||||
async _checkConfirmOffer () {
|
||||
this.disabled3 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled3 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirmOffer(this.pkObj)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled3 = false
|
||||
} catch (e) {
|
||||
this.disabled3 = false
|
||||
}
|
||||
},
|
||||
// 财务为准
|
||||
async _checkConfirmFinance () {
|
||||
this.disabled4 = true
|
||||
if (!this.pkId) {
|
||||
this.disabled4 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await checkConfirmFinance(this.pkObj)
|
||||
this.toast(res.message)
|
||||
this._checkGetDtlAll()
|
||||
this.disabled4 = false
|
||||
} catch (e) {
|
||||
this.disabled4 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.zd_wrapper
|
||||
height calc(100% - 1.6rem)
|
||||
.filter_input_wraper_1
|
||||
width calc(100% - 45px)
|
||||
.search-label_1
|
||||
width 45px
|
||||
</style>
|
||||
Reference in New Issue
Block a user