刻字管理模块
This commit is contained in:
@@ -15,9 +15,9 @@
|
|||||||
</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" v-model="$route.query.weight" disabled>
|
<input type="number" class="filter-input" v-model="$route.query.num" disabled>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-item_3 flex-end">
|
<div class="search-item_3 flex-end">
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
<th>计划数量</th>
|
<th>计划数量</th>
|
||||||
<th>生产数量</th>
|
<th>生产数量</th>
|
||||||
<th>物料规格</th>
|
<th>物料规格</th>
|
||||||
<th>重量(g)</th>
|
<th>数量</th>
|
||||||
<th>物料编号</th>
|
<th>物料编号</th>
|
||||||
<th>物料名称</th>
|
<th>物料名称</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
<td>{{e.plan_qty | numeric(3)}}</td>
|
<td>{{e.plan_qty | numeric(3)}}</td>
|
||||||
<td>{{e.dq_real_qty | numeric(3)}}</td>
|
<td>{{e.dq_real_qty | numeric(3)}}</td>
|
||||||
<td>{{ e.material_spec }}</td>
|
<td>{{ e.material_spec }}</td>
|
||||||
<td><input type="number" class="input" v-model="e.weight" @blur="handleBlur(e)"></td>
|
<td><input type="number" class="input" v-model="e.qty" @blur="handleBlur(e)"></td>
|
||||||
<td>{{ e.material_code }}</td>
|
<td>{{ e.material_code }}</td>
|
||||||
<td>{{ e.material_name }}</td>
|
<td>{{ e.material_name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
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.$set(el, 'qty', '')
|
||||||
})
|
})
|
||||||
this.dataList = [...res.content]
|
this.dataList = [...res.content]
|
||||||
}
|
}
|
||||||
@@ -95,17 +95,17 @@ export default {
|
|||||||
if (this.checkArr.length === 0) {
|
if (this.checkArr.length === 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let weight = accDiv(this.$route.query.weight, this.checkArr.length)
|
let qty = accDiv(this.$route.query.num, this.checkArr.length)
|
||||||
weight = Number(weight).toFixed(0)
|
qty = Number(qty).toFixed(0)
|
||||||
this.dataList.map(el => {
|
this.dataList.map(el => {
|
||||||
if (el.checked === true) {
|
if (el.checked === true) {
|
||||||
this.$set(el, 'weight', weight)
|
this.$set(el, 'qty', qty)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toCancle () {
|
toCancle () {
|
||||||
this.dataList.map(el => {
|
this.dataList.map(el => {
|
||||||
this.$set(el, 'weight', '')
|
this.$set(el, 'qty', '')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 确认上料
|
// 确认上料
|
||||||
@@ -118,8 +118,8 @@ export default {
|
|||||||
let total = 0
|
let total = 0
|
||||||
let flag = false
|
let flag = false
|
||||||
this.checkArr.map(el => {
|
this.checkArr.map(el => {
|
||||||
total = accAdd(total, el.weight)
|
total = accAdd(total, el.qty)
|
||||||
if (el.weight === '') {
|
if (el.qty === '') {
|
||||||
flag = true
|
flag = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -128,15 +128,15 @@ export default {
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (Number(total) > Number(this.$route.query.weight)) {
|
if (Number(total) > Number(this.$route.query.num)) {
|
||||||
this.toast('总重量之和不大于库存重量')
|
this.toast('总数量之和不大于库存数量')
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let arr = []
|
let arr = []
|
||||||
this.checkArr.map(el => {
|
this.checkArr.map(el => {
|
||||||
arr.push({device_code: el.device_code, weight: el.weight, struct_code: this.$route.query.code})
|
arr.push({device_code: el.device_code, qty: el.qty, struct_code: this.$route.query.code})
|
||||||
})
|
})
|
||||||
let res = await kzSubmitkz(arr)
|
let res = await kzSubmitkz(arr)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
@@ -149,7 +149,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleBlur (e) {
|
handleBlur (e) {
|
||||||
e.weight = Math.trunc(Number(e.weight))
|
e.qty = Math.trunc(Number(e.qty))
|
||||||
},
|
},
|
||||||
toRadio (e) {
|
toRadio (e) {
|
||||||
e.checked = !e.checked
|
e.checked = !e.checked
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<th>载具号</th>
|
<th>载具号</th>
|
||||||
<th>物料规格</th>
|
<th>物料规格</th>
|
||||||
<th>重量(kg)</th>
|
<th>重量(kg)</th>
|
||||||
|
<th>数量</th>
|
||||||
<th>物料编号</th>
|
<th>物料编号</th>
|
||||||
<th>入库时间</th>
|
<th>入库时间</th>
|
||||||
<th>是否已挑料</th>
|
<th>是否已挑料</th>
|
||||||
@@ -31,6 +32,7 @@
|
|||||||
<td>{{e.storagevehicle_code}}</td>
|
<td>{{e.storagevehicle_code}}</td>
|
||||||
<td>{{e.material_spec}}</td>
|
<td>{{e.material_spec}}</td>
|
||||||
<td>{{e.canuse_qty | unitskg}}</td>
|
<td>{{e.canuse_qty | unitskg}}</td>
|
||||||
|
<td>{{ e.m_qty }}</td>
|
||||||
<td>{{ e.material_code }}</td>
|
<td>{{ e.material_code }}</td>
|
||||||
<td>{{ e.instorage_time }}</td>
|
<td>{{ e.instorage_time }}</td>
|
||||||
<td>{{ e.is_pick === true ? '是' : '否' }}</td>
|
<td>{{ e.is_pick === true ? '是' : '否' }}</td>
|
||||||
@@ -110,7 +112,7 @@ export default {
|
|||||||
path: '/letteringmachineselect',
|
path: '/letteringmachineselect',
|
||||||
query: {
|
query: {
|
||||||
code: this.pkObj.struct_code,
|
code: this.pkObj.struct_code,
|
||||||
weight: this.pkObj.canuse_qty,
|
num: this.pkObj.m_qty,
|
||||||
spec: this.pkObj.material_spec
|
spec: this.pkObj.material_spec
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="search-item_2">
|
<div class="search-item_2">
|
||||||
<button class="button button--primary" @click="_KzTasks">查询</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="disabled3" :class="{'button--defalut': pkId === ''}" @click="_kzresend">下发</button>
|
||||||
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="toSure2">强制取消</button>
|
<button class="button button--primary" :disabled="disabled1" :class="{'button--defalut': pkId === ''}" @click="toSure1('1')">强制完成</button>
|
||||||
<button class="button button--primary" :disabled="disabled3" :class="{'button--defalut': pkId === ''}" @click="_kzresend">重新下发</button>
|
<button class="button button--primary" :disabled="disabled2" :class="{'button--defalut': pkId === ''}" @click="toSure2('2')">强制取消</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,12 +57,26 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<jxDialog
|
||||||
|
ref="child"
|
||||||
|
title="提示"
|
||||||
|
:type="type"
|
||||||
|
@toSure="toSureDialog"
|
||||||
|
@toCancle="toCancle"
|
||||||
|
>
|
||||||
|
<div v-show="type === '1'" class="form_wraper">是否强制完成该任务?</div>
|
||||||
|
<div v-show="type === '2'" class="form_wraper">是否强制取消该任务?</div>
|
||||||
|
</jxDialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import jxDialog from '@components/dialog.vue'
|
||||||
import {dictAll, KzTasks, operation, kzresend} from '@config/getData2.js'
|
import {dictAll, KzTasks, operation, kzresend} from '@config/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
jxDialog
|
||||||
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
options1: [],
|
options1: [],
|
||||||
@@ -72,7 +86,8 @@ export default {
|
|||||||
pkObj: {},
|
pkObj: {},
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
disabled2: false,
|
disabled2: false,
|
||||||
disabled3: false
|
disabled3: false,
|
||||||
|
type: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -101,21 +116,37 @@ export default {
|
|||||||
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 () {
|
toSure1 (type) {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
if (this.pkId === '') {
|
if (this.pkId === '') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this._operation('forceFinish')
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
},
|
},
|
||||||
toSure2 () {
|
toSure2 (type) {
|
||||||
this.disabled2 = true
|
this.disabled2 = true
|
||||||
if (this.pkId === '') {
|
if (this.pkId === '') {
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
this.type = type
|
||||||
|
this.$refs.child.active = true
|
||||||
|
},
|
||||||
|
toSureDialog (type) {
|
||||||
|
switch (type) {
|
||||||
|
case '1':
|
||||||
|
this._operation('forceFinish')
|
||||||
|
break
|
||||||
|
case '2':
|
||||||
this._operation('cancel')
|
this._operation('cancel')
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toCancle () {
|
||||||
|
this.disabled1 = false
|
||||||
|
this.disabled2 = false
|
||||||
},
|
},
|
||||||
async _operation (type) {
|
async _operation (type) {
|
||||||
try {
|
try {
|
||||||
@@ -129,6 +160,7 @@ export default {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
this.disabled2 = false
|
this.disabled2 = false
|
||||||
|
this.$refs.child.active = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 重新下发
|
// 重新下发
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<div class="search-confirm-wrap">
|
<div class="search-confirm-wrap">
|
||||||
<div class="search-wrap">
|
<div class="search-wrap">
|
||||||
<div class="search-item_3">
|
<div class="search-item_3">
|
||||||
<button class="button button--primary" :disabled="disabled1" @click="toSure">刻字上料</button>
|
<button class="button button--primary" :disabled="disabled1" @click="toSure">临时刻字上料</button>
|
||||||
<button class="button button--primary" :disabled="disabled2" @click="_tmpsendVechile">空框搬回</button>
|
<button class="button button--primary" :disabled="disabled2" @click="_tmpsendVechile">临时空框搬回</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user