添加客户管理
修改入库页面 修改 库存 物料 工序等页面
This commit is contained in:
1 parent
2435176f77
commit
c2b039ea47
41 files changed
+977
-160
No files matched your search
@@ -1,10 +1,10 @@
|
||||
<div id="receiptin">
|
||||
<a-space direction="vertical" fill>
|
||||
<a-form :model="formData" layout="horizontal" :label-col="{ style: { width: '100px' } }" :wrapper-col="{ style: { width: '220px' } }">
|
||||
<a-form-item field="containerCode" label="容器编码">
|
||||
<a-form-item field="containerCode" label="托盘号">
|
||||
<a-input
|
||||
v-model="ContainerCode"
|
||||
placeholder="扫描箱号"
|
||||
placeholder="扫描托盘号"
|
||||
allow-clear
|
||||
@@keyup.enter="validateContainer"
|
||||
ref="containerInput"/>
|
||||
@@ -15,21 +15,33 @@
|
||||
:data="materialOptions"
|
||||
@@search="handleSearch"
|
||||
@@select="handleSelect"
|
||||
placeholder="输入物料编码或名称"
|
||||
placeholder="输入物料编码或图号"
|
||||
ref="materialInput">
|
||||
</a-auto-complete>
|
||||
</a-form-item>
|
||||
<a-form-item field="materialName" label="物料名称">
|
||||
<a-input v-model="MaterialName" disabled/>
|
||||
<a-form-item field="materialName" label="图号">
|
||||
<a-input v-model="MaterialName"/>
|
||||
</a-form-item>
|
||||
<a-form-item field="materialSpec" label="物料型号">
|
||||
<a-input v-model="MaterialSpec" disabled/>
|
||||
@* <a-form-item field="materialSpec" label="物料型号"> *@
|
||||
@* <a-input v-model="MaterialSpec" disabled/> *@
|
||||
@* </a-form-item> *@
|
||||
<a-form-item field="sourceCode" label="订单号">
|
||||
<a-input v-model="SourceCode" placeholder="输入订单号" ref="sourceCodeInput" @@keydown.enter="this.$nextTick(() => {
|
||||
this.$refs.companyCodeInput.focus();
|
||||
});"/>
|
||||
</a-form-item>
|
||||
<a-form-item field="company" label="公司">
|
||||
<a-input v-model="Company" placeholder="输入公司"/>
|
||||
<a-form-item field="companyCode" label="公司">
|
||||
<a-auto-complete
|
||||
v-model="CompanyCode"
|
||||
:data="companyOptions"
|
||||
@@search="handleCompanySearch"
|
||||
@@select="handleCompanySelect"
|
||||
placeholder="输入公司名称或编码"
|
||||
ref="companyCodeInput">
|
||||
</a-auto-complete>
|
||||
</a-form-item>
|
||||
<a-form-item field="qty" label="数量">
|
||||
<a-input-number v-model="Qty" :min="0" style="width: 100%"/>
|
||||
<a-input-number v-model="Qty" :min="0" style="width: 100%" ref="numInput" @@keydown.enter="this.handleBind()"/>
|
||||
</a-form-item>
|
||||
<a-form-item>
|
||||
<a-space>
|
||||
@@ -46,7 +58,7 @@
|
||||
<a-space>
|
||||
<a-button type="text" status="danger" @@click="handleDelete(record)">删除</a-button>
|
||||
<a-button type="text" @@click="handleEdit(record)">修改</a-button>
|
||||
@* <a-button type="text" @@click="handleDeduct(record)">扣料</a-button> *@
|
||||
<a-button type="text" @@click="handleDeduct(record)">扣料</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<template #qty="{ record }">
|
||||
@@ -77,6 +89,7 @@
|
||||
<a-radio-group v-model="outForm.level">
|
||||
<a-radio value="high">高货位</a-radio>
|
||||
<a-radio value="low">低货位</a-radio>
|
||||
<a-radio value="mid">模具库</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
<a-form-item label="出库口">
|
||||
@@ -98,7 +111,8 @@
|
||||
MaterialCode: '',
|
||||
MaterialName: '',
|
||||
MaterialSpec: '',
|
||||
Company: '',
|
||||
SourceCode: '',
|
||||
CompanyCode: '',
|
||||
Qty: null,
|
||||
loading1: false,
|
||||
materialOptions: [],
|
||||
@@ -150,9 +164,13 @@
|
||||
title: '物料型号',
|
||||
dataIndex: 'MaterialSpec',
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'SourceCode',
|
||||
},
|
||||
{
|
||||
title: '公司',
|
||||
dataIndex: 'Company',
|
||||
dataIndex: 'CompanyCode',
|
||||
},
|
||||
{
|
||||
title: '数量',
|
||||
@@ -169,10 +187,13 @@
|
||||
containerCode: '',
|
||||
materialCode: '',
|
||||
materialName: '',
|
||||
materialSpec: '',
|
||||
company: '',
|
||||
materialSpec: '',
|
||||
sourceCode: '',
|
||||
companyCode: '',
|
||||
qty: 1
|
||||
}
|
||||
},
|
||||
companyOptions: [],
|
||||
companySearchTimer: null
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -203,7 +224,7 @@
|
||||
_this.materialOptions = json.data.Data.map(item => ({
|
||||
...item,
|
||||
value: item.MaterialCode,
|
||||
label: `${item.MaterialCode} - ${item.MaterialName} - ${item.MaterialSpec}`
|
||||
label: `${item.MaterialCode} - ${item.MaterialType} - ${item.MaterialName}`
|
||||
}));
|
||||
} else {
|
||||
_this.$message.error(json.data.Msg);
|
||||
@@ -220,9 +241,13 @@
|
||||
const selectedMaterial = this.materialOptions.find(item => item.value === value);
|
||||
if (selectedMaterial) {
|
||||
this.MaterialCode = selectedMaterial.MaterialCode;
|
||||
this.MaterialName = selectedMaterial.MaterialName;
|
||||
this.MaterialName = selectedMaterial.MaterialType;
|
||||
this.MaterialSpec = selectedMaterial.MaterialSpec;
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs.sourceCodeInput.focus();
|
||||
});
|
||||
},
|
||||
|
||||
handleBind() {
|
||||
@@ -254,7 +279,8 @@
|
||||
MaterialCode: this.MaterialCode,
|
||||
MaterialName: this.MaterialName,
|
||||
MaterialSpec: this.MaterialSpec,
|
||||
Company: this.Company,
|
||||
SourceCode: this.SourceCode,
|
||||
CompanyCode: this.CompanyCode,
|
||||
Qty: this.Qty
|
||||
};
|
||||
|
||||
@@ -262,7 +288,8 @@
|
||||
let postData = new URLSearchParams();
|
||||
postData.append('containerCode', this.ContainerCode);
|
||||
postData.append('materialCode', this.MaterialCode);
|
||||
postData.append('company', this.Company);
|
||||
postData.append('company', this.CompanyCode);
|
||||
postData.append('sourceCode', this.SourceCode);
|
||||
postData.append('qty', this.Qty);
|
||||
|
||||
axios.post("/receipt/SimpleReceiptIn/AddInventory", postData)
|
||||
@@ -276,7 +303,8 @@
|
||||
this.MaterialCode = '';
|
||||
this.MaterialName = '';
|
||||
this.MaterialSpec = '';
|
||||
this.Company = '';
|
||||
this.SourceCode = '';
|
||||
this.CompanyCode = '';
|
||||
this.Qty = null;
|
||||
// 验证成功后,将焦点设置到物料编码输入框
|
||||
this.$nextTick(() => {
|
||||
@@ -309,7 +337,8 @@
|
||||
this.MaterialCode = '';
|
||||
this.MaterialName = '';
|
||||
this.MaterialSpec = '';
|
||||
this.Company = '';
|
||||
this.SourceCode = '';
|
||||
this.CompanyCode = '';
|
||||
this.Qty = 1;
|
||||
this.bindList = [];
|
||||
this.$notification.success("入库任务创建成功!");
|
||||
@@ -498,7 +527,7 @@
|
||||
this.MaterialCode = '';
|
||||
this.MaterialName = '';
|
||||
this.MaterialSpec = '';
|
||||
this.Company = '';
|
||||
this.CompanyCode = '';
|
||||
this.Qty = 1;
|
||||
this.bindList = [];
|
||||
this.$notification.success("空托入库成功!");
|
||||
@@ -546,8 +575,9 @@
|
||||
this.MaterialCode = '';
|
||||
this.MaterialName = '';
|
||||
this.MaterialSpec = '';
|
||||
this.Company = '';
|
||||
this.Qty = 1;
|
||||
this.SourceCode = '';
|
||||
this.CompanyCode = '';
|
||||
this.Qty = '';
|
||||
this.bindList = [];
|
||||
this.outModalVisible = false;
|
||||
this.$notification.success("呼叫出库成功!");
|
||||
@@ -570,6 +600,47 @@
|
||||
},
|
||||
handleOutCancel() {
|
||||
this.outModalVisible = false;
|
||||
},
|
||||
handleCompanySearch(value) {
|
||||
if (this.companySearchTimer) {
|
||||
clearTimeout(this.companySearchTimer);
|
||||
}
|
||||
this.companySearchTimer = setTimeout(() => {
|
||||
if (value) {
|
||||
this.searchCompanies(value);
|
||||
} else {
|
||||
this.companyOptions = [];
|
||||
}
|
||||
}, 300);
|
||||
},
|
||||
searchCompanies(keyword) {
|
||||
var _this = this;
|
||||
axios.get(`/receipt/SimpleReceiptIn/SearchCompanies?keyword=${encodeURIComponent(keyword)}`)
|
||||
.then(function (json) {
|
||||
if (json.data.Code == 200) {
|
||||
_this.companyOptions = json.data.Data.map(item => ({
|
||||
...item,
|
||||
value: item.CompanyName,
|
||||
label: `${item.CompanyCode} - ${item.CompanyName}`
|
||||
}));
|
||||
} else {
|
||||
_this.$message.error(json.data.Msg);
|
||||
_this.companyOptions = [];
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
_this.$message.error(error);
|
||||
_this.companyOptions = [];
|
||||
});
|
||||
},
|
||||
handleCompanySelect(value, option) {
|
||||
const selectedCompany = this.companyOptions.find(item => item.value === value);
|
||||
if (selectedCompany) {
|
||||
this.CompanyCode = selectedCompany.CompanyName;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.numInput.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user