Commit 6ec99da9 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 30ddd62c 8e266be1
...@@ -1573,7 +1573,9 @@ export default { ...@@ -1573,7 +1573,9 @@ export default {
creationTime1: '入库时间', creationTime1: '入库时间',
creator1: '入库人', creator1: '入库人',
total1: '库存', total1: '库存',
count:'出库数' count:'出库数',
code:'物料序号',
nowTotal:'库存'
}, },
stock_item: { stock_item: {
creationTime: '创建时间', creationTime: '创建时间',
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<span class="ml20">申请时间:{{row.creationTime}}</span> <span class="ml20">申请时间:{{row.creationTime}}</span>
<span class="ml20"> <span class="ml20">
状态: 状态:
<state code="aps.plan.supportingStatus" :value="row.status+''" type="text"></state> <state code="accessory.status" :value="row.status+''" type="text"></state>
</span> </span>
</p> </p>
<Split v-model="split" mode="vertical" @on-move-end="moveEnd"> <Split v-model="split" mode="vertical" @on-move-end="moveEnd">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
> >
<template slot-scope="{ row, index }" slot="counts"> <template slot-scope="{ row, index }" slot="counts">
<InputNumber <InputNumber
:max="row.total" :max="row.nowTotal"
:min="0" :min="0"
v-model="row.count" v-model="row.count"
@on-blur="inputChange(row,index)" @on-blur="inputChange(row,index)"
...@@ -47,7 +47,14 @@ ...@@ -47,7 +47,14 @@
</div> </div>
</Split> </Split>
<Modal v-model="ModalAccList" title="出库记录" width="1000" footer-hide> <Modal v-model="ModalAccList" title="出库记录" width="1000" footer-hide>
<DataGrid :action="action" :columns="colsList" ref="grid" :conditions="easySearch" height="400" :tool="false"></DataGrid> <DataGrid
:action="action"
:columns="colsList"
ref="grid"
:conditions="easySearch"
:height="400"
:tool="false"
></DataGrid>
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -85,18 +92,20 @@ export default { ...@@ -85,18 +92,20 @@ export default {
key: "count", key: "count",
title: this.l("count1"), title: this.l("count1"),
align: "right", align: "right",
width:150,
}, },
{ {
key: "outCount", key: "outCount",
title: "出库数", title: "出库数",
align: "right", align: "right",
width:150,
render: (h, params) => { render: (h, params) => {
return h( return h(
"op", "op",
{ {
attrs: { attrs: {
oprate: "detail", oprate: "detail",
title: "查看明细", title: params.row.outCount&&params.row.outCount>0?"出库明细":"",
}, },
style: { style: {
color: "blue", color: "blue",
...@@ -105,7 +114,7 @@ export default { ...@@ -105,7 +114,7 @@ export default {
click: () => this.openAccessoryList(params.row), click: () => this.openAccessoryList(params.row),
}, },
}, },
params.row.outCount params.row.outCount ? params.row.outCount : "0"
); );
}, },
}, },
...@@ -113,6 +122,7 @@ export default { ...@@ -113,6 +122,7 @@ export default {
key: "status", key: "status",
title: "状态", title: "状态",
align: "center", align: "center",
width:150,
render: (h, params) => { render: (h, params) => {
return h( return h(
"op", "op",
...@@ -144,6 +154,11 @@ export default { ...@@ -144,6 +154,11 @@ export default {
title: this.l1("name"), title: this.l1("name"),
align: "left", align: "left",
}, },
{
key: "code",
title: this.l1("code"),
align: "left",
},
{ {
key: "materialCode", key: "materialCode",
title: this.l1("materialCode"), title: this.l1("materialCode"),
...@@ -163,22 +178,25 @@ export default { ...@@ -163,22 +178,25 @@ export default {
key: "creationTime", key: "creationTime",
title: this.l1("creationTime1"), title: this.l1("creationTime1"),
align: "center", align: "center",
width:220,
}, },
{ {
key: "creator", key: "creator",
title: this.l1("creator1"), title: this.l1("creator1"),
align: "right", align: "left",
}, },
{ {
key: "total", key: "nowTotal",
title: this.l1("total1"), title: this.l1("nowTotal"),
align: "right", align: "right",
width:150,
}, },
{ {
key: "count", key: "count",
title: this.l1("count"), title: this.l1("count"),
align: "right", align: "right",
slot: "counts", slot: "counts",
width:150,
}, },
], ],
datasOut: [], datasOut: [],
...@@ -205,6 +223,7 @@ export default { ...@@ -205,6 +223,7 @@ export default {
key: "creationTime", key: "creationTime",
title: this.l2("creationTime"), title: this.l2("creationTime"),
align: "center", align: "center",
width:220,
}, },
{ {
key: "creatorUserId", key: "creatorUserId",
...@@ -215,6 +234,7 @@ export default { ...@@ -215,6 +234,7 @@ export default {
key: "count", key: "count",
title: this.l2("count"), title: this.l2("count"),
align: "right", align: "right",
width:150,
}, },
], ],
}; };
...@@ -330,6 +350,7 @@ export default { ...@@ -330,6 +350,7 @@ export default {
temItems.forEach((el) => { temItems.forEach((el) => {
if (el.count > 0) { if (el.count > 0) {
let temObj = { let temObj = {
stockItemId:el.id,
count: el.count, count: el.count,
storeId: el.storeId, storeId: el.storeId,
storeTitle: el.storeTitle, storeTitle: el.storeTitle,
...@@ -379,9 +400,11 @@ export default { ...@@ -379,9 +400,11 @@ export default {
this.$set(this.datasOut, index, row); this.$set(this.datasOut, index, row);
}, },
openAccessoryList(row) { openAccessoryList(row) {
this.ModalAccList = true; if (row.outCount && row.outCount > 0) {
this.easySearch.supportItemId.value = row.id; this.ModalAccList = true;
this.$refs.grid.reload(this.easySearch); this.easySearch.supportItemId.value = row.id;
this.$refs.grid.reload(this.easySearch);
}
}, },
l(key) { l(key) {
key = "support_main" + "." + key; key = "support_main" + "." + key;
......
...@@ -39,4 +39,7 @@ export default { ...@@ -39,4 +39,7 @@ export default {
return Api.post(`${resourceUrl}/outmain/batchdelete`, params); return Api.post(`${resourceUrl}/outmain/batchdelete`, params);
}, },
indexAcc: `${resourceUrl}/outitem/paged`, indexAcc: `${resourceUrl}/outitem/paged`,
listbysupportitem(params) {//查询所有或单个表单出库信息
return Api.post(`${resourceUrl}/outitem/listbysupportitem`, params);
},
} }
...@@ -52,6 +52,7 @@ export default { ...@@ -52,6 +52,7 @@ export default {
title: this.l("finishDate"), title: this.l("finishDate"),
align: "center", align: "center",
type: "date", type: "date",
width:200,
}, },
{ {
key: "orderCode", key: "orderCode",
...@@ -64,10 +65,30 @@ export default { ...@@ -64,10 +65,30 @@ export default {
title: this.l("creationTime"), title: this.l("creationTime"),
align: "center", align: "center",
type: "date", type: "date",
width:200,
}, },
{ key: "creator", title: this.l("creator"), align: "left" }, { key: "creator", title: this.l("creator"), align: "left" },
{ key: "status", title: this.l("status"), align: "center" }, {
{ key: "status1", title: this.l("status1"), align: "center" }, key: "status",
title: this.l("status"),
align: "center",
width:150,
render: (h, params) => {
return h(
"op",
{
attrs: {
oprate: "detail",
},
style: {
color: this.setName(this.statuList,params.row.status).color,
},
},
this.setName(this.statuList,params.row.status).name
);
},
},
{ key: "status1", title: this.l("status1"), align: "center",width:150, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -123,6 +144,7 @@ export default { ...@@ -123,6 +144,7 @@ export default {
getOutBound(row) { getOutBound(row) {
this.curId = row.id; this.curId = row.id;
this.title = "出库单"; this.title = "出库单";
this.entity = row;
this.detail = () => import("./outbound"); this.detail = () => import("./outbound");
this.modal = true; this.modal = true;
}, },
......
<template> <template>
<div>444444</div> <div class="h100">
</template> <p class="mb10">
\ No newline at end of file 申请单号:{{row.code}}
<span class="ml20">齐套日期:{{row.finishDate.substring(0,10)}}</span>
<span class="ml50">申请人:{{row.creator}}</span>
<span class="ml20">申请时间:{{row.creationTime}}</span>
<span class="ml20">
状态:
<state code="outstore.status" :value="row.status+''" type="text"></state>
</span>
<Button
type="primary"
shape="circle"
:icon="iconLabel"
class="fr"
size="small"
@click="openMore"
>{{butTxt}}</Button>
</p>
<Table
:columns="cols"
:data="datas"
class="tableCommon"
ref="gridTable"
border
highlight-row
@on-current-change="curChange"
:height="tableHeight1"
></Table>
<div class="mt20 mb50">
<Table
:columns="colsList"
:data="dataList"
class="tableCommon"
ref="gridTable1"
border
@on-selection-change="selectChange"
></Table>
</div>
<div>
<FooterToolbar v-show="footerToolbar" class="ftball">
<!--<div class="tip">已选{{selectItems.length}}</div>-->
<Button type="primary" class="mr10 ml10" @click="application(1,null)">批量撤回</Button>
<Button @click="cancelBatch">取消</Button>
</FooterToolbar>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Edit",
data() {
return {
disabled: false,
entity: {},
statuList: this.$store.getters.dictionaryByKey("accessory.status") || [],
statuList1: this.$store.getters.dictionaryByKey("outstore.status") || [],
cols: [
{
key: "materialName",
title: this.l("materialName"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
},
{
key: "count",
title: this.l("count1"),
align: "right",
width: 150,
},
{
key: "outCount",
title: "出库数",
align: "right",
width: 150,
},
{
key: "status",
title: "状态",
align: "center",
width: 150,
render: (h, params) => {
return h(
"op",
{
attrs: {
oprate: "detail",
},
style: {
color: this.setName(this.statuList1, params.row.status).color,
},
},
this.setName(this.statuList1, params.row.status).name
);
},
},
{
key: "remark",
title: this.l("remark"),
align: "left",
},
],
datas: [],
splitHeight: "",
tempOut: [],
colsList: [
{
type: "selection",
width: 70,
align: "center",
},
{
key: "materialName",
title: this.l2("materialName"),
align: "left",
},
{
key: "materialNumber",
title: this.l2("materialNumber"),
align: "left",
},
{
key: "storeTitle",
title: this.l2("storeTitle"),
align: "left",
},
{
key: "creationTime",
title: this.l2("creationTime"),
align: "center",
width: 220,
},
{
key: "creatorUserId",
title: this.l2("creatorUserId"),
render: (h, params) => {
if (params.row.creatorUserId) {
return h("User", {
props: {
value: params.row.creatorUserId,
},
});
}
},
},
{
key: "count",
title: this.l2("count"),
align: "right",
width: 150,
},
{
key: "action",
title: "操作",
align: "center",
width: "120",
render: (h, params) => {
return h(
"op",
{
attrs: {
oprate: "edit",
},
on: {
click: () => this.application(2, params.row),
},
},
"撤回"
);
},
},
],
dataList: [],
footerToolbar: false,
tableHeight1: "96",
butTxt: "更多",
iconLabel: "md-arrow-dropdown",
tempList: [],
tempID: null,
};
},
props: {
eid: Number,
row: Object,
},
mounted() {
//this.splitHeight = window.innerHeight - 150;
//this.tableHeight1 = "120";
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
//this.splitHeight = window.screenHeight - 150;
//this.tableHeight1 = this.splitHeight * this.split;
})();
};
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.getitemlist({ id: v }).then((r) => {
if (r.success) {
//----测试多条数据start----
// let temData = [];
// for (let i = 0; i < 10; i++) {
// temData = temData.concat(r.result.children);
// }
//this.datas = temData;
//----测试多条数据end----
//this.datas = r.result.children;
this.tempList = r.result.children;
this.datas = this.tempList.slice(0, 1);
let parm = { orderId: r.result.orderId };
Api.listbysupportitem(parm).then((res) => {
if (res.success) {
this.dataList = res.result;
}
});
}
});
},
//状态名称过滤
setName(list, v) {
let outPar = {
name: "",
color: "",
};
if ((v + "").indexOf(",") == -1) {
var item;
list.map((u) => {
if (u.code == v) {
item = u;
}
});
if (item) {
//this.items = item;
outPar = {
name: item.name,
color: item.color,
};
}
}
return outPar;
},
curChange(curRow, oldRow) {
//当前物料过滤
//点击物料行
this.getList(curRow.id)
},
getList(id) {
let parm = { supportItemId: id };
Api.listbysupportitem(parm).then((res) => {
if (res.success) {
this.dataList = res.result;
}
});
this.footerToolbar = false;
},
openMore() {
//展开收起按钮
if (this.butTxt == "更多") {
//for (var i = 0; i < 3; i++) {
// this.datas = this.datas.concat(this.datas);
// }
this.datas = this.tempList;
if (this.datas.length > 4) {
this.tableHeight1 = "240";
} else {
this.tableHeight1 = "";
}
this.butTxt = "收起";
this.iconLabel = "md-arrow-dropup";
} else {
this.tableHeight1 = "96";
this.butTxt = "更多";
this.iconLabel = "md-arrow-dropdown";
this.datas = this.tempList.slice(0, 1);
}
},
selectChange(selections) {
this.tempOut = selections;
//复选框选择
if (selections.length > 0) {
this.footerToolbar = true;
} else {
this.footerToolbar = false;
}
},
cancelBatch() {
this.footerToolbar = false;
this.$refs["gridTable1"].selectAll(false);
},
application(type, row) {
//撤销出库(批量type 1 ,单挑type 2)
if (type == 1) {
alert(JSON.stringify(this.tempOut));
} else {
alert(JSON.stringify(this.row));
}
this.load(this.eid);
},
l(key) {
key = "support_main" + "." + key;
return this.$t(key);
},
l1(key) {
key = "stock" + "." + key;
return this.$t(key);
},
l2(key) {
key = "support_item" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
},
},
};
</script>
<style scoped>
.ftball {
background: rgba(0, 0, 0, 0.7);
color: #fff;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment