物料组盘

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

@@ -4,6 +4,14 @@
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<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-col-7">
<span class="filter_label">设备点位</span>
@@ -103,6 +111,8 @@
data() {
return {
title: '',
options: [],
index: '',
options2: [],
index2: '',
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) {
try {
let res = await pointList(e)
@@ -192,6 +214,10 @@
this.options2 = []
}
},
selectChange (e) {
this.index = e
this._pointList(e)
},
selectChange2 (e) {
this.index2 = e
this._jbGetVehicleCode()
@@ -271,7 +297,7 @@
title: res.message,
icon: 'none'
})
this.val3 = res.data.weight
this.val3 = res.data.org_weight
this.flag = res.data.flag
this.dupWeight = res.data.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"/> -->
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 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}" @tap="seachList">查询工单</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>
</template>
@@ -68,7 +69,7 @@
<script>
import NavBar from '@/components/NavBar.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 {
components: {
NavBar,
@@ -225,6 +226,31 @@
} catch (e) {
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 class="zd-row border-bottom">
<view class="zd-col-7">
<span class="filter_label filter_input_disabled">物料编码</span>
<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_code" 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>
<input type="text" class="filter_input filter_input_disabled" v-model="currentData.batch_no" disabled>
</view>
</view>
<view class="zd-row border-bottom">