物料组盘

This commit is contained in:
x
2026-05-28 10:42:50 +08:00
parent 853657c956
commit 8410ff44e0
5 changed files with 64 additions and 15 deletions

View File

@@ -133,7 +133,7 @@ export default {
font-size: 14px; font-size: 14px;
} }
input { input {
font-size: 14px; font-size: 15px;
color: #333; color: #333;
} }
</style> </style>

View File

@@ -4,6 +4,14 @@
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label">设备区域</span>
</view>
<view class="zd-col-24 filter_select">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label">设备点位</span> <span class="filter_label">设备点位</span>
@@ -103,6 +111,8 @@
data() { data() {
return { return {
title: '', title: '',
options: [],
index: '',
options2: [], options2: [],
index2: '', index2: '',
id: '', id: '',
@@ -180,6 +190,18 @@
// }) // })
} }
}, },
async _regionList () {
try {
let res = await regionList()
if (res) {
this.options = res.data
} else {
this.options = []
}
} catch (e) {
this.options = []
}
},
async _pointList (e) { async _pointList (e) {
try { try {
let res = await pointList(e) let res = await pointList(e)
@@ -192,6 +214,10 @@
this.options2 = [] this.options2 = []
} }
}, },
selectChange (e) {
this.index = e
this._pointList(e)
},
selectChange2 (e) { selectChange2 (e) {
this.index2 = e this.index2 = e
this._jbGetVehicleCode() this._jbGetVehicleCode()
@@ -271,7 +297,7 @@
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.val3 = res.data.weight this.val3 = res.data.org_weight
this.flag = res.data.flag this.flag = res.data.flag
this.dupWeight = res.data.weight this.dupWeight = res.data.weight
this.orgWeight = res.data.org_weight this.orgWeight = res.data.org_weight

View File

@@ -59,8 +59,9 @@
<!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> --> <!-- <uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/> -->
</view> </view>
<view class="zd-row submit-bar"> <view class="zd-row submit-bar">
<button class="zd-col-11 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button> <button class="zd-col-7 button-primary" :class="{'button-info': !index2}" @tap="seachList">查询工单</button>
<button class="zd-col-11 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="_callMaterial">开工</button> <button class="zd-col-7 button-primary" :class="{'button-info': !index2 || !pkId}" @tap="_callMaterial">开工</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !index2}" @tap="_callMaterialFinish">上料完成</button>
</view> </view>
</view> </view>
</template> </template>
@@ -68,7 +69,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {regionList, pointList, getOrderList, callMaterial} from '@/utils/getData4.js' import {regionList, pointList, getOrderList, callMaterial, callMaterialFinish} from '@/utils/getData4.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -225,6 +226,31 @@
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }
},
async _callMaterialFinish () {
this.disabled = true
if (!this.index2) {
this.disabled = false
return
}
try {
let res = await callMaterialFinish(this.pkId, this.index2, this.index)
if (res.code === '200') {
uni.showToast({
title: res.message,
icon: 'none'
})
this.clearUp()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled = false
}
} catch (e) {
this.disabled = false
}
} }
} }
} }

View File

@@ -41,18 +41,10 @@
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-7"> <view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料编码</span> <span class="filter_label filter_input_disabled">批次</span>
</view> </view>
<view class="zd-col-17"> <view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_code" disabled> <input type="text" class="filter_input filter_input_disabled" v-model="currentData.batch_no" disabled>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料名称</span>
</view>
<view class="zd-col-17">
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.material_name" disabled>
</view> </view>
</view> </view>
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">

View File

@@ -153,6 +153,11 @@ export const callMaterial = (wid, pcode, area) => request({
url:'api/pda/jb/callMaterial', url:'api/pda/jb/callMaterial',
data: {workorder_id: wid, point_code: pcode, area: area} data: {workorder_id: wid, point_code: pcode, area: area}
}) })
// 上料完成
export const callMaterialFinish = (wid, pcode, area) => request({
url:'api/pda/jb/callMaterialFinish',
data: {workorder_id: wid, point_code: pcode, area: area}
})
// 解包下料 // 解包下料
// 获取重量 // 获取重量