入库明细拆分

铁心库打码
This commit is contained in:
zgf committed 2024-01-11 20:32:44 +08:00
1 parent fa7b5814ba
commit d19f62e48b
21 files changed
+513 -93

No files matched your search

@@ -10,9 +10,16 @@
</el-select>
</el-col>
<el-col :span="4">
<el-input v-model="lot"
placeholder="型号">
</el-input>
<el-select v-model="lot" :popper-append-to-body="false" placeholder="型号"
filterable
allow-create
default-first-option>
<el-option v-for="item in lotList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="4">
<el-input v-model.number="num"
@@ -56,7 +63,7 @@
value: '5',
label: 'C柱片'
}
],
],lotList:[],
printData:[],
gendCode: '',
px: '',
@@ -66,6 +73,13 @@
template: { "panels": [{ "index": 0, "height": 50, "width": 80, "paperHeader": 43.5, "paperFooter": 141.73228346456693, "printElements": [{ "options": { "left": 96, "top": 19.5, "height": 87, "width": 120, "field": "qrcode", "testData": "12312312312", "textType": "qrcode" }, "printElementType": { "type": "text" } }, { "options": { "left": 16.5, "top": 24, "height": 25.5, "width": 69, "field": "px", "testData": "123123", "textAlign": "center", "textContentVerticalAlign": "middle" }, "printElementType": { "type": "text" } }, { "options": { "left": 16.5, "top": 67.5, "height": 24, "width": 67.5, "field": "lot", "testData": "1231231", "textAlign": "center", "textContentVerticalAlign": "middle" }, "printElementType": { "type": "text" } }], "paperNumberLeft": 196.5, "paperNumberTop": 118.5, "paperNumberDisabled": true }] }
}
},
mounted: function() {
var t = window.localStorage.getItem("lot");
if (t == undefined) {
window.localStorage.setItem("lot", JSON.stringify(this.lotList));
}
this.lotList = JSON.parse(window.localStorage.getItem("lot"));
},
methods: {
create() {
var _this = this;
@@ -162,6 +176,7 @@
},
genCode() {
var _this = this;
if (_this.px == "") {
_this.$message({
message: "请选择片型!",
@@ -178,17 +193,29 @@
});
return;
}
this.lotList.push({
value: _this.lot,
label: _this.lot
});
var ttt = []
if (this.lotList.length > 20) {
ttt = this.lotList.slice(2);
} else {
ttt = this.lotList;
}
var tt = Array.from(new Set(ttt.map(JSON.stringify))).map(JSON.parse);
window.localStorage.setItem("lot", JSON.stringify(tt));
this.lotList = JSON.parse(window.localStorage.getItem("lot"));
_this.gendCode = _this.lot + '--' + _this.px;
var pxName = "";
_this.pxList.forEach(function (item) {
if (item.value == _this.px)
pxName = item.label;
})
_this.printData.push({
px: pxName,
lot: _this.lot,
qrcode: _this.gendCode
});
// 设置参数方式
var qrcode = new QRCode(document.getElementById('qrcode'), {
text: _this.gendCode,
@@ -205,7 +232,21 @@
},
print() {
var _this = this;
// _this.gendCode = "";
_this.printData = [];
_this.pxList.forEach(function (item) {
if (item.value == _this.px)
pxName = item.label;
})
var n = _this.num;
while (n > 0) {
_this.printData.push({
px: pxName,
lot: _this.lot,
qrcode: _this.lot + '--' + _this.px
});
n--;
}
hiprint.init();
var hiprintTemplate = new hiprint.PrintTemplate({
template: this.template
@@ -216,7 +257,7 @@
//清空
_this.qrcode = '';
_this.num = 1;
}
},
}
});
@@ -7,6 +7,7 @@ using WalkingTec.Mvvm.Core.Extensions;
using HHWMS.Web;
using HHWMS.Web.Models;
using System.Linq;
using System.Collections.Generic;
namespace HHWMS.Web.Controllers
{
@@ -137,7 +138,7 @@ namespace HHWMS.Web.Controllers
}
else
{
return FFResult().CloseDialog().RefreshGridRow(vm.Entity.ID);
return FFResult().CloseDialog().RefreshGridRow((long)vm.Entity.ID);
}
}
}
@@ -192,7 +193,7 @@ namespace HHWMS.Web.Controllers
{
if (!ModelState.IsValid || !vm.DoBatchEdit())
{
return PartialView("BatchEdit",vm);
return PartialView("BatchEdit", vm);
}
else
{
@@ -216,7 +217,7 @@ namespace HHWMS.Web.Controllers
{
if (!ModelState.IsValid || !vm.DoBatchDelete())
{
return PartialView("BatchDelete",vm);
return PartialView("BatchDelete", vm);
}
else
{
@@ -226,7 +227,7 @@ namespace HHWMS.Web.Controllers
#endregion
#region Import
[ActionDescription("Sys.Import")]
[ActionDescription("Sys.Import")]
public ActionResult Import()
{
var vm = Wtm.CreateVM<ReceiptDetail2ImportVM>();
@@ -258,9 +259,64 @@ namespace HHWMS.Web.Controllers
#endregion
[ActionDescription("Sys.Print")]
public ActionResult Print()
[FixConnection(CsName = "hangyong")]
public ActionResult Print(string id)
{
return Ok();
var dc = Wtm.CreateDC(cskey: "hangyong");
Wtm.DC = dc;
var vm = Wtm.CreateVM<ReceiptDetail2VM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.SearchDetail")]
[FixConnection(CsName = "hangyong")]
public ActionResult SearchDetail(int id)
{
var dc = Wtm.CreateDC(cskey: "hangyong");
Wtm.DC = dc;
var data = dc.Set<ReceiptDetail2>().Where(x => x.ID == id);
return JsonMore(data);
}
[ActionDescription("Sys.ChaiDetail")]
[FixConnection(CsName = "hangyong")]
public ActionResult ChaiDetail(List<ReceiptDetail> data)
{
var dc = Wtm.CreateDC(cskey: "hangyong");
Wtm.DC = dc;
var _unit = new UnitWork(Wtm);
using (var tran = dc.BeginTransaction())
{
try
{
var receipt = _unit.FindSingle<ReceiptDetail2>(x =>
x.MaterialCode == data.FirstOrDefault().MaterialCode
&& x.Batch == data.FirstOrDefault().Batch);
if (receipt != null)
{
receipt.Qty = data.FirstOrDefault().Qty;
_unit.Update(receipt);
var ll = new List<ReceiptDetail2>();
foreach (var item in data.Skip(1))
{
var re = receipt;
re.ID = null;
re.Qty = item.Qty;
ll.Add(re);
}
_unit.BatchAdd(ll.ToArray());
tran.Commit();
}
}
catch (Exception ex)
{
tran.Rollback();
return JsonMore(null, 500, ex.Message);
}
}
return JsonMore(null);
}
}
}
@@ -248,7 +248,7 @@ namespace HHWMS.Web.Controllers
#endregion
[HttpPost]
[ActionDescription("Sys.Create")]
[ActionDescription("Sys.Create3")]
[FixConnection(CsName = "hangyong")]
public ActionResult CreateDetail3(string px,string pxName, string lot, int num)
{
@@ -277,6 +277,7 @@ namespace HHWMS.Web.Controllers
detail.WarehouseId = receipt.WarehouseId;
detail.ReceiptId = receipt.ID;
detail.ReceiptCode = receipt.Code;
detail.MaterialCode = lot;
detail.MaterialName = pxName;
detail.Lot = lot;
detail.Project = $"{lot}--{px}";
@@ -404,6 +404,7 @@ namespace HHWMS.Web.Controllers
return JsonMore(null);
}
}
[ActionDescription("Sys.CheckInv")]
[FixConnection(CsName = "hangyong")]
public ActionResult CheckInv(string id)
@@ -411,6 +412,7 @@ namespace HHWMS.Web.Controllers
var vm = Wtm.CreateVM<ShipmentDetail2VM>(id);
return PartialView(vm);
}
[ActionDescription("Sys.CheckInv")]
[FixConnection(CsName = "hangyong")]
public ActionResult CheckInvData(string str)
@@ -427,11 +429,10 @@ namespace HHWMS.Web.Controllers
var WmsQty = _unitwork.Find<Inventory2>(x =>
x.MaterialCode == ship.MaterialCode
&& x.Batch == ship.Batch
&& x.WarehouseId == int.Parse(warehouseId)
).Sum(x => x.Qty);
var sql = @"select * from QREQ3.XWMSSTOHYB where 1=1";
var sql = @"select * from QRE.XWMSSTOHYB where 1=1";
sql += $" and LOC_0 = '{loc}' and ITMREF_0 = '{ship.MaterialCode}'";
// and LOT_0 = '{ship.Batch}'
var data = OracleHelper.GetDataSet(sql).Tables[0];
@@ -14,7 +14,6 @@ namespace HHWMS.Web.Controllers;
[Area("xwms")]
[ActionDescription("采购订单")]
[Public]
public class XWMSPOHController : BaseController
{
public XWMSPOHController()
@@ -30,7 +29,7 @@ public class XWMSPOHController : BaseController
}
[ActionDescription("Sys.Search")]
public ActionResult Search(string address, string billno, string supply, string materialcode)
public ActionResult Search(string address, string ITMDES2_0, string billno, string supply, string materialcode)
{
var sql = @"select * from QRE.XWMSPOH where 1=1";
if (!string.IsNullOrEmpty(address))
@@ -49,6 +48,10 @@ public class XWMSPOHController : BaseController
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
if (!string.IsNullOrEmpty(ITMDES2_0))
{
sql += $"and ITMDES2_0 like '%{ITMDES2_0}%'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var list = data.AsEnumerable().Select
@@ -33,7 +33,7 @@ public class XWMSSHIPController : BaseController
[ActionDescription("Sys.Search")]
[FixConnection(CsName = "hangyong")]
public ActionResult Search(string address, string billno, string sbill, string materialcode)
public ActionResult Search(string address, string billno, string ITMDES2_0, string sbill, string materialcode)
{
var _unitwork = new UnitWork(Wtm);
@@ -54,7 +54,10 @@ public class XWMSSHIPController : BaseController
{
sql += $"and ITMREF_0 like '%{materialcode}%'";
}
if (!string.IsNullOrEmpty(ITMDES2_0))
{
sql += $"and ITMDES2_0 like '%{ITMDES2_0}%'";
}
var data = OracleHelper.GetDataSet(sql).Tables[0];
var codeList = data.AsEnumerable().Select(x => x.Field<string>("ITMREF_0")).ToHashSet();
@@ -80,7 +83,7 @@ public class XWMSSHIPController : BaseController
POPLIN_0 = x.Field<Int64>("POPLIN_0"),
LOT_0 = x.Field<string>("LOT_0"),
QTYSTU_0 = x.Field<decimal>("QTYSTU_0"),
STATUS = matList.FirstOrDefault(y => y.Code == x.Field<string>("ITMREF_0"))?.ClassA
STATUS = matList.FirstOrDefault(y => y.Code == x.Field<string>("ITMREF_0"))?.ClassA ?? ""
}
).ToList();
@@ -117,6 +120,10 @@ public class XWMSSHIPController : BaseController
var detailList = new List<ReceiptDetail2>();
foreach (var item in data)
{
if (string.IsNullOrEmpty(item.STATUS)){
tran.Rollback();
return JsonMore(null, 500, $"状态不能为空!");
}
var qr = _unitwork.FindSingle<MaterialQr2>(x =>
x.Code == item.ITMREF_0
&& x.Batch == item.LOT_0
@@ -33,6 +33,8 @@ namespace HHWMS.Web
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
this.MakeAction("ReceiptDetail2","Print",Localizer["Sys.Print"],Localizer["Sys.Print"],GridActionParameterTypesEnum.SingleId,"xwms")
.SetMax().SetShowInRow().SetButtonClass("layui-btn-Warm"),
this.MakeAction("ReceiptDetail2","Prints",Localizer["Sys.Prints"],Localizer["Sys.Prints"],GridActionParameterTypesEnum.MultiIds,"xwms")
.SetShowDialog(false).SetOnClickScript("print"),
};
}
@@ -29,8 +29,6 @@
</wt:form>
<script>
function test(val) {
console.log($('#ReceiptDetail2VM_Entity_MaterialName').val());
console.log(val[0].Name);
$('#ReceiptDetail2VM_Entity_MaterialName').val(val[0].Name);
ReceiptDetail2VM_Entity_InventoryStatus.setValue([val[0].ClassA]);
}
@@ -0,0 +1,285 @@
@model HHWMS.Web.ReceiptDetail2VM
@inject IStringLocalizer<Program> Localizer;
<el-row id="PrintDetail">
<el-form :inline="true">
<el-form-item>
<el-input v-model.number="num" placeholder="拆分数量" @@keyup.enter.native="chai()"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="qty" placeholder="重量" @@keyup.enter.native="splitQty()"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @@click="print">打印</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @@click="chaiBill">拆分</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData"
height="600" stripe border
style="width: 100%"
ref="tableData"
v-loading="loading">
<el-table-column type="index"
width="50">
</el-table-column>
<el-table-column label="物料编码" width="150" align="center" prop="MaterialCode"></el-table-column>
<el-table-column label="物料名称" width="150" align="center" prop="MaterialName"></el-table-column>
<el-table-column label="规格" width="150" align="center" prop="Lot"></el-table-column>
<el-table-column label="批次" width="150" align="center" prop="Batch"></el-table-column>
<el-table-column label="数量" width="150" align="center" prop="Qty"></el-table-column>
</el-table>
</el-row>
<script>
var str = "";
@{
<text>str = @Model.Entity.ID</text>
}
var app = new Vue({
el: "#PrintDetail",
data() {
return {
num:'',
qty:'',
loading: false,
tableData: [],
sumQty:0
};
},
mounted: function () {
this.search();
},
methods: {
search() {
var _this = this;
_this.loading = true;
$.ajax({
type: "post",
dataType: "json",
data: {
id: str
},
url: "/xwms/ReceiptDetail2/SearchDetail",
success: function (json) {
_this.tableData = json.Data;
_this.tableData[0].Qty = parseFloat(_this.tableData[0].Qty);
_this.sumQty = json.Data[0].Qty;
_this.loading = false;
},
error: function (json) {
_this.$message.error("加载失败");
_this.loading = false;
}
});
},
splitQty() {
var _this = this;
if (this.qty != "") {
var list = this.qty.split(" ");
// var sum = 0;
// list.forEach(function(val){
// sum += parseFloat(val);
// })
// if (sum != this.sumQty) {
// layer.alert("总数不一致!!", { icon: 5, shadeClose: true, title: "错误信息" });
// }
if (list.length == this.tableData.length) {
var nn = list.length - 1;
while (nn >= 0) {
_this.tableData[nn].Qty = list[nn];
nn--;
}
} else {
layer.alert("数量与表行不一致!!", { icon: 5, shadeClose: true, title: "错误信息" });
}
}
},
chai() {
if (this.num > 1) {
this.tableData[0].Qty = this.sumQty / this.num;
while (this.num > 1) {
this.tableData.push(JSON.parse(JSON.stringify(this.tableData[0])));
this.num--;
}
}
},
chaiBill() {
var _this = this;
$.ajax({
type: "post",
dataType: "json",
data: {
data: _this.tableData
},
url: "/xwms/ReceiptDetail2/ChaiDetail",
success: function (json) {
if (json.Code == 200) {
layer.msg("拆分数据成功");
} else {
layer.alert(json.Msg, { icon: 5, shadeClose: true, title: "错误信息" });
}
},
error: function (json) {
layer.alert("失败", { icon: 5, shadeClose: true, title: "错误信息" });
}
});
}
},
});
let template = {
"panels": [{
"index": 0,
"height": 50,
"width": 80,
"paperHeader": 43.5,
"paperFooter": 141.73228346456693,
"printElements": [{
"options": {
"left": 3,
"top": 3,
"height": 40,
"width": 220,
"field": "lot",
"textAlign": "center",
"textContentVerticalAlign": "middle"
},
"printElementType": {
"type": "text"
}
}, {
"options": {
"left": 3,
"top": 3,
"height": 130,
"width": 220,
"borderWidth": "1.5",
"borderStyle": "solid"
},
"printElementType": {
"type": "rect"
}
}, {
"options": {
"left": 3,
"top": 42,
"height": 9,
"width": 219
},
"printElementType": {
"type": "hline"
}
}, {
"options": {
"left": 135,
"top": 42,
"height": 90,
"width": 9
},
"printElementType": {
"type": "vline"
}
}, {
"options": {
"left": 3,
"top": 43.5,
"height": 28.5,
"width": 132,
"field": "code",
"textAlign": "center",
"textContentVerticalAlign": "middle"
},
"printElementType": {
"type": "text"
}
}, {
"options": {
"left": 150,
"top": 49.5,
"height": 48,
"width": 51,
"textType": "qrcode",
"field": "qrcode",
},
"printElementType": {
"type": "text"
}
}, {
"options": {
"left": 3,
"top": 72,
"height": 9,
"width": 132
},
"printElementType": {
"type": "hline"
}
}, {
"options": {
"left": 3,
"top": 72,
"height": 30,
"width": 132,
"field": "qty",
"textAlign": "center",
"textContentVerticalAlign": "middle"
},
"printElementType": {
"type": "text"
}
}, {
"options": {
"left": 4.5,
"top": 102,
"height": 9,
"width": 217.5
},
"printElementType": {
"type": "hline"
}
}, {
"options": {
"left": 4.5,
"top": 102,
"height": 28.5,
"width": 132,
"field": "batch",
"textAlign": "center",
"textContentVerticalAlign": "middle"
},
"printElementType": {
"type": "text"
}
}],
"paperNumberLeft": 196.5,
"paperNumberTop": 118.5,
"paperNumberDisabled": true
}]
};
let printData = [];
function print() {
app.tableData.forEach(function (value, index, arr) {
printData.push({
lot: value.MaterialName + '|' + value.Lot,
code: value.MaterialCode,
batch: value.Batch,
qty: value.Qty,
qrcode: 'MT.' + value.MaterialCode + '@@@@LT.' + value.Batch + '@@@@QT.' + value.Qty
})
});
hiprint.init();
var hiprintTemplate = new hiprint.PrintTemplate({
template: template
});
hiprintTemplate.print(printData);
printData = [];
}
</script>
@@ -172,7 +172,7 @@
code: value.MaterialCode,
batch: value.Batch,
qty: value.Qty,
qrcode: 'MT.' + value.MaterialCode + '@@@@LT.' + value.Batch
qrcode: 'MT.' + value.MaterialCode + '@@@@LT.' + value.Batch + '@@@@QT.' + value.Qty
})
});
@@ -97,7 +97,7 @@
<el-table-column label="数量" width="150" align="center" prop="Qty" show-overflow-tooltip></el-table-column>
<el-table-column label="出库数量" width="200" align="center" prop="ThisQty">
<div class="item" slot-scope="scope">
<el-input class="item__input" v-model="scope.row.THISQTYUOM" placeholder="请输入内容"></el-input>
<el-input class="item__input" v-model="scope.row.ThisQty" placeholder="请输入内容"></el-input>
<div class="item__txt">{{scope.row.ThisQty}}</div>
</div>
</el-table-column>
@@ -231,21 +231,11 @@
cell.querySelector('.item__input').style.display = 'none'
cell.querySelector('.item__txt').style.display = 'block'
}
if (property == "THISQTYSTU") {
// 库存单位除以系数
if (row.THISQTYSTU > row.QTYSTU_0) {
row.THISQTYSTU = row.QTYSTU_0;
this.$message.error("不能超出单据数量");
}
else {
row.THISQTYUOM = row.THISQTYSTU / row.UOMSTUCOE_0;
}
}
if (property == "ThisQty") {
// 库存单位除以系数
if (row.THISQTYSTU > row.QTY) {
row.THISQTYSTU = row.QTY;
layer.alert("不能超出单据数量!!", { icon: 5, shadeClose: true, title: "错误信息" });
if (row.ThisQty > row.QTY) {
row.ThisQty = row.QTY;
layer.alert("不能超出库存数量!!", { icon: 5, shadeClose: true, title: "错误信息" });
}
}
},
@@ -65,6 +65,8 @@
size="small"
ref="tableData"
v-loading="loading"
:highlight-current-row="true"
@@row-click="handleClickTableRow"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
@@ -135,11 +137,8 @@
label: '不管理'
}],
addressList: [{
value: 'QDB',
label: 'QDB'
}, {
value: 'SBD',
label: 'SBD'
value: 'HYB',
label: 'HYB'
}],
loading: false,
tableData: [],
@@ -209,6 +208,9 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleClickTableRow(row) {
this.$refs.tableData.toggleRowSelection(row)
},
search() {
var _this = this;
_this.loading = true;
+30 -33
View File
@@ -187,6 +187,9 @@
<el-form-item>
<el-input v-model="form.materialcode" placeholder="物料编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.ITMDES2_0" placeholder="代号"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
@@ -198,6 +201,8 @@
size="small"
ref="tableData"
v-loading="loading"
:highlight-current-row="true"
@@row-click="handleClickTableRow"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
@@ -207,31 +212,16 @@
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column label="地点" align="center" prop="POHFCY_0"></el-table-column>
@* <el-table-column label="地点" align="center" prop="POHFCY_0"></el-table-column> *@
<el-table-column label="订单日期" width="100" align="center" prop="ORDDAT_0"></el-table-column>
@* <el-table-column label="供应商" align="center" prop="BPSNUM_0"></el-table-column> *@
<el-table-column label="供应商名称" width="150" align="center" prop="BPRNAM_0" show-overflow-tooltip></el-table-column>
<el-table-column label="订单号" width="180" align="center" prop="POHNUM_0"></el-table-column>
<el-table-column label="行号" width="100" align="center" prop="POPLIN_0"></el-table-column>
<el-table-column label="项目号" width="150" align="center" prop="PJT_0"></el-table-column>
<el-table-column label="项目名称" width="150" align="center" prop="PJTNAM_0" show-overflow-tooltip></el-table-column>
<el-table-column label="产品" width="150" align="center" prop="ITMREF_0"></el-table-column>
<el-table-column label="名称" width="150" align="center" prop="ITMDES1_0" show-overflow-tooltip></el-table-column>
<el-table-column label="代号" width="150" align="center" prop="ITMDES2_0" show-overflow-tooltip></el-table-column>
<el-table-column label="数量(采购)" width="100" align="center" prop="QTYUOM_0"></el-table-column>
<el-table-column label="采购单位" width="100" align="center" prop="UOM_0"></el-table-column>
<el-table-column label="采购说明" width="150" align="center" prop="POHITMDES1_0" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" width="100" align="center" prop="QTYSTU_0"></el-table-column>
<el-table-column label="库存单位" width="100" align="center" prop="STU_0"></el-table-column>
<el-table-column label="未收采购数量" width="100" align="center" prop="NRCPQTYPUU_0"></el-table-column>
<el-table-column label="未收库存数量" width="100" align="center" prop="NRCPQTYSTU_0"></el-table-column>
<el-table-column label="本次收量(采购单位)" width="200" align="center" prop="THISQTYUOM">
<div class="item" slot-scope="scope">
<el-input class="item__input" v-model="scope.row.THISQTYUOM" placeholder="请输入内容"></el-input>
<div class="item__txt">{{scope.row.THISQTYUOM}}</div>
</div>
</el-table-column>
<el-table-column label="本次收量(库存单位)" width="200" align="center" prop="THISQTYSTU">
<div class="item" slot-scope="scope">
<el-input class="item__input" v-model="scope.row.THISQTYSTU" placeholder="请输入内容"></el-input>
@@ -250,7 +240,21 @@
<div class="item__txt">{{foodLabel(scope.row.STA_0)}}</div>
</div>
</el-table-column>
<el-table-column label="未收采购数量" width="100" align="center" prop="NRCPQTYPUU_0"></el-table-column>
<el-table-column label="本次收量(采购单位)" width="200" align="center" prop="THISQTYUOM">
<div class="item" slot-scope="scope">
<el-input class="item__input" v-model="scope.row.THISQTYUOM" placeholder="请输入内容"></el-input>
<div class="item__txt">{{scope.row.THISQTYUOM}}</div>
</div>
</el-table-column>
<el-table-column label="数量(采购)" width="100" align="center" prop="QTYUOM_0"></el-table-column>
<el-table-column label="采购单位" width="100" align="center" prop="UOM_0"></el-table-column>
<el-table-column label="采购说明" width="150" align="center" prop="POHITMDES1_0" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" width="100" align="center" prop="QTYSTU_0"></el-table-column>
<el-table-column label="库存单位" width="100" align="center" prop="STU_0"></el-table-column>
<el-table-column label="计量单位/存货单位系数" width="100" align="center" prop="UOMSTUCOE_0" show-overflow-tooltip></el-table-column>
<el-table-column label="项目号" width="150" align="center" prop="PJT_0"></el-table-column>
<el-table-column label="项目名称" width="150" align="center" prop="PJTNAM_0" show-overflow-tooltip></el-table-column>
<el-table-column label="材料" align="center" prop="ITMDES3_0" show-overflow-tooltip></el-table-column>
<el-table-column label="备注" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
@@ -276,7 +280,8 @@
address: 'HYB',
billno: '',
supply: '',
materialcode: ''
materialcode: '',
ITMDES2_0:''
},
addressList: [{
value: 'HYB',
@@ -298,7 +303,7 @@
total: 20, // 总条数
pageSize: 20, // 每页的数据条数
// 需要编辑的属性
editProp: ['THISQTYUOM', 'THISQTYSTU', 'STA_0'],
editProp: ['THISQTYSTU', 'STA_0'],
multipleSelection: []
};
},
@@ -344,23 +349,11 @@
}
if (property == "THISQTYSTU") {
// 库存单位除以系数
if (row.THISQTYSTU > row.QTYSTU_0) {
row.THISQTYSTU = row.QTYSTU_0;
this.$message.error("不能超出单据数量");
}
else {
row.THISQTYUOM = row.THISQTYSTU / row.UOMSTUCOE_0;
}
row.THISQTYUOM = row.THISQTYSTU / row.UOMSTUCOE_0;
}
if (property == "THISQTYUOM") {
// 采购单位 乘 系数
if (row.THISQTYUOM > row.QTYUOM_0) {
row.THISQTYUOM = row.QTYUOM_0;
this.$message.error("不能超出单据数量");
}
else {
row.THISQTYSTU = row.THISQTYUOM * row.UOMSTUCOE_0;
}
row.THISQTYSTU = row.THISQTYUOM * row.UOMSTUCOE_0;
}
},
//每页条数改变时触发 选择一页显示多少行
@@ -375,6 +368,9 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleClickTableRow(row) {
this.$refs.tableData.toggleRowSelection(row)
},
search() {
var _this = this;
_this.loading = true;
@@ -385,7 +381,8 @@
address: _this.form.address,
billno: _this.form.billno,
supply: _this.form.supply,
materialcode: _this.form.materialcode
materialcode: _this.form.materialcode,
ITMDES2_0 : _this.form.ITMDES2_0
},
url: "/xwms/XWMSPOH/Search",
success: function (json) {
@@ -58,6 +58,8 @@
size="small"
ref="tableData"
v-loading="loading"
:highlight-current-row="true"
@@row-click="handleClickTableRow"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
@@ -194,6 +196,9 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleClickTableRow(row) {
this.$refs.tableData.toggleRowSelection(row)
},
search() {
var _this = this;
_this.loading = true;
@@ -45,6 +45,9 @@
<el-form-item>
<el-input v-model="form.materialcode" placeholder="物料编码"></el-input>
</el-form-item>
<el-form-item>
<el-input v-model="form.ITMDES2_0" placeholder="代号"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" @@click="search" circle></el-button>
</el-form-item>
@@ -54,13 +57,15 @@
size="small"
ref="tableData"
v-loading="loading"
:highlight-current-row="true"
@@row-click="handleClickTableRow"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55">
</el-table-column>
<el-table-column label="地点" align="center" prop="FCY_0"></el-table-column>
@* <el-table-column label="地点" align="center" prop="FCY_0"></el-table-column> *@
<el-table-column label="发货日期" width="100" align="center" prop="SHIDAT_0"></el-table-column>
@* <el-table-column label="内部供应商" width="150" align="center" prop="STOFCY_0" show-overflow-tooltip></el-table-column> *@
<el-table-column label="内部供应商名称" width="150" align="center" prop="BPRNAM_0" show-overflow-tooltip></el-table-column>
@@ -69,8 +74,6 @@
<el-table-column label="产品编码" width="180" align="center" prop="ITMREF_0"></el-table-column>
<el-table-column label="名称" width="150" align="center" prop="ITMDES1_0" show-overflow-tooltip></el-table-column>
<el-table-column label="代号" width="150" align="center" prop="ITMDES2_0" show-overflow-tooltip></el-table-column>
<el-table-column label="备注" width="100" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
<el-table-column label="材料" width="100" align="center" prop="ITMDES3_0" show-overflow-tooltip></el-table-column>
<el-table-column label="数量" width="100" align="center" prop="QTY_0" show-overflow-tooltip></el-table-column>
<el-table-column label="批次" width="150" align="center" prop="LOT_0"></el-table-column>
<el-table-column label="批次数量" width="100" align="center" prop="QTYSTU_0"></el-table-column>
@@ -86,6 +89,8 @@
<div class="item__txt">{{foodLabel(scope.row.STATUS)}}</div>
</div>
</el-table-column>
<el-table-column label="备注" width="100" align="center" prop="YITMDES4_0" show-overflow-tooltip></el-table-column>
<el-table-column label="材料" width="100" align="center" prop="ITMDES3_0" show-overflow-tooltip></el-table-column>
<el-table-column label="销售单位" width="100" align="center" prop="SAU_0"></el-table-column>
<el-table-column label="采购订单号" width="180" align="center" prop="POHNUM_0"></el-table-column>
<el-table-column label="订单行号" width="100" align="center" prop="POPLIN_0"></el-table-column>
@@ -111,13 +116,18 @@
address: 'HYB',
billno: '',
sbill: '',
materialcode: ''
materialcode: '',
ITMDES2_0:''
},
addressList: [{
value: 'HYB',
label: 'HYB'
}],
options: [{
options: [
{
value: '',
label: '请选择'
}, {
value: 'A',
label: 'A'
}, {
@@ -189,6 +199,9 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleClickTableRow(row) {
this.$refs.tableData.toggleRowSelection(row)
},
search() {
var _this = this;
_this.loading = true;
@@ -199,7 +212,8 @@
address: _this.form.address,
billno: _this.form.billno,
sbill: _this.form.sbill,
materialcode: _this.form.materialcode
materialcode: _this.form.materialcode,
ITMDES2_0: _this.form.ITMDES2_0
},
url: "/xwms/XWMSSHIP/Search",
success: function (json) {
@@ -214,7 +228,7 @@
},
create() {
var _this = this;
_this.$confirm('注意:您确认要对此单据进行创建采购入库吗?', '提示', {
_this.$confirm('注意:您确认要对此单据进行创建内部收货吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -236,7 +250,6 @@
tmp.push(x.SDHNUM_0)
}
});
console.log(tmp, _this.multipleSelection)
if (tmp.length != _this.multipleSelection.length) {
_this.$message.error("一张收货单必须全部收完!");
return;
@@ -55,6 +55,8 @@
size="small"
ref="tableData"
v-loading="loading"
:highlight-current-row="true"
@@row-click="handleClickTableRow"
@@cell-mouse-enter="handleCellEnter"
@@cell-mouse-leave="handleCellLeave"
@@selection-change="handleSelectionChange">
@@ -177,6 +179,9 @@
handleSelectionChange(val) {
this.multipleSelection = val;
},
handleClickTableRow(row) {
this.$refs.tableData.toggleRowSelection(row)
},
search() {
var _this = this;
_this.loading = true;
+2
View File
@@ -64,6 +64,8 @@ namespace HHWMS.Web
public DbSet<Supplier> Suppliers { get; set; }
public DbSet<Material2> Material2s { get; set; }
public DbSet<Inventory2> Inventory2s { get; set; }
public DbSet<MaterialQr2> MaterialQr2s { get; set; }
public override async Task<bool> DataInit(object allModules, bool IsSpa)
{
var state = await base.DataInit(allModules, IsSpa);
+1 -1
View File
@@ -13,7 +13,7 @@ namespace HHWMS.Web.Models
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public new int ID { get; set; }
public new int? ID { get; set; }
/// <summary>
/// 仓库Id
+2 -2
View File
@@ -168,7 +168,7 @@ namespace HHWMS.Web.Models
/// 已出数量
/// </summary>
[Column("qtyCompleted")]
public decimal? QtyCompleted { get; set; }
public decimal? QtyCompleted { get; set; } = 0;
/// <summary>
/// 单位
@@ -222,7 +222,7 @@ namespace HHWMS.Web.Models
/// 已分配数量
/// </summary>
[Column("qtyDivided")]
public decimal? QtyDivided { get; set; }
public decimal? QtyDivided { get; set; } = 0;
/// <summary>
/// 需求地点
+12
View File
@@ -1479,4 +1479,16 @@
<data name="ReceiptHeader2.Remark" xml:space="preserve">
<value>备注</value>
</data>
<data name="Sys.Prints" xml:space="preserve">
<value>批量打印</value>
</data>
<data name="Sys.Out" xml:space="preserve">
<value>其他出库</value>
</data>
<data name="Sys.Move" xml:space="preserve">
<value>存货转移</value>
</data>
<data name="Sys.CheckInv" xml:space="preserve">
<value>ERP对账</value>
</data>
</root>
+2 -2
View File
@@ -24,13 +24,13 @@
"Connections": [
{
"Key": "default",
"Value": "Server=172.16.12.212;Port=3306;Database=wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
"Value": "Server=127.0.0.1;Port=3306;Database=8357wms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
"DbContext": "DataContext",
"DBType": "mysql"
},
{
"Key": "hangyong",
"Value": "Server=172.16.12.212;Port=3306;Database=hangyongwms;Uid=root;Password=abc123*;Character Set=utf8mb4;",
"Value": "Server=127.0.0.1;Port=3306;Database=hangtongwms2;Uid=root;Password=abc123*;Character Set=utf8mb4;",
"DbContext": "DataContext",
"DBType": "mysql"
}