初始化仓库

This commit is contained in:
tao
2025-12-18 14:11:48 +08:00
parent e96f277a68
commit 54ec472bd4
1107 changed files with 158756 additions and 0 deletions

View File

@@ -0,0 +1,83 @@
<template>
<view>
<uni-forms ref="form" :modelValue="formData" :rules="rules">
<uni-row>
<uni-col :span="24">
<uni-forms-item label="物料件号" :labelWidth='90' name="pieceNo">
<uni-easyinput suffixIcon="scan" @iconClick="scanBar" v-model="formData.pieceNo" type="text" />
</uni-forms-item>
</uni-col>
</uni-row>
</uni-forms>
<u-button type="primary" @click="submit">提交</u-button>
</view>
</template>
<script>
import {
pieceReport
} from "@/api/mes/jobReport.js";
export default {
mounted() {
},
data() {
return {
formData: {
pieceNo: null,
},
rules: {
pieceNo: {
rules: [{
required: true,
errorMessage: '请输入件号!'
}]
},
}
}
},
methods: {
scanBar() {
const _this = this;
uni.scanCode({
scanType: ['qrCode', 'barCode'],
success: function(res) {
_this.formData.pieceNo = res.result;
}
});
},
submit() {
const _this = this;
this.$refs.form.validate().then(res => {
uni.showModal({
title: '提示',
content: '您确定报工吗?',
success: function(res) {
if (res.confirm) {
_this.$modal.loading('提交中')
pieceReport(_this.formData.pieceNo, {}).then(res => {
_this.$modal.closeLoading();
_this.$modal.msgSuccess("件号报工成功!");
setTimeout(() => {
_this.$tab.switchTab("/pages/work/index");
}, 500);
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
});
},
}
}
</script>
<style>
</style>