卷料退库
明细拆分loading
This commit is contained in:
1 parent
43146db587
commit
8f8b558b46
4 files changed
+112
-14
No files matched your search
@@ -1,8 +1,12 @@
|
|||||||
<div id="print4">
|
<div id="print4">
|
||||||
|
|
||||||
<el-form ref="form" :inline="true" :model="form" size="mini" label-width="100px">
|
<el-form ref="form" :inline="true" :model="form" size="mini" label-width="100px">
|
||||||
<el-row>
|
<el-switch v-model="tk"
|
||||||
<el-col :span="24">
|
active-text="退库"
|
||||||
|
inactive-text="新入库">
|
||||||
|
</el-switch>
|
||||||
|
<el-divider></el-divider>
|
||||||
|
<el-row v-show="!tk">
|
||||||
<el-form-item label="仓库">
|
<el-form-item label="仓库">
|
||||||
<el-select v-model="form.ck" :popper-append-to-body="false" placeholder="仓库">
|
<el-select v-model="form.ck" :popper-append-to-body="false" placeholder="仓库">
|
||||||
<el-option v-for="item in ckList"
|
<el-option v-for="item in ckList"
|
||||||
@@ -18,11 +22,7 @@
|
|||||||
<el-input v-model="form.cj" placeholder="厂家" @@keyup.enter.native="splitCJ()">
|
<el-input v-model="form.cj" placeholder="厂家" @@keyup.enter.native="splitCJ()">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@* <el-form-item label="卷号">
|
|
||||||
<el-input v-model="form.jh" @@keyup.enter.native="splitJH()"
|
|
||||||
placeholder="卷号">
|
|
||||||
</el-input>
|
|
||||||
</el-form-item> *@
|
|
||||||
<el-form-item label="规格">
|
<el-form-item label="规格">
|
||||||
<el-input v-model="form.lot" @@keyup.enter.native="splitLot()"
|
<el-input v-model="form.lot" @@keyup.enter.native="splitLot()"
|
||||||
placeholder="规格">
|
placeholder="规格">
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
placeholder="重量">
|
placeholder="重量">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="米数">
|
<el-form-item label="米数">
|
||||||
<el-input v-model="form.len" @@keyup.enter.native="splitLen()"
|
<el-input v-model="form.len" @@keyup.enter.native="splitLen()"
|
||||||
@@ -51,6 +52,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row v-show="tk">
|
||||||
|
<el-form-item label="卷号">
|
||||||
|
<el-input v-model="form.jh" @@keyup.enter.native="scanJH()"
|
||||||
|
placeholder="卷号">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-button type="primary" @@click="create">创建入库单</el-button>
|
<el-button type="primary" @@click="create">创建入库单</el-button>
|
||||||
@@ -59,8 +67,6 @@
|
|||||||
<el-button type="success" @@click="print">打印</el-button>
|
<el-button type="success" @@click="print">打印</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-table :data="tableData"
|
<el-table :data="tableData"
|
||||||
max-height="600" stripe border
|
max-height="600" stripe border
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -78,7 +84,11 @@
|
|||||||
<el-input size="small" v-model="scope.row.Lot"></el-input>
|
<el-input size="small" v-model="scope.row.Lot"></el-input>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="重量" width="150" align="center" prop="Qty"></el-table-column>
|
<el-table-column label="重量" width="150" align="center" prop="Qty">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input size="small" v-model="scope.row.Qty"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="米数" width="150" align="center" prop="Len">
|
<el-table-column label="米数" width="150" align="center" prop="Len">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input size="small" v-model="scope.row.Len"></el-input>
|
<el-input size="small" v-model="scope.row.Len"></el-input>
|
||||||
@@ -112,7 +122,7 @@
|
|||||||
sn: '',
|
sn: '',
|
||||||
ph: ''
|
ph: ''
|
||||||
},
|
},
|
||||||
|
tk:false,
|
||||||
ckList: [
|
ckList: [
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
@@ -347,7 +357,74 @@
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
scanJH() {
|
||||||
|
var _this = this;
|
||||||
|
if (_this.form.jh == "") {
|
||||||
|
_this.$message({
|
||||||
|
message: "当前无数据!!",
|
||||||
|
type: "warning",
|
||||||
|
duration: "500",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用后台方法,判断是否在物料表内
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
dataType: "json",
|
||||||
|
data: { data: _this.form.jh },
|
||||||
|
url: "/xwms/ReceiptHeader2/ScanJh",
|
||||||
|
success: function (json) {
|
||||||
|
if (json.Code != 200) {
|
||||||
|
_this.$message({
|
||||||
|
message: "扫码失败!" + json.Msg,
|
||||||
|
type: "warning",
|
||||||
|
duration: "10000",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
_this.form.jh = "";
|
||||||
|
// UniqueCode = item.JH,
|
||||||
|
// MaterialSpec = item.Lot,
|
||||||
|
// MaterialType = item.Sn,
|
||||||
|
// Qty = item.Qty,
|
||||||
|
// Batch = item.PH,
|
||||||
|
// CreateTime = DateTime.Now,
|
||||||
|
let isExit = 0;
|
||||||
|
_this.tableData.forEach(function (item) {
|
||||||
|
if (item.JH == json.Data.UniqueCode) {
|
||||||
|
_this.$message({
|
||||||
|
message: "扫码失败!重复扫码",
|
||||||
|
type: "warning",
|
||||||
|
duration: "10000",
|
||||||
|
});
|
||||||
|
isExit = 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (isExit == 0) {
|
||||||
|
_this.tableData.push({
|
||||||
|
"Ware": "立库",
|
||||||
|
"CJ":json.Data.SourceCode,
|
||||||
|
"Len":json.Data.Lot,
|
||||||
|
"JH": json.Data.UniqueCode,
|
||||||
|
"Lot": json.Data.MaterialSpec,
|
||||||
|
"Sn": json.Data.MaterialType,
|
||||||
|
"Qty": json.Data.Qty,
|
||||||
|
"PH": json.Data.Batch,
|
||||||
|
"RQ": json.Data.CreateTime.substring(0, 10)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (json) {
|
||||||
|
_this.$message({
|
||||||
|
message: "扫码失败!",
|
||||||
|
type: "error",
|
||||||
|
duration: "10000",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
print() {
|
print() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
_this.printData = [];
|
_this.printData = [];
|
||||||
|
|||||||
@@ -322,6 +322,7 @@ namespace HHWMS.Web.Controllers
|
|||||||
detail.SourceLine = receipt.SourceLine;
|
detail.SourceLine = receipt.SourceLine;
|
||||||
detail.MaterialCode = receipt.MaterialCode;
|
detail.MaterialCode = receipt.MaterialCode;
|
||||||
detail.MaterialName = receipt.MaterialName;
|
detail.MaterialName = receipt.MaterialName;
|
||||||
|
detail.Coefficient = receipt.Coefficient;
|
||||||
detail.Lot = receipt.Lot;
|
detail.Lot = receipt.Lot;
|
||||||
detail.SupplierCode = receipt.SupplierCode;
|
detail.SupplierCode = receipt.SupplierCode;
|
||||||
detail.SupplierName = receipt.SupplierName;
|
detail.SupplierName = receipt.SupplierName;
|
||||||
|
|||||||
@@ -419,6 +419,8 @@ namespace HHWMS.Web.Controllers
|
|||||||
MaterialType = item.Sn,
|
MaterialType = item.Sn,
|
||||||
Qty = item.Qty,
|
Qty = item.Qty,
|
||||||
Batch = item.PH,
|
Batch = item.PH,
|
||||||
|
Lot = item.Len,
|
||||||
|
SourceCode = item.CJ,
|
||||||
CreateTime = DateTime.Now,
|
CreateTime = DateTime.Now,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -456,6 +458,18 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
return JsonMore(str);
|
return JsonMore(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Public]
|
||||||
|
[HttpPost]
|
||||||
|
[ActionDescription("Sys.ScanJh")]
|
||||||
|
public ActionResult ScanJh(string data) {
|
||||||
|
var material = _unitwork.FindSingle<Material>(x => x.UniqueCode == data);
|
||||||
|
if(material == null)
|
||||||
|
{
|
||||||
|
return JsonMore(null,500,$"卷号{data}未找到!");
|
||||||
|
}
|
||||||
|
return JsonMore(material);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class receipt4
|
public class receipt4
|
||||||
@@ -465,9 +479,10 @@ namespace HHWMS.Web.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string JH { get; set; }
|
public string JH { get; set; }
|
||||||
public decimal Qty { get; set; }
|
public decimal Qty { get; set; }
|
||||||
public decimal Len { get; set; }
|
public string Len { get; set; }
|
||||||
public string Lot { get; set; }
|
public string Lot { get; set; }
|
||||||
public string Sn { get; set;}
|
public string Sn { get; set;}
|
||||||
|
public string CJ { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 片厚
|
/// 片厚
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<el-button type="primary" @@click="print">打印</el-button>
|
<el-button type="primary" @@click="print">打印</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @@click="chaiBill">拆分</el-button>
|
<el-button type="primary" @@click="chaiBill" :disabled="disabledChaiButton">拆分</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -50,7 +50,8 @@
|
|||||||
qty:'',
|
qty:'',
|
||||||
loading: false,
|
loading: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
sumQty:0
|
sumQty:0,
|
||||||
|
disabledChaiButton:false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
@@ -112,6 +113,7 @@
|
|||||||
},
|
},
|
||||||
chaiBill() {
|
chaiBill() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
var loadIndex = layer.load(0);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
@@ -120,13 +122,16 @@
|
|||||||
},
|
},
|
||||||
url: "/xwms/ReceiptDetail2/ChaiDetail",
|
url: "/xwms/ReceiptDetail2/ChaiDetail",
|
||||||
success: function (json) {
|
success: function (json) {
|
||||||
|
layer.close(loadIndex);
|
||||||
if (json.Code == 200) {
|
if (json.Code == 200) {
|
||||||
layer.msg("拆分数据成功");
|
layer.msg("拆分数据成功");
|
||||||
|
_this.disabledChaiButton = true;
|
||||||
} else {
|
} else {
|
||||||
layer.alert(json.Msg, { icon: 5, shadeClose: true, title: "错误信息" });
|
layer.alert(json.Msg, { icon: 5, shadeClose: true, title: "错误信息" });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function (json) {
|
error: function (json) {
|
||||||
|
layer.close(loadIndex);
|
||||||
layer.alert("失败", { icon: 5, shadeClose: true, title: "错误信息" });
|
layer.alert("失败", { icon: 5, shadeClose: true, title: "错误信息" });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user