Commit 8ec6fa8a authored by 仇晓婷's avatar 仇晓婷

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

parents 05a177e5 31282b72
...@@ -297,6 +297,9 @@ div::-webkit-scrollbar-corner { ...@@ -297,6 +297,9 @@ div::-webkit-scrollbar-corner {
.mr30 { .mr30 {
margin-right: 30px; margin-right: 30px;
} }
.mr40 {
margin-right: 40px;
}
.mtb10 { .mtb10 {
margin: 10px 0; margin: 10px 0;
......
...@@ -1664,7 +1664,7 @@ export default { ...@@ -1664,7 +1664,7 @@ export default {
nameMaterial: '物料名称', nameMaterial: '物料名称',
materialNumber: '物料编号', materialNumber: '物料编号',
needCount: '需要数量', needCount: '需要数量',
totalCount: '需数量', totalCount: '需数量',
outStockNumber: '出库数量', outStockNumber: '出库数量',
orderId: '', orderId: '',
remark: '备注', remark: '备注',
...@@ -1672,7 +1672,10 @@ export default { ...@@ -1672,7 +1672,10 @@ export default {
storeTitle: '库位名称', storeTitle: '库位名称',
stockCode: '物料序号', stockCode: '物料序号',
count1:"可申请数", count1:"可申请数",
count2:"申请数" count2:"申请数",
count3:"已领用数/出库数",
count4:"领用",
applicationNumber:"申请数"
}, },
//导入中心 //导入中心
import_center:{ import_center:{
......
This diff is collapsed.
...@@ -56,6 +56,10 @@ export default { ...@@ -56,6 +56,10 @@ export default {
matchdetaillist(params){//配套审核单列表 matchdetaillist(params){//配套审核单列表
return Api.get(`${technologyUrl}materiallist/matchdetaillist`, params); return Api.get(`${technologyUrl}materiallist/matchdetaillist`, params);
}, },
//物料领用
materialreceiveCreate(params){//配套审核单列表
return Api.post(`${technologyUrl}materialreceive/create`, params);
},
} }
\ No newline at end of file
This diff is collapsed.
<template> <template>
<div class="wu_bg"> <div class="h100 table-content1">
<div class="star" v-if="!starmodal"> <p class="mb10 ml40 mr40">
<a class="start" @click="starFun" > 订单编号:{{entity.mesCode}}
物料领用</a> <span class="ml20">产品名称:{{entity.productName}}</span>
</div> <span class="ml20">生产数量:{{entity.count}}</span>
<span class="ml20" v-show="false">物料状态:</span>
</p>
<div class="mb70">
<div class="mb20 ml40 mr40" v-for="(item,i) in datas" :key="i">
<p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p>
<Table border :columns="cols" :data="item.suport" :ref="'table'+item.routingHeaderId" class="tableCommon">
<template slot-scope="{ row, index }" slot="counts4">
<InputNumber :max="row.outStockNumber-row.receiveNumber" :min="0" v-model="row.count4" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" />
</template>
</Table>
</div> </div>
</div> </div>
<FooterToolbar v-show="footerToolbar">
<Button type="primary" class="mr10" @click="materialCreate">物料领用</Button>
</FooterToolbar>
</div>
</template> </template>
<script> <script>
import Api from "../../../aps/plan/api";
export default { export default {
name:'starOrder', name: 'starOrder',
data(){ data() {
return{ return {
starmodal: false, entity: {},
} title: "",
detailAcc: null,
modalAccessoryList: false,
modalAccSet: false,
disabled: false,
deletelModal: false,
curId: 0,
editIndex: -1,
editNum: "",
cols: [{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
width: 100
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
},
{
key: "totalCount",
title: this.l("totalCount"),
align: "left",
width: 150,
},
{
key: "applicationNumber",
title: this.l("applicationNumber"),
align: "right",
width: 120,
},
{
key: "",
title: this.l("count3"),
align: "right",
slot: "counts",
width: 150,
render: (h, params) => {
return h(
"div", {},
params.row.receiveNumber + "/" + params.row.outStockNumber
)
}
},
{
key: "count4",
title: this.l("count4"),
align: "center",
width: 150,
slot: "counts4",
},
{
key: "remark",
title: this.l("remark"),
align: "left",
}
],
orderForm: {
QuotationFinishDate: "",
},
datas: [],
selectItems: [],
footerToolbar: true,
orderId: null,
mesCode: "",
productName: "",
drawnNumber: "",
count: null,
curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: {
QuotationFinishDate: [{
required: true,
message: "_",
trigger: "change",
}, ],
finishDate: [{
required: true,
message: "请选择齐套日期",
trigger: "change",
}, ],
count: [{
required: true,
message: "请输入申请数量",
type: "number",
trigger: "change",
}, ],
},
tempList: [],
cRow: null,
cArr: [],
};
},
props: {
row: Object,
gdid: Number,
}, },
created() { created() {
// this.treeHeight = window.innerHeight - 120; // this.treeHeight = window.innerHeight - 120;
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
this.loadInfo()
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
this.treeHeight = window.innerHeight - 120; this.treeHeight = window.innerHeight - 120;
})(); })();
}; };
}, },
methods: { methods: {
starFun(){ loadInfo() {
this.$Message.success("开工...") this.entity = this.row
let v = this.entity.orderId
Api.matchdetaillist({
id: v
}).then((r) => {
if (r.success) {
r.result.forEach((e) => {
let i = 0;
e.suport.forEach((el) => {
el.count = el.totalCount - el.applicationNumber;
if (el.outStockNumber - el.receiveNumber > 0) {
el.count4 = el.outStockNumber - el.receiveNumber
el._disabled = false;
} else {
el.count4 = 0;
el._disabled = true;
}
el._index = i++;
});
});
this.datas = r.result;
}
});
},
inputChange1(i, row, index) {
//输入数量
this.$set(this.datas[i].suport, index, row);
},
//物料领用
materialCreate() {
let temDataOld = this.$u.clone(this.datas)
let temData = []
temDataOld.forEach(ele => {
temData = temData.concat(ele.suport)
})
// alert(JSON.stringify(temData))
let datas = []
temData.forEach(el => {
if (el.count4 && el.count4 > 0 && el.count4 != "") {
let temObj = {
routingHeaderId: el.routingHeaderId,
routingDeatilId: el.routingDetailId,
routingDetailName: el.routingDetailName,
routingDetailSeq: el.routingDetailNo,
count: el.count4,
materialId: el.materialId,
materialName: el.nameMaterial,
materialNumber: el.materialNumber,
supportMainId: 0,
}
datas.push(temObj)
}
})
if (datas.length > 0) {
let params = {
items: datas,
orderId: this.entity.orderId,
dispatchId: this.entity.id,
creator: this.$store.state.userInfo.userName,
status: 0
}
Api.materialreceiveCreate(params).then(r => {
if (r.success) {
this.$Message.success("物料领用成功");
this.loadInfo();
}
});
} else {
this.$Message.error("请输入领用物料数量!");
}
},
l(key) {
let vkey = "support_item" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
"row"() {
this.entity = this.$u.clone(this.row);
},
gdid(v) {
if (v > 0) {
// this.load(v);
}
}, },
}, },
} }
</script> </script>
<style lang="less">
.table-content1 {
.table-footer {
line-height: 45px;
text-align: right;
}
.ivu-footer-toolbar {
text-align: right;
background: rgba(0, 0, 0, 0.7);
color: #fff;
}
.ivu-footer-toolbar-right {
float: right;
}
}
</style>
<template> <template>
<div class="order_list"> <div class="order_list">
<div class="card_box"> <div class="card_box">
<Card <Card class="card_order" v-for="(item,index) in listTasks" :style="order==item.id?'box-shadow: 0px 0px 15px #333;':''" @click.native="goPage(item)" :key="index" :class="item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
class="card_order" (item.status==7?'card_border4':(item.status==-1?'card_border5':''))))">
v-for="(item,index) in listTasks" <!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
:style="order==item.id?'box-shadow: 0px 0px 15px #333;':''"
@click.native="goPage(item)"
:key="index"
:class="item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
(item.status==7?'card_border4':(item.status==-1?'card_border5':''))))"
>
<!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
(item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"--> (item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"-->
<p slot="title"> <p slot="title">
{{item.mesCode}} {{item.mesCode}}
<state code="taskList.status" ref="state" class="fr" :value="item.status" type="text"></state> <state code="taskList.status" ref="state" class="fr" :value="item.status" type="text"></state>
<!-- <span >{{item.status}}</span> --> <!-- <span >{{item.status}}</span> -->
</p> </p>
<p class="order_tit">{{item.productName}}</p> <p class="order_tit">{{item.productName}}</p>
<p> <p>
<Icon type="ios-pricetags" /> <Icon type="ios-pricetags" />
{{item.taskName}} {{item.taskName}}
</p> </p>
<p>{{item.beginTime}}~{{item.endTime}}</p> <p>{{item.beginTime}}~{{item.endTime}}</p>
</Card> </Card>
<p>{{listTasks.length}} 个工单</p> <p>{{listTasks.length}} 个工单</p>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Api from "../../api"; import Api from "../../api";
export default { export default {
name: "orderlist", name: "orderlist",
data() { data() {
return { return {
gnFlag: 0, gnFlag: 0,
listTasks: [], listTasks: [],
dataLength: 0 dataLength: 0
}; };
},
props: {
order: {
type: [String, Number]
},
asc: {
type: Boolean,
default: true
}, },
statu: { props: {
type: Number, order: {
default: -9 type: [String, Number]
}, },
refresh: { asc: {
type: Boolean, type: Boolean,
default: true default: true
} },
}, statu: {
created() { type: Number,
this.loadTree(); default: -9
}, },
methods: { refresh: {
loadTree() { type: Boolean,
let parmse = { default: true
status: this.statu,
isAsc: this.asc
};
Api.getCardList(parmse).then(res => {
if (res.success) {
this.listTasks = res.result;
this.dataLength = res.result.length;
} }
});
}, },
gnFunto(number, type) { created() {
this.gnFlag = number; this.loadTree();
}, },
goPage(item) { methods: {
this.$router.push({ loadTree() {
path: "/produce/execute", let parmse = {
query: { status: this.statu,
id: item.id, isAsc: this.asc
orderId: item.orderId, };
executeId: item.executeId, Api.getCardList(parmse).then(res => {
headid: item.routingHeaderId, if (res.success) {
routid: item.routingDetailId, //工序ID this.listTasks = res.result;
quantity: item.quantity, //派工数量 this.dataLength = res.result.length;
dispatchStatus: item.status }
});
},
gnFunto(number, type) {
this.gnFlag = number;
},
goPage(item) {
this.$router.push({
path: "/produce/execute",
query: {
id: item.id,
orderId: item.orderId,
executeId: item.executeId,
headid: item.routingHeaderId,
routid: item.routingDetailId, //工序ID
quantity: item.quantity, //派工数量
dispatchStatus: item.status,
mesCode: item.mesCode,
productName: item.productName,
drawnNumber: item.drawnNumber,
}
});
} }
});
}
},
watch: {
order(v) {
//alert(v)
},
asc(v) {
this.asc = v;
this.loadTree();
}, },
statu(v) { watch: {
this.statu = v; order(v) {
this.loadTree(); //alert(v)
}, },
refresh(v) { asc(v) {
this.refresh=v; this.asc = v;
this.loadTree(); this.loadTree();
},
statu(v) {
this.statu = v;
this.loadTree();
},
refresh(v) {
this.refresh = v;
this.loadTree();
}
} }
}
}; };
</script> </script>
\ No newline at end of file
...@@ -748,6 +748,5 @@ ...@@ -748,6 +748,5 @@
.zhuanx{ .zhuanx{
text-align: center; text-align: center;
line-height: 60px; line-height: 60px;
.line_p input{
}
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
...@@ -232,6 +232,9 @@ div::-webkit-scrollbar-corner { ...@@ -232,6 +232,9 @@ div::-webkit-scrollbar-corner {
.mr30 { .mr30 {
margin-right: 30px; margin-right: 30px;
} }
.mr40 {
margin-right: 40px;
}
.mtb10 { .mtb10 {
margin: 10px 0; margin: 10px 0;
} }
......
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
float: left; float: left;
margin: 20px 72px; margin: 20px 72px;
width: 300px; width: 300px;
height: 240px; height: 180px;
border-color: #2680EB; border-color: #2680EB;
} }
.gs_set .gs_card_box .gs_card .ivu-card-head { .gs_set .gs_card_box .gs_card .ivu-card-head {
...@@ -285,10 +285,13 @@ ...@@ -285,10 +285,13 @@
.gs_set .gs_card_box .gs_card .gs_p { .gs_set .gs_card_box .gs_card .gs_p {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
font-size: 20px;
text-align: center;
} }
.gs_set .gs_card_box .gs_card .gs_time { .gs_set .gs_card_box .gs_card .gs_time {
text-align: center; text-align: center;
color: #2680EB; color: #2680EB;
line-height: 46px;
} }
.gs_set .gs_card_box .gs_card .gs_time .b_size { .gs_set .gs_card_box .gs_card .gs_time .b_size {
font-size: 32px; font-size: 32px;
...@@ -297,9 +300,6 @@ ...@@ -297,9 +300,6 @@
background: #d3e6fb; background: #d3e6fb;
margin: 0 -16px; margin: 0 -16px;
height: 59px; height: 59px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 1px solid #2680eb;
} }
.gs_set .gs_card_box .gs_card .gs_footer a { .gs_set .gs_card_box .gs_card .gs_footer a {
display: inline-block; display: inline-block;
...@@ -311,7 +311,6 @@ ...@@ -311,7 +311,6 @@
.gs_set .gs_card_box .gs_card .gs_footer .gs_del { .gs_set .gs_card_box .gs_card .gs_footer .gs_del {
background: #2680EB; background: #2680EB;
color: #fff; color: #fff;
border-bottom-right-radius: 4px;
} }
.gs_set .gs_card_box .gs_card:hover { .gs_set .gs_card_box .gs_card:hover {
border-color: #2680EB; border-color: #2680EB;
...@@ -321,7 +320,7 @@ ...@@ -321,7 +320,7 @@
border: 1px dashed #2680EB; border: 1px dashed #2680EB;
color: #2680EB; color: #2680EB;
text-align: center; text-align: center;
line-height: 275px; line-height: 220px;
border-radius: 4px; border-radius: 4px;
} }
.gs_set .gs_card_box .gs_add i { .gs_set .gs_card_box .gs_add i {
...@@ -340,7 +339,7 @@ ...@@ -340,7 +339,7 @@
height: 56px; height: 56px;
border-radius: 28px 4px 4px 28px; border-radius: 28px 4px 4px 28px;
border: 1px solid #2d8cf0; border: 1px solid #2d8cf0;
margin: 15px 23px; margin: 15px 14px;
} }
.add_user .gd_userB .user_item i { .add_user .gd_userB .user_item i {
font-size: 56px; font-size: 56px;
...@@ -348,6 +347,7 @@ ...@@ -348,6 +347,7 @@
color: #2680EB; color: #2680EB;
} }
.add_user .gd_userB .user_item .gd_user { .add_user .gd_userB .user_item .gd_user {
line-height: 22px;
padding: 6px; padding: 6px;
color: #707070; color: #707070;
} }
......
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