add 人工包装
This commit is contained in:
@@ -128,6 +128,14 @@
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/modules/manual-package",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
// "pageOrientation": "landscape",
|
||||
|
||||
@@ -64,7 +64,8 @@
|
||||
{menu_id: '4', name: '包装入库', path: '/pages/modules/package-instore'},
|
||||
{menu_id: '5', name: '呼叫满料', path: '/pages/modules/call-full-mater'},
|
||||
{menu_id: '6', name: '呼叫木盘', path: '/pages/modules/call-mupan'},
|
||||
{menu_id: '7', name: '空盘入库', path: '/pages/modules/empty-instore'}
|
||||
{menu_id: '7', name: '空盘入库', path: '/pages/modules/empty-instore'},
|
||||
{menu_id: '8', name: '人工包装', path: '/pages/modules/manual-package'}
|
||||
]},
|
||||
{menu_id: '6', icon: 'RF10', name: '压机搬运', path: '/pages/modules/press-carry', sonTree: []},
|
||||
{menu_id: '7', icon: 'RF08', name: '货架盘点', path: '/pages/modules/shelf-check', sonTree: []},
|
||||
|
||||
173
pages/modules/manual-package.vue
Normal file
173
pages/modules/manual-package.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<nav-bar title="人工包装"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">木托盘编码</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box v-model="val1" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">砖块数量</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="number" class="filter_input" v-model="val2">
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">是否满垛</view>
|
||||
<view class="relative filter_input_wraper">
|
||||
<switch :checked="isChecked" color="#6798ef" style="transform:scale(0.8)"/>
|
||||
<text @tap="setWStatus" style="position: absolute;display: inline-block;width: 52px; height: 32px;left: 0;"></text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd_wrapper grid-wraper">
|
||||
<view class="slide_new">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>订单号</th>
|
||||
<th>客户</th>
|
||||
<th>工单编码</th>
|
||||
<th>实际数量</th>
|
||||
<th>物料编码</th>
|
||||
<th>半成品编码</th>
|
||||
<th>原料编码</th>
|
||||
<th>物料名称</th>
|
||||
<th>物料规格</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{'checked': e.workorder_id === pkId}">
|
||||
<td>{{e.order_no}}</td>
|
||||
<td>{{filter(e.custer_no)}}</td>
|
||||
<td>{{e.workorder_code}}</td>
|
||||
<td>{{e.real_qty}}</td>
|
||||
<td>{{e.material_code}}</td>
|
||||
<td>{{e.half_material_code}}</td>
|
||||
<td>{{e.raw_material_code}}</td>
|
||||
<td>{{e.material_name}}</td>
|
||||
<td>{{e.material_spec}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-5 submit-button" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-8 submit-button" :class="{'btn-disabled': !val1 || !val2 || !pkId}" :disabled="disabled" @tap="_manualPackageBinding">绑定</button>
|
||||
<button class="zd-col-8 submit-button" :class="{'btn-disabled': !pkId}" :disabled="disabled" @tap="_manualPackageBinding">完工</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {manualPackageOrder, pdmBdWorkorderGetCuster, manualPackageBinding} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
isChecked: false,
|
||||
custer: [],
|
||||
dataList: [],
|
||||
pkId: '',
|
||||
pkObj: {},
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this._pdmBdWorkorderGetCuster()
|
||||
},
|
||||
methods: {
|
||||
filter (e) {
|
||||
let t = ''
|
||||
this.custer.forEach(el => {
|
||||
if (el.custer_NO === e) {
|
||||
t = el.custer_NAME
|
||||
}
|
||||
})
|
||||
return t
|
||||
},
|
||||
async _pdmBdWorkorderGetCuster () {
|
||||
let res = await pdmBdWorkorderGetCuster()
|
||||
this.custer = [...res]
|
||||
this._manualPackageOrder()
|
||||
},
|
||||
/** grid查询 */
|
||||
async _manualPackageOrder () {
|
||||
let res = await manualPackageOrder()
|
||||
this.dataList = [...res]
|
||||
},
|
||||
clearUp () {
|
||||
this.val1 = ''
|
||||
this.val2 = ''
|
||||
this.isChecked = false
|
||||
this.pkId = ''
|
||||
this.pkObj = {}
|
||||
this.disabled = false
|
||||
},
|
||||
/** 绑定 */
|
||||
async _manualPackageBinding () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2 || !this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
console.log(this.isChecked)
|
||||
let checked = this.isChecked ? '1' : '0'
|
||||
let res = await manualPackageBinding(this.val1, this.val2, checked, this.pkId)
|
||||
this.clearUp()
|
||||
this._manualPackageOrder()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
/** 完工 */
|
||||
async _manualPackageOrderOk () {
|
||||
this.disabled = true
|
||||
if (!this.pkId) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await manualPackageOrderOk(this.pkId)
|
||||
this.clearUp()
|
||||
this._manualPackageOrder()
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
},
|
||||
setWStatus () {
|
||||
this.isChecked = !this.isChecked
|
||||
},
|
||||
toCheck (e) {
|
||||
this.pkId = this.pkId === e.workorder_id ? '' : e.workorder_id
|
||||
this.pkObj = this.pkId === e.workorder_id ? e : {}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
</style>
|
||||
@@ -175,3 +175,23 @@ export const mixDeleteInfo = (obj) => request({
|
||||
url:'api/pda/mix/deleteInfo',
|
||||
data: obj
|
||||
})
|
||||
|
||||
/**
|
||||
* 人工包装
|
||||
*/
|
||||
export const manualPackageOrder = () => request({
|
||||
url:'api/pda/manualPackage/showOrders',
|
||||
data: {}
|
||||
})
|
||||
export const pdmBdWorkorderGetCuster = () => request({
|
||||
url:'api/pdmBdWorkorder/getCuster',
|
||||
data: {}
|
||||
})
|
||||
export const manualPackageBinding = (code, qty, is, id) => request({
|
||||
url:'api/pda/manualPackage/binding',
|
||||
data: {vehicle_code: code, qty: qty, is_full: is, workorder_id: id}
|
||||
})
|
||||
export const manualPackageOrderOk = (code, qty, is, id) => request({
|
||||
url:'api/pda/manualPackage/orderOk',
|
||||
data: {workorder_id: id}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user