Commit ad50350b authored by renjintao's avatar renjintao

工单执行 data

parent 1c4d984b
...@@ -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: '备注',
......
...@@ -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
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
</Table> </Table>
</div> </div>
<FooterToolbar v-show="footerToolbar"> <FooterToolbar v-show="footerToolbar">
<Button type="primary" class="mr10 ">物料领用</Button> <Button type="primary" class="mr10" @click="materialCreate">物料领用</Button>
</FooterToolbar> </FooterToolbar>
</div> </div>
</template> </template>
...@@ -41,6 +41,7 @@ export default { ...@@ -41,6 +41,7 @@ export default {
key: "routingDetailNo", key: "routingDetailNo",
title: this.l("routingDetailNo"), title: this.l("routingDetailNo"),
align: "left", align: "left",
width: 100
}, },
{ {
key: "routingDetailName", key: "routingDetailName",
...@@ -61,6 +62,7 @@ export default { ...@@ -61,6 +62,7 @@ export default {
key: "totalCount", key: "totalCount",
title: this.l("totalCount"), title: this.l("totalCount"),
align: "left", align: "left",
width: 150,
}, },
{ {
key: "applicationNumber", key: "applicationNumber",
...@@ -85,7 +87,7 @@ export default { ...@@ -85,7 +87,7 @@ export default {
key: "count4", key: "count4",
title: this.l("count4"), title: this.l("count4"),
align: "center", align: "center",
width: 120, width: 150,
slot: "counts4", slot: "counts4",
}, },
{ {
...@@ -181,6 +183,49 @@ export default { ...@@ -181,6 +183,49 @@ export default {
//输入数量 //输入数量
this.$set(this.datas[i].suport, index, row); 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) { l(key) {
let vkey = "support_item" + "." + key; let vkey = "support_item" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
......
This diff is collapsed.
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