新增 vue vue-element 组件,用户开发操作复杂页面

新增散料,修改盘料入库逻辑
This commit is contained in:
zgf committed 2023-08-21 23:41:26 +08:00
1 parent eeafb20012
commit 630e33a27a
726 files changed
+281372 -151

No files matched your search

@@ -1,8 +1,8 @@
<el-row id="app" :gutter="20">
<el-row id="plapp" :gutter="20">
<el-col :span="6">
<el-card class="box-card" :span="8">
<el-select v-model="value" clearable filterable placeholder="请选择单据" size="big" style="width:100%"
@@change="changeselect">
@@change="changeselect" @@clear="clearReceipt">
<el-option v-for="item in options"
:key="item.value"
:label="item.label"
@@ -71,7 +71,7 @@
<script>
var app = new Vue({
el: '#app',
el: '#plapp',
data() {
var validatePass = (rule, value, callback) => {
if (value === '') {
@@ -83,7 +83,7 @@
callback(new Error('请输入正确周转箱编码'));
}
};
return {
form: {
code: '',
@@ -96,7 +96,7 @@
value: '',
tableData: [],
bindingData: [],
dataIndex:[],
dataIndex: [],
rules: {
boxCode: [
{ validator: validatePass, trigger: 'blur' }
@@ -104,12 +104,12 @@
}
}
},
mounted: function() {
mounted: function () {
// 获取所有单据编码
$.ajax({
type: "post",
dataType: "json",
data:{},
data: {},
url: "/receipt/ReceiptIn/SelectReceiptCode",
success: function (json) {
app.options = json.Data;
@@ -125,9 +125,7 @@
},
onSubmit() {
var _this = this;
console.log('submit!');
console.log(this.form);
// 提交已绑定数据
$.ajax({
type: "post",
@@ -141,7 +139,7 @@
});
_this.resetForm('form');
}
else{
else {
_this.$message({
message: '绑定失败!',
type: 'warning'
@@ -161,6 +159,9 @@
this.form.boxSize = [];
this.bindingData = [];
},
clearReceipt() {
this.tableData = [];
},
// 选择单据后,查询明细
changeselect(data) {
var _this = this;
@@ -194,7 +195,7 @@
}
},
// 扫描周转箱
scanBox(data){
scanBox(data) {
this.form.size = '';
this.form.boxSize = [];
if (data == "M00000001" || data == "M00000002") {
@@ -213,6 +214,10 @@
});
return;
}
// 重新扫描箱号后,待绑定列表清空
this.bindingData = [];
this.changeselect(this.value);
this.$refs.uniqueCode.focus();
},
// 选择尺寸后
@@ -242,7 +247,7 @@
})
if (isExit == -1) {
this.$message({
message: '唯一码'+ data + '不正确!',
message: '唯一码' + data + '不正确!',
type: 'warning'
});
this.form.uniqueCode = '';
@@ -259,7 +264,7 @@
receiptCode: this.form.code,
boxCode: this.form.boxCode,
index: this.dataIndex.shift(),
uniqueCode : data,
uniqueCode: data,
size: this.form.size
})
this.form.uniqueCode = '';
@@ -272,6 +277,6 @@
this.dataIndex.unshift(rows[index].index);
rows.splice(index, 1);
}
}
}
});
</script>