刻字工序
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<div class="search-item">
|
||||
<div class="search-label">车间</div>
|
||||
<div class="filter_input_wraper">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择">
|
||||
<el-select v-model="value1" filterable clearable placeholder="请选择" disabled>
|
||||
<el-option
|
||||
v-for="item in options1"
|
||||
:key="item.value"
|
||||
@@ -16,9 +16,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item_2">
|
||||
<button class="button button--primary" @click="_washWashTasks">快速查询</button>
|
||||
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': value1 === ''}" @click="_washWashVechileInfo">强制完成</button>
|
||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="_washWashFinish('1')">强制取消</button>
|
||||
<button class="button button--primary" @click="_KzTasks">查询</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="toSure2">强制取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -32,219 +32,90 @@
|
||||
<th>起点</th>
|
||||
<th>终点</th>
|
||||
<th>物料规格</th>
|
||||
<th>上料重量(kg)</th>
|
||||
<th>上料重量(g)</th>
|
||||
<th>分配重量</th>
|
||||
<th>任务状态</th>
|
||||
<th>执行步骤</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="e in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
|
||||
<td>{{ e.sep_on }}</td>
|
||||
<td>{{ e.create_time }}</td>
|
||||
<td>{{e.task_code}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<tr v-for="(e, i) in dataList" :key="e.task_id" :class="{'selected_icon': pkId === e.task_id}" @click="toRadio(e)">
|
||||
<td>{{ i+1 }}</td>
|
||||
<td>{{ e.create_tie }}</td>
|
||||
<td>{{ e.task_code }}</td>
|
||||
<td>{{e.point_code1}}</td>
|
||||
<td>{{e.point_code3}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
<td>{{e.material_qty | unitskg}}</td>
|
||||
<td>{{ e.material_name }}</td>
|
||||
<td>{{e.material_qty | numeric}}</td>
|
||||
<td>{{ e.qtyArr | numeric }}</td>
|
||||
<td>{{ ['生成', '任务异常', '确定终点', '起点和终点确认', '下发', '运行', '完成', '取消'][Number(e.task_status) - 1] }}</td>
|
||||
<td>{{ e.task_step }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<jxDialog
|
||||
ref="child"
|
||||
title="提示"
|
||||
:type="type"
|
||||
@toSure="toSureDialog"
|
||||
@toCancle="toCancle"
|
||||
>
|
||||
<div class="form_wraper">当前任务号不是第一个任务是否确认下料?</div>
|
||||
</jxDialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import jxDialog from '@components/dialog.vue'
|
||||
import {dictAll, washWashTasks, washWashVechileInfo, washWashFinish, washWashTaskFinish, washWashQzFinish, bcpInCallVehicle} from '@config/getData2.js'
|
||||
import {KzTasks, operation} from '@config/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
jxDialog
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
options1: [],
|
||||
value1: '',
|
||||
weight: '',
|
||||
vechile_code: '',
|
||||
options1: [{value: 'A1', label: 'A1'}],
|
||||
value1: 'A1',
|
||||
dataList: [],
|
||||
sep_on: '',
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
type: '',
|
||||
disabled1: false,
|
||||
disabled2: false,
|
||||
disabled3: false,
|
||||
disabled4: false,
|
||||
disabled5: false
|
||||
disabled2: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this._dictAll()
|
||||
this._KzTasks()
|
||||
},
|
||||
methods: {
|
||||
// 车间下拉框
|
||||
async _dictAll () {
|
||||
let res = await dictAll()
|
||||
if (res.code === 200) {
|
||||
this.options1 = [...res.content]
|
||||
this.value1 = this.options1[0].value
|
||||
this._washWashTasks()
|
||||
}
|
||||
},
|
||||
// grid
|
||||
async _washWashTasks () {
|
||||
let res = await washWashTasks(this.value1)
|
||||
async _KzTasks () {
|
||||
let res = await KzTasks()
|
||||
if (res.code === 200) {
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.dataList = [...res.content]
|
||||
if (this.dataList.length > 0) {
|
||||
this.sep_on = this.dataList[0].sep_on
|
||||
}
|
||||
}
|
||||
},
|
||||
toRadio (e) {
|
||||
this.pkId = this.pkId === e.task_id ? '' : e.task_id
|
||||
this.pkObj = this.pkId === e.task_id ? e : {}
|
||||
},
|
||||
// 获取信息
|
||||
async _washWashVechileInfo () {
|
||||
toSure1 () {
|
||||
this.disabled1 = true
|
||||
if (this.value1 === '') {
|
||||
if (this.pkId === '') {
|
||||
this.disabled1 = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
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
|
||||
}
|
||||
this._operation('forceFinish')
|
||||
},
|
||||
// 确认下料
|
||||
async _washWashFinish (type) {
|
||||
toSure2 () {
|
||||
this.disabled2 = true
|
||||
if (this.pkId === '') {
|
||||
this.disabled2 = false
|
||||
return
|
||||
}
|
||||
if (this.pkObj.sep_on !== this.sep_on) {
|
||||
this.type = type
|
||||
this.$refs.child.active = true
|
||||
return
|
||||
}
|
||||
this.__washWashFinish()
|
||||
this._operation('cancel')
|
||||
},
|
||||
async __washWashFinish () {
|
||||
async _operation (type) {
|
||||
try {
|
||||
let res = await washWashFinish(this.pkId, this.weight, this.vechile_code)
|
||||
let res = await operation(this.pkId, type)
|
||||
if (res.code === 200) {
|
||||
this.toast(res.msg)
|
||||
this._washWashTasks()
|
||||
this._KzTasks()
|
||||
}
|
||||
this.disabled1 = false
|
||||
this.disabled2 = false
|
||||
} catch (e) {
|
||||
this.disabled1 = 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