刻字工序
This commit is contained in:
@@ -291,7 +291,7 @@ export const pourdeviceinstorQty = (qty, code) => post('api/pda/deviceinstorQty'
|
|||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刻字工序
|
* 刻字上料
|
||||||
*/
|
*/
|
||||||
// 设备列表
|
// 设备列表
|
||||||
export const letterDeviceList = (id) => post('api/device/list', {
|
export const letterDeviceList = (id) => post('api/device/list', {
|
||||||
@@ -360,3 +360,49 @@ export const washWashQzFinish = (id, wegiht, code) => post('api/pda/wash/washQzF
|
|||||||
})
|
})
|
||||||
// 1.5呼叫空框
|
// 1.5呼叫空框
|
||||||
export const bcpInCallVehicle = () => post('api/pda/bcp/in/callVehicle', {})
|
export const bcpInCallVehicle = () => post('api/pda/bcp/in/callVehicle', {})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刻字工序
|
||||||
|
*/
|
||||||
|
// 1.1刻字上料物料列表
|
||||||
|
// export const bypda = (page, size) => post('api/bcp/bypda', {
|
||||||
|
// page: page,
|
||||||
|
// size: size,
|
||||||
|
// stor_id: '15286279952695336962'
|
||||||
|
// })
|
||||||
|
export const bypda = (page, size) => {
|
||||||
|
let res = {
|
||||||
|
code: 200,
|
||||||
|
content: [{struct_code: '1', canuse_qty: '200'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
// 1.2刻字机选择
|
||||||
|
// export const kzDeviceList = () => post('api/device/list', {
|
||||||
|
// product_area: 'A1'
|
||||||
|
// })
|
||||||
|
export const kzDeviceList = () => {
|
||||||
|
let res = {
|
||||||
|
code: 200,
|
||||||
|
content: [{workorder_code: '1', device_code: '1'}, {workorder_code: '11', device_code: '11'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
// 1.3确认上料
|
||||||
|
export const kzSubmitkz = (arr) => post('api/pda/kz/submitkz', arr)
|
||||||
|
// 1.1任务列表
|
||||||
|
// export const KzTasks = () => post('api/pda/kz/kzTasks', {
|
||||||
|
// product_area: 'A1'
|
||||||
|
// })
|
||||||
|
export const KzTasks = () => {
|
||||||
|
let res = {
|
||||||
|
code: 200,
|
||||||
|
content: [{task_id: '1', device_code: '1'}, {task_id: '11', device_code: '11'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
// 1.2强制完成取消
|
||||||
|
export const operation = (id, method) => post('api/task/operation', {
|
||||||
|
task_id: id,
|
||||||
|
method_name: method
|
||||||
|
})
|
||||||
|
|||||||
@@ -2,28 +2,22 @@
|
|||||||
<div class="order-wraper">
|
<div class="order-wraper">
|
||||||
<div class="search-confirm-wrap">
|
<div class="search-confirm-wrap">
|
||||||
<div class="search-wrap">
|
<div class="search-wrap">
|
||||||
<div class="search-item">
|
|
||||||
<div class="search-label">规格</div>
|
|
||||||
<div class="filter_input_wraper">
|
|
||||||
<input type="text" class="filter-input">
|
|
||||||
</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="$route.query.code" disabled>
|
||||||
</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="number" class="filter-input">
|
<input type="number" class="filter-input" v-model="$route.query.weight" disabled>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_3">
|
<div class="search-item">
|
||||||
<button class="button button--primary" @click="_washQuery">平均分配</button>
|
<button class="button button--primary" :class="{'button--defalut': dataList.length === 0}" @click="distribute">平均分配</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': checkArr.length === 0}" @click="_washSubmitWash">取消分配</button>
|
<button class="button button--primary" :class="{'button--defalut': dataList.length === 0}" @click="toCancle">取消分配</button>
|
||||||
<button class="button button--primary" @click="toJump">确认上料</button>
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': checkArr.length === 0}" @click="_kzSubmitkz">确认上料</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -38,8 +32,7 @@
|
|||||||
<th>计划数量</th>
|
<th>计划数量</th>
|
||||||
<th>生产数量</th>
|
<th>生产数量</th>
|
||||||
<th>物料规格</th>
|
<th>物料规格</th>
|
||||||
<th>重量(kg)</th>
|
<th>重量(g)</th>
|
||||||
<th>数量</th>
|
|
||||||
<th>物料编号</th>
|
<th>物料编号</th>
|
||||||
<th>物料名称</th>
|
<th>物料名称</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -49,13 +42,15 @@
|
|||||||
<td>
|
<td>
|
||||||
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
|
<button class="iconfont select_icon select_square_icon" :class="e.checked ? 'selected_icon' : 'unselect_icon'"></button>
|
||||||
</td>
|
</td>
|
||||||
|
<td>{{ i+1 }}</td>
|
||||||
<td>{{ e.device_code }}</td>
|
<td>{{ e.device_code }}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.workorder_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.plan_qty | numeric(3)}}</td>
|
||||||
<td>{{e.deviceinstor_weight | unitskg}}</td>
|
<td>{{e.dq_real_qty | numeric(3)}}</td>
|
||||||
<td>{{ e.deviceinstor_qty | numeric(3) }}</td>
|
<td>{{ e.material_spec }}</td>
|
||||||
<td>{{ e.task_code }}</td>
|
<td><input type="number" class="input" v-model="e.weight"></td>
|
||||||
<td>{{ e.update_time }}</td>
|
<td>{{ e.material_code }}</td>
|
||||||
|
<td>{{ e.material_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -64,77 +59,83 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {dictAll, washSpecList, washQuery, washSubmitWash} from '@config/getData2.js'
|
import {accDiv, accAdd} from '@config/utils.js'
|
||||||
|
import {kzDeviceList, kzSubmitkz} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
name: 'cleaningloading',
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
|
||||||
value1: '',
|
|
||||||
options2: [],
|
|
||||||
value2: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
checkArr: [],
|
checkArr: [],
|
||||||
disabled1: false
|
disabled1: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._dictAll()
|
this._kzDeviceList()
|
||||||
this._washSpecList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 车间下拉框
|
async _kzDeviceList () {
|
||||||
async _dictAll () {
|
let res = await kzDeviceList()
|
||||||
let res = await dictAll()
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.options1 = [...res.content]
|
|
||||||
this.value1 = this.options1[0].value
|
|
||||||
this._washQuery()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 规格下拉框
|
|
||||||
async _washSpecList () {
|
|
||||||
let res = await washSpecList()
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.options2 = [...res.content]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// grid
|
|
||||||
async _washQuery () {
|
|
||||||
let res = await washQuery(this.value1, this.value2)
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.checkArr = []
|
this.checkArr = []
|
||||||
res.content.map(el => {
|
res.content.map(el => {
|
||||||
this.$set(el, 'checked', false)
|
this.$set(el, 'checked', false)
|
||||||
|
this.$set(el, 'weight', '')
|
||||||
})
|
})
|
||||||
this.dataList = [...res.content]
|
this.dataList = [...res.content]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
distribute () {
|
||||||
|
let weight = accDiv(this.$route.query.weight, this.dataList.length)
|
||||||
|
weight = Number(weight).toFixed(3)
|
||||||
|
this.dataList.map(el => {
|
||||||
|
this.$set(el, 'weight', weight)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.dataList.map(el => {
|
||||||
|
this.$set(el, 'weight', '')
|
||||||
|
})
|
||||||
|
},
|
||||||
// 确认上料
|
// 确认上料
|
||||||
async _washSubmitWash () {
|
async _kzSubmitkz () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.checkArr.length === 0) {
|
if (this.checkArr.length === 0) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
let total = 0
|
||||||
|
let flag = false
|
||||||
|
this.dataList.map(el => {
|
||||||
|
total = accAdd(total, el.weight)
|
||||||
|
if (el.weight === '') {
|
||||||
|
flag = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
this.toast('数量不能为空')
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (Number(total) > Number(this.$route.query.weight)) {
|
||||||
|
this.toast('总重量之和不大于库存重量')
|
||||||
|
this.disabled1 = false
|
||||||
|
return
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
let arr = []
|
let arr = []
|
||||||
this.checkArr.map(el => {
|
this.checkArr.map(el => {
|
||||||
arr.push(el.device_code)
|
arr.push({device_code: el.device_code, weight: el.weight})
|
||||||
})
|
})
|
||||||
let res = await washSubmitWash(arr)
|
let res = await kzSubmitkz(arr)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.toast(res.msg)
|
this.toast(res.msg)
|
||||||
this._washQuery()
|
this._kzDeviceList()
|
||||||
}
|
}
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toJump () {
|
|
||||||
this.$router.push('/manpour')
|
|
||||||
},
|
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
e.checked = !e.checked
|
e.checked = !e.checked
|
||||||
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
||||||
@@ -144,6 +145,13 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.grid_wraper
|
.search-item
|
||||||
height calc(100% - 1.1rem)
|
&:nth-child(1), &:nth-child(2)
|
||||||
|
width 29%
|
||||||
|
&:nth-child(3)
|
||||||
|
width 38%
|
||||||
|
.search-label
|
||||||
|
width .55rem
|
||||||
|
.filter_input_wraper
|
||||||
|
width calc(100% - .55rem)
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,238 +1,109 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="order-wraper">
|
<div class="order-wraper">
|
||||||
<div class="search-confirm-wrap">
|
<div class="search-confirm-wrap">
|
||||||
<div class="search-wrap">
|
<div class="search-wrap">
|
||||||
<div class="search-item">
|
<div class="search-item_3">
|
||||||
<div class="search-label">仓库</div>
|
<button class="button button--primary" @click="_bypda">查询</button>
|
||||||
<div class="filter_input_wraper">
|
<button class="button button--primary" :class="{'button--defalut': pkId === ''}" @click="toSure">确认上料</button>
|
||||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
</div>
|
||||||
<el-option
|
</div>
|
||||||
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>
|
||||||
<div class="grid_wraper">
|
<div class="grid_wraper" v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" infinite-scroll-distance="0" infinite-scroll-immediate-check="false">
|
||||||
<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>重量(kg)</th>
|
<th>重量(g)</th>
|
||||||
<th>数量</th>
|
<th>物料编号</th>
|
||||||
<th>物料编号</th>
|
<th>入库时间</th>
|
||||||
<th>入库时间</th>
|
<th>是否已挑料</th>
|
||||||
<th>是否已挑料</th>
|
<th>入库类型</th>
|
||||||
<th>入库类型</th>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</thead>
|
<tbody>
|
||||||
<tbody>
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.struct_code}" @click="toRadio(e)">
|
||||||
<tr v-for="(e, i) in dataList" :key="i" :class="{'selected_icon': pkId === e.checkdtl_id}" @click="toRadio(e)">
|
<td>{{ i + 1 }}</td>
|
||||||
<td>{{ i + 1 }}</td>
|
<td>{{e.struct_code}}</td>
|
||||||
<td>{{e.struct_name}}</td>
|
<td>{{e.storagevehicle_code}}</td>
|
||||||
<td>{{e.storagevehicle_code}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.canuse_qty | numeric(3)}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{ e.material_code }}</td>
|
||||||
<td>{{e.qty | numeric(3)}}</td>
|
<td>{{ e.instorage_time }}</td>
|
||||||
<td>{{e.base_qty | numeric(3)}}</td>
|
<td>{{ e.is_pick === true ? '是' : '否' }}</td>
|
||||||
<td><input type="number" class="input" v-model="e.fac_qty"></td>
|
<td>{{ e.instorage_type }}</td>
|
||||||
<td>{{ ['正常', '盘亏', '盘盈'][Number(e.check_result)] }}</td>
|
</tr>
|
||||||
<td>生成</td>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
</tbody>
|
<div class="loading-tips">{{desc}}</div>
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { checkGetBcpStor, checkGetDtlAll, checkGetPoint, checkSendTask, checkConfirm, checkConfirmOffer, checkConfirmFinance } from '@config/getData2.js'
|
import { bypda } from '@config/getData2.js'
|
||||||
import {dateTimeFtt} from '@config/utils.js'
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
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: [],
|
dataList: [],
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
disabled1: false,
|
page: 1,
|
||||||
disabled2: false,
|
size: '99',
|
||||||
disabled3: false,
|
busy: false,
|
||||||
disabled4: false
|
desc: ''
|
||||||
}
|
|
||||||
},
|
|
||||||
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 () {
|
created () {
|
||||||
this._checkGetBcpStor()
|
this._bypda()
|
||||||
this._checkGetDtlAll()
|
|
||||||
this._checkGetPoint()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 仓库下拉框
|
|
||||||
async _checkGetBcpStor () {
|
|
||||||
let res = await checkGetBcpStor()
|
|
||||||
this.options1 = [...res.data]
|
|
||||||
},
|
|
||||||
// grid
|
// grid
|
||||||
async _checkGetDtlAll () {
|
async _bypda () {
|
||||||
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.page = 1
|
||||||
this.dataList = [...res.data]
|
this.busy = false
|
||||||
|
this.desc = ''
|
||||||
|
let res = await bypda(this.page + '', this.size)
|
||||||
|
this.dataList = []
|
||||||
|
this.dataList = [...res.content]
|
||||||
|
if (res.content.length < 99) {
|
||||||
|
this.busy = true
|
||||||
|
this.desc = '已加载全部数据'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 盘点位下拉框
|
async loadMore () {
|
||||||
async _checkGetPoint () {
|
this.busy = true
|
||||||
let res = await checkGetPoint()
|
this.page++
|
||||||
this.options2 = [...res.data]
|
let res = await bypda(this.page + '', this.size)
|
||||||
|
this.dataList = [...this.dataList, ...res.content]
|
||||||
|
if (res.content.length < 99) {
|
||||||
|
this.busy = true
|
||||||
|
this.desc = '已加载全部数据'
|
||||||
|
} else {
|
||||||
|
this.busy = false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.checkdtl_id ? '' : e.checkdtl_id
|
this.pkId = this.pkId === e.struct_code ? '' : e.struct_code
|
||||||
this.pkObj = this.pkId === e.checkdtl_id ? e : {}
|
this.pkObj = this.pkId === e.struct_code ? e : {}
|
||||||
},
|
},
|
||||||
// 下发(按钮)
|
toSure () {
|
||||||
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) {
|
if (!this.pkId) {
|
||||||
this.disabled3 = false
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
this.$router.push({
|
||||||
let res = await checkConfirmOffer(this.pkObj)
|
path: '/letteringmachineselect',
|
||||||
this.toast(res.message)
|
query: {
|
||||||
this._checkGetDtlAll()
|
code: this.pkObj.struct_code,
|
||||||
this.disabled3 = false
|
weight: this.pkObj.canuse_qty
|
||||||
} 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>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<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>
|
</style>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<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="value1" filterable clearable placeholder="请选择">
|
<el-select v-model="value1" filterable clearable placeholder="请选择" disabled>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options1"
|
v-for="item in options1"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -16,9 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_2">
|
<div class="search-item_2">
|
||||||
<button class="button button--primary" @click="_washWashTasks">快速查询</button>
|
<button class="button button--primary" @click="_KzTasks">查询</button>
|
||||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === ''}" @click="_washWashVechileInfo">强制完成</button>
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === ''}" @click="toSure1">强制完成</button>
|
||||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="_washWashFinish('1')">强制取消</button>
|
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="toSure2">强制取消</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,219 +32,90 @@
|
|||||||
<th>起点</th>
|
<th>起点</th>
|
||||||
<th>终点</th>
|
<th>终点</th>
|
||||||
<th>物料规格</th>
|
<th>物料规格</th>
|
||||||
<th>上料重量(kg)</th>
|
<th>上料重量(g)</th>
|
||||||
<th>分配重量</th>
|
<th>分配重量</th>
|
||||||
<th>任务状态</th>
|
<th>任务状态</th>
|
||||||
<th>执行步骤</th>
|
<th>执行步骤</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="e in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
|
<tr v-for="(e, i) in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
|
||||||
<td>{{ e.sep_on }}</td>
|
<td>{{ i+1 }}</td>
|
||||||
<td>{{ e.create_time }}</td>
|
<td>{{ e.create_tie }}</td>
|
||||||
<td>{{e.task_code}}</td>
|
<td>{{ e.task_code }}</td>
|
||||||
<td>{{e.material_code}}</td>
|
<td>{{e.point_code1}}</td>
|
||||||
|
<td>{{e.point_code3}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.material_qty | unitskg}}</td>
|
<td>{{e.material_qty | numeric}}</td>
|
||||||
<td>{{ e.material_name }}</td>
|
<td>{{ e.qtyArr | numeric }}</td>
|
||||||
|
<td>{{ ['生成', '任务异常', '确定终点', '起点和终点确认', '下发', '运行', '完成', '取消'][Number(e.task_status) - 1] }}</td>
|
||||||
|
<td>{{ e.task_step }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<jxDialog
|
|
||||||
ref="child"
|
|
||||||
title="提示"
|
|
||||||
:type="type"
|
|
||||||
@toSure="toSureDialog"
|
|
||||||
@toCancle="toCancle"
|
|
||||||
>
|
|
||||||
<div class="form_wraper">当前任务号不是第一个任务是否确认下料?</div>
|
|
||||||
</jxDialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import jxDialog from '@components/dialog.vue'
|
import {KzTasks, operation} from '@config/getData2.js'
|
||||||
import {dictAll, washWashTasks, washWashVechileInfo, washWashFinish, washWashTaskFinish, washWashQzFinish, bcpInCallVehicle} from '@config/getData2.js'
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
jxDialog
|
|
||||||
},
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [{value: 'A1', label: 'A1'}],
|
||||||
value1: '',
|
value1: 'A1',
|
||||||
weight: '',
|
|
||||||
vechile_code: '',
|
|
||||||
dataList: [],
|
dataList: [],
|
||||||
sep_on: '',
|
|
||||||
pkId: '',
|
pkId: '',
|
||||||
pkObj: {},
|
pkObj: {},
|
||||||
type: '',
|
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false,
|
disabled2: false
|
||||||
disabled3: false,
|
|
||||||
disabled4: false,
|
|
||||||
disabled5: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
this._dictAll()
|
this._KzTasks()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 车间下拉框
|
|
||||||
async _dictAll () {
|
|
||||||
let res = await dictAll()
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.options1 = [...res.content]
|
|
||||||
this.value1 = this.options1[0].value
|
|
||||||
this._washWashTasks()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// grid
|
// grid
|
||||||
async _washWashTasks () {
|
async _KzTasks () {
|
||||||
let res = await washWashTasks(this.value1)
|
let res = await KzTasks()
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.pkId = ''
|
this.pkId = ''
|
||||||
this.pkObj = {}
|
this.pkObj = {}
|
||||||
this.dataList = [...res.content]
|
this.dataList = [...res.content]
|
||||||
if (this.dataList.length > 0) {
|
|
||||||
this.sep_on = this.dataList[0].sep_on
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
||||||
this.pkObj = this.pkId === e.task_id ? e : {}
|
this.pkObj = this.pkId === e.task_id ? e : {}
|
||||||
},
|
},
|
||||||
// 获取信息
|
toSure1 () {
|
||||||
async _washWashVechileInfo () {
|
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.value1 === '') {
|
if (this.pkId === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
this._operation('forceFinish')
|
||||||
let res = await washWashVechileInfo(this.value1)
|
|
||||||
if (res.code === 200) {
|
|
||||||
if (res.content.length > 0) {
|
|
||||||
this.weight = res.content[0].weight
|
|
||||||
this.vechile_code = res.content[0].vechile_code
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.disabled1 = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled1 = false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 确认下料
|
toSure2 () {
|
||||||
async _washWashFinish (type) {
|
|
||||||
this.disabled2 = true
|
this.disabled2 = true
|
||||||
if (this.pkId === '') {
|
if (this.pkId === '') {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.pkObj.sep_on !== this.sep_on) {
|
this._operation('cancel')
|
||||||
this.type = type
|
|
||||||
this.$refs.child.active = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.__washWashFinish()
|
|
||||||
},
|
},
|
||||||
async __washWashFinish () {
|
async _operation (type) {
|
||||||
try {
|
try {
|
||||||
let res = await washWashFinish(this.pkId, this.weight, this.vechile_code)
|
let res = await operation(this.pkId, type)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.toast(res.msg)
|
this.toast(res.msg)
|
||||||
this._washWashTasks()
|
this._KzTasks()
|
||||||
}
|
}
|
||||||
|
this.disabled1 = false
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
this.disabled1 = false
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
this.$refs.child.active = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制完成
|
|
||||||
async _washWashTaskFinish (type) {
|
|
||||||
this.disabled3 = true
|
|
||||||
if (this.pkId === '') {
|
|
||||||
this.disabled3 = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.pkObj.sep_on !== this.sep_on) {
|
|
||||||
this.type = type
|
|
||||||
this.$refs.child.active = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.__washWashTaskFinish()
|
|
||||||
},
|
|
||||||
async __washWashTaskFinish () {
|
|
||||||
try {
|
|
||||||
let res = await washWashTaskFinish(this.pkId)
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.toast(res.msg)
|
|
||||||
this._washWashTasks()
|
|
||||||
}
|
|
||||||
this.disabled3 = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled3 = false
|
|
||||||
this.$refs.child.active = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 强制下料
|
|
||||||
async _washWashQzFinish (type) {
|
|
||||||
this.disabled4 = true
|
|
||||||
if (this.pkId === '') {
|
|
||||||
this.disabled4 = false
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (this.pkObj.sep_on !== this.sep_on) {
|
|
||||||
this.type = type
|
|
||||||
this.$refs.child.active = true
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.__washWashQzFinish()
|
|
||||||
},
|
|
||||||
async __washWashQzFinish () {
|
|
||||||
try {
|
|
||||||
let res = await washWashQzFinish(this.pkId, this.weight, this.vechile_code)
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.toast(res.msg)
|
|
||||||
this._washWashTasks()
|
|
||||||
}
|
|
||||||
this.disabled4 = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled4 = false
|
|
||||||
this.$refs.child.active = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toSureDialog (type) {
|
|
||||||
switch (type) {
|
|
||||||
case '1':
|
|
||||||
this.__washWashFinish()
|
|
||||||
break
|
|
||||||
case '2':
|
|
||||||
this.__washWashTaskFinish()
|
|
||||||
break
|
|
||||||
case '3':
|
|
||||||
this.__washWashQzFinish()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
toCancle () {
|
|
||||||
this.disabled2 = false
|
|
||||||
this.disabled3 = false
|
|
||||||
this.disabled4 = false
|
|
||||||
},
|
|
||||||
async _bcpInCallVehicle () {
|
|
||||||
this.disabled5 = true
|
|
||||||
try {
|
|
||||||
let res = await bcpInCallVehicle()
|
|
||||||
if (res.code === 200) {
|
|
||||||
this.toast(res.msg)
|
|
||||||
}
|
|
||||||
this.disabled5 = false
|
|
||||||
} catch (e) {
|
|
||||||
this.disabled5 = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user