半成品出库

This commit is contained in:
2023-07-03 09:52:11 +08:00
parent c2bc8e1799
commit 91d7b3a39d
6 changed files with 129 additions and 57 deletions

View File

@@ -167,6 +167,12 @@ export const bcpInConfirm = (row) => post('api/pda/bcp/in/confirm', {
export const outgetBcpStor = () => post('api/pda/bcp/out/getBcpStor', {}) export const outgetBcpStor = () => post('api/pda/bcp/out/getBcpStor', {})
// 1.2单据类型下拉框 // 1.2单据类型下拉框
export const outgetBillType = () => post('api/pda/bcp/out/getBillType', {}) export const outgetBillType = () => post('api/pda/bcp/out/getBillType', {})
// export const outgetBillType = () => {
// let res = {
// data: [{value: '1', label: 'a'}, {value: '2', label: 'b'}]
// }
// return res
// }
// 1.3物料选择页面 // 1.3物料选择页面
export const outgetMaterial = (code, scode, is) => post('api/pda/bcp/out/getMaterial', { export const outgetMaterial = (code, scode, is) => post('api/pda/bcp/out/getMaterial', {
material_code: code, material_code: code,
@@ -192,6 +198,12 @@ export const outgetAll = (id, btime, etime, code, scode, type) => post('api/pda/
storagevehicle_code: scode, storagevehicle_code: scode,
bill_type: type bill_type: type
}) })
// export const outgetAll = (id, btime, etime, code, scode, type) => {
// let res = {
// data: [{bill_code: '001', bill_status: '99', bill_type: '1'}, {bill_code: '002', bill_status: '99', bill_type: '2'}]
// }
// return res
// }
// 2.2强制确认(按钮) // 2.2强制确认(按钮)
export const bcpOutConfirm = (row) => post('api/pda/bcp/out/confirm', { export const bcpOutConfirm = (row) => post('api/pda/bcp/out/confirm', {
row: row row: row

View File

@@ -15,11 +15,11 @@
</div> </div>
</div> </div>
<div class="search-item flexend"> <div class="search-item flexend">
<div class="filter_radius"> <div class="filter_radius" @click="toChange">
<button class="iconfont select_icon select_square_icon selected_icon unselect_icon"></button> <button class="iconfont select_icon select_square_icon" :class="isV === '1' ? 'selected_icon' : 'unselect_icon'"></button>
<div class="filter_radius_label">已挑料</div> <div class="filter_radius_label">已挑料</div>
</div> </div>
<button class="button button--primary" @click="_getMaterial">查询</button> <button class="button button--primary" @click="_outgetMaterial">查询</button>
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toSure">确定</button> <button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toSure">确定</button>
<button class="button button--primary" @click="clearUp">清除</button> <button class="button button--primary" @click="clearUp">清除</button>
<button class="button button--primary" @click="colseUp">关闭</button> <button class="button button--primary" @click="colseUp">关闭</button>
@@ -30,20 +30,24 @@
<table class="filter-table"> <table class="filter-table">
<thead> <thead>
<tr> <tr>
<th>序号</th> <th>库区</th>
<th>货位</th>
<th>物料编号</th> <th>物料编号</th>
<th>物料名称</th> <th>物料名称</th>
<th>物料类别</th> <th>数量</th>
<th>重量单位</th> <th>单重(g)</th>
<th>载具号</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.material_code}" @click="toRadio(e)"> <tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.struct_name}" @click="toRadio(e)">
<td>{{ i+1 }}</td> <td>{{ e.sect_name }}</td>
<td>{{e.struct_name}}</td>
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.material_name}}</td> <td>{{e.material_name}}</td>
<td>{{e.class_code}}</td> <td>{{e.canuse_qty | numeric(3)}}</td>
<td>{{e.unit_name}}</td> <td>{{ e.unit_weight | numeric(3) }}</td>
<td>{{ e.storagevehicle_code }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -52,35 +56,36 @@
</template> </template>
<script> <script>
import {getMaterial} from '@config/getData2.js' import {outgetMaterial} from '@config/getData2.js'
export default { export default {
data () { data () {
return { return {
options1: [],
value1: '',
val1: '', val1: '',
val2: '', val2: '',
val3: '', isV: '1',
dataList: [], dataList: [],
pkId: '', pkId: '',
pkObj: {} pkObj: {}
} }
}, },
created () { created () {
this._getMaterial() this._outgetMaterial()
}, },
methods: { methods: {
// grid // grid
async _getMaterial () { async _outgetMaterial () {
let res = await getMaterial(this.val1) let res = await outgetMaterial(this.val2, this.val1, this.isV)
this.dataList = [...res.data] this.dataList = [...res.data]
}, },
colseUp () { colseUp () {
this.$router.push('/semifinishedinstore') this.$router.push('/semifinishedoutstore')
},
toChange () {
this.isV = this.isV === '1' ? '0' : '1'
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.material_code ? '' : e.material_code this.pkId = this.pkId === e.struct_name ? '' : e.struct_name
this.pkObj = this.pkId === e.material_code ? e : {} this.pkObj = this.pkId === e.struct_name ? e : {}
}, },
toSure () { toSure () {
this.$store.dispatch('setMaterObj', JSON.stringify(this.pkObj)) this.$store.dispatch('setMaterObj', JSON.stringify(this.pkObj))

View File

@@ -86,7 +86,7 @@
<td v-if="e.bill_status === '20'">分配中</td> <td v-if="e.bill_status === '20'">分配中</td>
<td v-if="e.bill_status === '30'">分配完</td> <td v-if="e.bill_status === '30'">分配完</td>
<td v-if="e.bill_status === '99'">完成</td> <td v-if="e.bill_status === '99'">完成</td>
<td>{{e.bill_type}}</td> <td>{{e.bill_type_name}}</td>
<td>{{e.material_code}}</td> <td>{{e.material_code}}</td>
<td>{{e.material_spec}}</td> <td>{{e.material_spec}}</td>
<td>{{e.qty}}</td> <td>{{e.qty}}</td>
@@ -106,13 +106,13 @@
<script> <script>
import {getBcpStor, getBillType, getAll, bcpInConfirm} from '@config/getData2.js' import {getBcpStor, getBillType, getAll, bcpInConfirm} from '@config/getData2.js'
import {dateFtt} from '@config/utils.js' import {dateTimeFtt} from '@config/utils.js'
export default { export default {
data () { data () {
return { return {
options1: [], options1: [],
value1: '', value1: '',
date: [new Date((new Date().getTime() - 24 * 60 * 60 * 1000)), new Date((new Date().getTime() + 24 * 60 * 60 * 1000))], date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
options2: [], options2: [],
value2: '', value2: '',
material_code: '', material_code: '',
@@ -141,8 +141,11 @@ export default {
}, },
// grid // grid
async _getAll () { async _getAll () {
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) let res = await getAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.value2)
this.dataList = [...res.data] this.dataList = [...res.data]
this.dataList.map(el => {
this.$set(el, 'bill_type_name', this.options2.filter(e => e.value === el.bill_type)[0].label)
})
}, },
toRadio (e) { toRadio (e) {
this.pkId = this.pkId === e.bill_code ? '' : e.bill_code this.pkId = this.pkId === e.bill_code ? '' : e.bill_code

View File

@@ -31,7 +31,7 @@
<div class="search-item"> <div class="search-item">
<div class="search-label">物料</div> <div class="search-label">物料</div>
<div class="filter_input_wraper pointer" @click="searchMater"> <div class="filter_input_wraper pointer" @click="searchMater">
<input type="text" class="filter-input" disabled v-model="material_code"> <input type="text" class="filter-input" v-model="material_code">
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">

View File

@@ -8,9 +8,9 @@
<el-select v-model="value1" filterable clearable placeholder="请选择"> <el-select v-model="value1" filterable clearable placeholder="请选择">
<el-option <el-option
v-for="item in options1" v-for="item in options1"
:key="item.device_code" :key="item.stor_id"
:label="item.device_name" :label="item.stor_name"
:value="item.device_code"> :value="item.stor_id">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@@ -28,14 +28,14 @@
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">
<div class="search-label">业务类型</div> <div class="search-label">单据类型</div>
<div class="filter_input_wraper"> <div class="filter_input_wraper">
<el-select v-model="value2" filterable clearable placeholder="请选择"> <el-select v-model="value2" filterable clearable placeholder="请选择">
<el-option <el-option
v-for="item in options2" v-for="item in options2"
:key="item.device_code" :key="item.value"
:label="item.device_name" :label="item.label"
:value="item.device_code"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
@@ -43,18 +43,18 @@
<div class="search-item"> <div class="search-item">
<div class="search-label">物料</div> <div class="search-label">物料</div>
<div class="filter_input_wraper"> <div class="filter_input_wraper">
<input type="text" class="filter-input"> <input type="text" class="filter-input" v-model="material_code">
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">
<div class="search-label">载具号</div> <div class="search-label">载具号</div>
<div class="filter_input_wraper"> <div class="filter_input_wraper">
<input type="text" class="filter-input"> <input type="text" class="filter-input" v-model="storagevehicle_code">
</div> </div>
</div> </div>
<div class="search-item flexend"> <div class="search-item flexend">
<button class="button button--primary">查询</button> <button class="button button--primary" @click="_outgetAll">查询</button>
<button class="button button--primary">强制确认</button> <button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === ''}" @click="toSure">强制确认</button>
</div> </div>
</div> </div>
</div> </div>
@@ -79,21 +79,24 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(e, i) in [1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7]" :key="i"> <tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.bill_code}" @click="toRadio(e)">
<td>序号</td> <td>{{ i+1 }}</td>
<td>单据号</td> <td>{{e.bill_code}}</td>
<td>状态</td> <td v-if="e.bill_status === '10'">生成</td>
<td>类型</td> <td v-if="e.bill_status === '20'">分配中</td>
<td>物料编号</td> <td v-if="e.bill_status === '30'">分配完</td>
<td>物料规格</td> <td v-if="e.bill_status === '99'">完成</td>
<td>数量()</td> <td>{{ e.bill_type_name }}</td>
<td>单重(g)</td> <td>{{ e.material_code }}</td>
<td>重量(kg)</td> <td>{{e.material_spec}}</td>
<td>载具号</td> <td>{{ e.qty }}</td>
<td>入库点</td> <td>{{ e.unit_weight }}</td>
<td>货位</td> <td>{{ e.plan_qty }}</td>
<td>创建时间</td> <td>{{e.storagevehicle_code}}</td>
<td>创建人ldjlfjlfjl劳动纪律放假了</td> <td>{{e.point_code}}</td>
<td>{{e.struct_code}}</td>
<td>{{ e.create_time }}</td>
<td>{{e.create_name}}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -102,16 +105,65 @@
</template> </template>
<script> <script>
import { outgetBcpStor, outgetBillType, outgetAll, bcpOutConfirm } from '@config/getData2.js'
import {dateTimeFtt} from '@config/utils.js'
export default { export default {
data () { data () {
return { return {
options1: [], options1: [],
value1: '', value1: '',
date: [new Date((new Date().getTime() - 24 * 60 * 60 * 1000)), new Date((new Date().getTime() + 24 * 60 * 60 * 1000))], date: [new Date((new Date().getTime() - 6 * 24 * 60 * 60 * 1000)), new Date((new Date().getTime()))],
options2: [], options2: [],
value2: '', value2: '',
options3: [], material_code: '',
value3: '' storagevehicle_code: '',
dataList: [],
disabled1: false
}
},
created () {
this._outgetBcpStor()
this._outgetBillType()
},
methods: {
// 仓库下拉框
async _outgetBcpStor () {
let res = await outgetBcpStor()
this.options1 = [...res.data]
},
// 单据类型下拉框
async _outgetBillType () {
let res = await outgetBillType()
this.options2 = [...res.data]
this._outgetAll()
},
// grid
async _outgetAll () {
let res = await outgetAll(this.value1, this.date !== null ? dateTimeFtt(this.date[0]) : '', this.date !== null ? dateTimeFtt(this.date[1]) : '', this.material_code, this.storagevehicle_code, this.value2)
this.dataList = [...res.data]
this.dataList.map(el => {
this.$set(el, 'bill_type_name', this.options2.filter(e => e.value === el.bill_type)[0].label)
})
},
toRadio (e) {
this.pkId = this.pkId === e.bill_code ? '' : e.bill_code
this.pkObj = this.pkId === e.bill_code ? e : {}
},
async toSure () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
try {
let res = await bcpOutConfirm(this.pkObj)
this.toast(res.message)
this._outgetAll()
this.pkId = ''
this.disabled1 = false
} catch (e) {
this.disabled1 = false
}
} }
} }
} }

View File

@@ -31,7 +31,7 @@
<div class="search-item"> <div class="search-item">
<div class="search-label">物料</div> <div class="search-label">物料</div>
<div class="filter_input_wraper pointer" @click="searchMater"> <div class="filter_input_wraper pointer" @click="searchMater">
<input type="text" class="filter-input" disabled v-model="material_code"> <input type="text" class="filter-input" v-model="material_code">
</div> </div>
</div> </div>
<div class="search-item"> <div class="search-item">