半成品入库
This commit is contained in:
@@ -123,15 +123,15 @@ export const getBcpStor = () => post('api/pda/bcp/in/getBcpStor', {})
|
||||
// 1.2单据类型下拉框
|
||||
export const getBillType = () => post('api/pda/bcp/in/getBillType', {})
|
||||
// 1.3物料选择页面
|
||||
// export const getMaterial = (code) => post('api/pda/bcp/in/getMaterial', {
|
||||
// material_code: code
|
||||
// })
|
||||
export const getMaterial = (code) => {
|
||||
let res = {
|
||||
data: [{material_code: '1', material_name: 'a', material_spec: '001', class_code: '1', net_weight: '100', unit_name: 'g'}]
|
||||
}
|
||||
return res
|
||||
}
|
||||
export const getMaterial = (code) => post('api/pda/bcp/in/getMaterial', {
|
||||
material_code: code
|
||||
})
|
||||
// export const getMaterial = (code) => {
|
||||
// let res = {
|
||||
// data: [{material_code: '1', material_name: 'a', material_spec: '001', class_code: '1', net_weight: '100', unit_name: 'g'}]
|
||||
// }
|
||||
// return res
|
||||
// }
|
||||
// 1.4入库点下拉框
|
||||
export const getPoint = () => post('api/pda/bcp/in/getPoint', {})
|
||||
// 1.5呼叫空载具(按钮)
|
||||
@@ -145,6 +145,15 @@ export const createIn = (from) => post('api/pda/bcp/in/createIn', {
|
||||
* 半成品入库管理查询
|
||||
*/
|
||||
// 2.1半成品入库查询
|
||||
export const getAll = () => post('api/pda/bcp/in/getAll', {})
|
||||
export const getAll = (id, btime, etime, code, scode, type) => post('api/pda/bcp/in/getAll', {
|
||||
stor_id: id,
|
||||
begin_time: btime,
|
||||
end_time: etime,
|
||||
material_code: code,
|
||||
storagevehicle_code: scode,
|
||||
bill_type: type
|
||||
})
|
||||
// 2.2强制确认(按钮)
|
||||
export const bcpInConfirm = () => post('api/pda/bcp/in/confirm', {})
|
||||
export const bcpInConfirm = (row) => post('api/pda/bcp/in/confirm', {
|
||||
row: row
|
||||
})
|
||||
|
||||
@@ -36,6 +36,9 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.$store.dispatch('setMaterObj', '')
|
||||
this.$store.dispatch('setKeepAlive', [])
|
||||
localStorage.removeItem('materObj')
|
||||
localStorage.removeItem('keepAlive')
|
||||
this._authority()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<div class="search-label">仓库</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
:key="item.stor_id"
|
||||
:label="item.stor_name"
|
||||
:value="item.stor_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -28,14 +28,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-label">业务类型</div>
|
||||
<div class="search-label">单据类型</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value2" filterable clearable placeholder="请选择">
|
||||
<el-option
|
||||
<el-option
|
||||
v-for="item in options2"
|
||||
:key="item.device_code"
|
||||
:label="item.device_name"
|
||||
:value="item.device_code">
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
@@ -53,8 +53,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item flexend">
|
||||
<button class="button button--primary">查询</button>
|
||||
<button class="button button--primary">强制确认</button>
|
||||
<button class="button button--primary" @click="_getAll">查询</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === ''}" @click="toSure">强制确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -79,21 +79,24 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<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">
|
||||
<td>序号</td>
|
||||
<td>单据号</td>
|
||||
<td>状态</td>
|
||||
<td>类型</td>
|
||||
<td>物料编号</td>
|
||||
<td>物料规格</td>
|
||||
<td>数量</td>
|
||||
<td>单重(g)</td>
|
||||
<td>重量(kg)</td>
|
||||
<td>载具号</td>
|
||||
<td>入库点</td>
|
||||
<td>货位</td>
|
||||
<td>创建时间</td>
|
||||
<td>创建人ldjlfjlfjl劳动纪律放假了</td>
|
||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.bill_code}" @click="toRadio(e)">
|
||||
<td>{{ i+1 }}</td>
|
||||
<td>{{e.bill_code}}</td>
|
||||
<td v-if="e.bill_status === '10'">生成</td>
|
||||
<td v-if="e.bill_status === '20'">分配中</td>
|
||||
<td v-if="e.bill_status === '30'">分配完</td>
|
||||
<td v-if="e.bill_status === '99'">完成</td>
|
||||
<td>{{e.bill_type}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.qty}}</td>
|
||||
<td>{{e.unit_weight}}</td>
|
||||
<td>{{e.plan_qty}}</td>
|
||||
<td>{{e.storagevehicle_code}}</td>
|
||||
<td>{{e.point_code}}</td>
|
||||
<td>{{e.struct_code}}</td>
|
||||
<td>{{e.create_time}}</td>
|
||||
<td>{{e.create_name}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -102,6 +105,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getBcpStor, getBillType, getAll, bcpInConfirm} from '@config/getData2.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -110,8 +114,49 @@ export default {
|
||||
date: [new Date((new Date().getTime() - 24 * 60 * 60 * 1000)), new Date((new Date().getTime() + 24 * 60 * 60 * 1000))],
|
||||
options2: [],
|
||||
value2: '',
|
||||
options3: [],
|
||||
value3: ''
|
||||
material_code: '',
|
||||
storagevehicle_code: '',
|
||||
dataList: [],
|
||||
disabled1: false,
|
||||
pkId: '',
|
||||
pkObj: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 仓库下拉框
|
||||
async _getBcpStor () {
|
||||
let res = await getBcpStor()
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
// 单据类型下拉框
|
||||
async _getBillType () {
|
||||
let res = await getBillType()
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
// grid
|
||||
async _getAll () {
|
||||
let res = await getAll(this.value1, this.date[0], this.date[1], this.material_code, this.storagevehicle_code, this.value2)
|
||||
this.dataList = [...res.data]
|
||||
},
|
||||
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 bcpInConfirm(this.pkObj)
|
||||
this.toast(res.message)
|
||||
this._getAll()
|
||||
this.pkId = ''
|
||||
this.disabled1 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,12 +154,12 @@ export default {
|
||||
// 单据类型下拉框
|
||||
async _getBillType () {
|
||||
let res = await getBillType()
|
||||
this.options3 = [...res.data]
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
// 入库点下拉框
|
||||
async _getPoint () {
|
||||
let res = await getPoint()
|
||||
this.options2 = [...res.data]
|
||||
this.options3 = [...res.data]
|
||||
},
|
||||
// 呼叫空载具
|
||||
async _callVehicle () {
|
||||
|
||||
Reference in New Issue
Block a user