物料组盘

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

@@ -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
}
}
}
}