Commit 1c4d984b authored by renjintao's avatar renjintao

物料领用ing

parent 0c4ad817
...@@ -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;
......
...@@ -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:{
......
<template> <template>
<div class="h100 table-content"> <div class="h100 table-content1">
<p class="mb10"> <p class="mb10">
订单编号:{{mesCodes}} 订单编号:{{mesCodes}}
<span class="ml20">产品名称:{{productNames}}</span> <span class="ml20">产品名称:{{productNames}}</span>
...@@ -15,65 +14,29 @@ ...@@ -15,65 +14,29 @@
<div class="mb20" v-for="(item,i) in datas" :key="i"> <div class="mb20" v-for="(item,i) in datas" :key="i">
<p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p> <p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p>
<Table <Table border :columns="cols" :data="item.suport" :ref="'table'+item.routingHeaderId" class="tableCommon" @on-selection-change="selectionChange(i)" @on-select-cancel="selectListCancel" @on-select-all-cancel="selectAllCancel" @on-select="selectList" @on-select-all="selectListAll">
border
:columns="cols"
:data="item.suport"
:ref="'table'+item.routingHeaderId"
class="tableCommon"
@on-selection-change="selectionChange(i)"
@on-select-cancel="selectListCancel"
@on-select-all-cancel="selectAllCancel"
@on-select="selectList"
@on-select-all="selectListAll"
>
<template slot-scope="{ row, index }" slot="counts"> <template slot-scope="{ row, index }" slot="counts">
<InputNumber <InputNumber :max="row.totalCount-row.applicationNumber" :min="0" v-model="row.count" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" />
:max="row.totalCount-row.applicationNumber"
:min="0"
v-model="row.count"
@on-change="inputChange1(i,row,index)"
:disabled="row._disabled"
/>
</template> </template>
<template slot-scope="{ row, index }" slot="remarks"> <template slot-scope="{ row, index }" slot="remarks">
<Input <Input type="text" v-model="row.remark" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" />
type="text"
v-model="row.remark"
@on-change="inputChange1(i,row,index)"
:disabled="row._disabled"
/>
</template> </template>
</Table> </Table>
</div> </div>
<FooterToolbar v-show="footerToolbar" class="ftball"> <FooterToolbar v-show="footerToolbar" class="ftball pt10">
<!--<div class="tip">已选{{selectItems.length}}项</div>--> <!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form :model="orderForm" :label-width="110" ref="formValidate" :rules="ruleValidate"> <Form :model="orderForm" :inline="true" :label-width="110" ref="formValidate" :rules="ruleValidate">
<FormItem label=" " prop="QuotationFinishDate"> <FormItem label=" " prop="QuotationFinishDate">
<DatePicker <DatePicker v-model="orderForm.QuotationFinishDate" type="date" style="color:black" placeholder="请选择齐套日期" @on-change="getTimeQuotationFD"></DatePicker>
v-model="orderForm.QuotationFinishDate"
type="date"
style="color:black"
placeholder="请选择齐套日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem> </FormItem>
<FormItem label=""><Button type="primary" class="mr10 ml10" @click="application">申请配套</Button></FormItem>
</Form> </Form>
<Button type="primary" class="mr10 ml10" @click="application">申请配套</Button>
</FooterToolbar> </FooterToolbar>
<Modal v-model="modalAccessoryList" :title="title" fullscreen footer-hide> <Modal v-model="modalAccessoryList" :title="title" fullscreen footer-hide>
<component <component :is="detailAcc" :eid="orderId" :mesCode="mesCodes" :productName="productNames" :drawnNumber="drawnNumber" :count="counts" @on-close="cancel" @on-ok="onOk" />
:is="detailAcc"
:eid="orderId"
:mesCode="mesCodes"
:productName="productNames"
:drawnNumber="drawnNumber"
:count="counts"
@on-close="cancel"
@on-ok="onOk"
/>
</Modal> </Modal>
<Modal v-model="modalAccSet" title="临时设置" footer-hide width="800"> <Modal v-model="modalAccSet" title="临时设置" footer-hide width="800">
<Form :model="entity" :label-width="110" ref="formValidateSet" :rules="ruleValidate"> <Form :model="entity" :label-width="110" ref="formValidateSet" :rules="ruleValidate">
...@@ -95,21 +58,12 @@ ...@@ -95,21 +58,12 @@
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="可再申请" prop="count"> <FormItem label="可再申请" prop="count">
<InputNumber <InputNumber :max="entity.needCount-entity.applicationNumber" :min="0" v-model="entity.count" />
:max="entity.needCount-entity.applicationNumber"
:min="0"
v-model="entity.count"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="齐套日期" prop="finishDate"> <FormItem label="齐套日期" prop="finishDate">
<DatePicker <DatePicker v-model="entity.finishDate" type="date" placeholder="请选择齐套日期" @on-change="getTimeFinish"></DatePicker>
v-model="entity.finishDate"
type="date"
placeholder="请选择齐套日期"
@on-change="getTimeFinish"
></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="24"> <Col span="24">
...@@ -126,8 +80,9 @@ ...@@ -126,8 +80,9 @@
</Row> </Row>
</Form> </Form>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
...@@ -143,8 +98,7 @@ export default { ...@@ -143,8 +98,7 @@ export default {
curId: 0, curId: 0,
editIndex: -1, editIndex: -1,
editNum: "", editNum: "",
cols: [ cols: [{
{
type: "selection", type: "selection",
width: 70, width: 70,
align: "center", align: "center",
...@@ -194,8 +148,7 @@ export default { ...@@ -194,8 +148,7 @@ export default {
width: "120", width: "120",
render: (h, params) => { render: (h, params) => {
return h( return h(
"op", "op", {
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
}, },
...@@ -204,9 +157,9 @@ export default { ...@@ -204,9 +157,9 @@ export default {
}, },
}, },
params.row._disabled && params.row._disabled &&
params.row.totalCount - params.row.applicationNumber > 0 params.row.totalCount - params.row.applicationNumber > 0 ?
? "临时申请" "临时申请" :
: "" ""
); );
}, },
}, },
...@@ -224,28 +177,22 @@ export default { ...@@ -224,28 +177,22 @@ export default {
counts: this.count, counts: this.count,
curArr: 0, //标记当前操作工艺规程列表是否为空 curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: { ruleValidate: {
QuotationFinishDate: [ QuotationFinishDate: [{
{
required: true, required: true,
message: "_", message: "_",
trigger: "change", trigger: "change",
}, }, ],
], finishDate: [{
finishDate: [
{
required: true, required: true,
message: "请选择齐套日期", message: "请选择齐套日期",
trigger: "change", trigger: "change",
}, }, ],
], count: [{
count: [
{
required: true, required: true,
message: "请输入申请数量", message: "请输入申请数量",
type: "number", type: "number",
trigger: "change", trigger: "change",
}, }, ],
],
}, },
tempList: [], tempList: [],
cRow: null, cRow: null,
...@@ -276,12 +223,17 @@ export default { ...@@ -276,12 +223,17 @@ export default {
mounted() { mounted() {
this.load(this.eid); this.load(this.eid);
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
load(v) { load(v) {
Api.matchdetaillist({ id: v }).then((r) => { Api.matchdetaillist({
id: v
}).then((r) => {
if (r.success) { if (r.success) {
r.result.forEach((e) => { r.result.forEach((e) => {
let i = 0; let i = 0;
...@@ -414,7 +366,7 @@ export default { ...@@ -414,7 +366,7 @@ export default {
count: this.counts, count: this.counts,
creator: this.$store.state.userInfo.userName, creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate, finishDate: this.orderForm.QuotationFinishDate,
orderCode:this.mesCode, orderCode: this.mesCode,
}, },
items: temItems, items: temItems,
}; };
...@@ -458,7 +410,7 @@ export default { ...@@ -458,7 +410,7 @@ export default {
count: this.counts, count: this.counts,
creator: this.$store.state.userInfo.userName, creator: this.$store.state.userInfo.userName,
finishDate: this.entity.finishDate, finishDate: this.entity.finishDate,
orderCode:this.mesCode, orderCode: this.mesCode,
}, },
items: temItems, items: temItems,
}; };
...@@ -514,4 +466,3 @@ export default { ...@@ -514,4 +466,3 @@ export default {
}, },
}; };
</script> </script>
<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>
</div> <span class="ml20">物料状态:</span>
</p>
<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>
<FooterToolbar v-show="footerToolbar">
<Button type="primary" class="mr10 ">物料领用</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",
},
{
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",
},
{
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: 120,
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 (() => {
...@@ -31,9 +152,69 @@ export default { ...@@ -31,9 +152,69 @@ export default {
}; };
}, },
methods: { methods: {
starFun(){ loadInfo() {
this.$Message.success("开工...") this.entity = this.row
let v = this.row.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);
},
l(key) {
let vkey = "support_item" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
row(v) {
this.entity = this.$u.clone(v);
this.productName = this.entity.productName
},
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"
: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': <!-- :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">
...@@ -27,8 +19,9 @@ ...@@ -27,8 +19,9 @@
</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 {
...@@ -86,7 +79,10 @@ export default { ...@@ -86,7 +79,10 @@ export default {
headid: item.routingHeaderId, headid: item.routingHeaderId,
routid: item.routingDetailId, //工序ID routid: item.routingDetailId, //工序ID
quantity: item.quantity, //派工数量 quantity: item.quantity, //派工数量
dispatchStatus: item.status dispatchStatus: item.status,
mesCode: item.mesCode,
productName: item.productName,
drawnNumber: item.drawnNumber,
} }
}); });
} }
...@@ -104,7 +100,7 @@ export default { ...@@ -104,7 +100,7 @@ export default {
this.loadTree(); this.loadTree();
}, },
refresh(v) { refresh(v) {
this.refresh=v; this.refresh = v;
this.loadTree(); this.loadTree();
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
@import "./execute.less"; @import "./execute.less";
</style> </style>
<template> <template>
<div class="execute_box"> <div class="execute_box">
<!-- <div class="top_title"> <!-- <div class="top_title">
<span class="fl">{{orderTitle}}</span> <span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div> <div>工单编号: 12001011</div>
...@@ -11,25 +11,13 @@ ...@@ -11,25 +11,13 @@
<a class="gd_list" @click="changeFresh">工单列表</a> <a class="gd_list" @click="changeFresh">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a> <a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 --> <!-- 工单列表 -->
<Drawer <Drawer placement="left" class="gd_box" :closable="false" :inner="true" :transfer="false" v-model="orderlistMode">
placement="left"
class="gd_box"
:closable="false"
:inner="true"
:transfer="false"
v-model="orderlistMode"
>
<div slot="header"> <div slot="header">
<div class="header"> <div class="header">
<a class="gd_tt" @click="goToOrder"> <a class="gd_tt" @click="goToOrder">
<Icon type="ios-undo-outline" />工单列表 <Icon type="ios-undo-outline" />工单列表
</a> </a>
<Dictionary <Dictionary code="taskList.status" class="select_star fr" v-model="odermodel" @on-change="searchOrder"></Dictionary>
code="taskList.status"
class="select_star fr"
v-model="odermodel"
@on-change="searchOrder"
></Dictionary>
</div> </div>
<div class="select_t" style="height:40px"> <div class="select_t" style="height:40px">
<Button @click="changeAsc" class="fr" shape="circle" icon="md-calendar">{{ascTitle}}</Button> <Button @click="changeAsc" class="fr" shape="circle" icon="md-calendar">{{ascTitle}}</Button>
...@@ -39,22 +27,20 @@ ...@@ -39,22 +27,20 @@
<orderlist ref="orderlistref" :asc="asc" :statu="statu" :refresh="refresh" :order="inputId" /> <orderlist ref="orderlistref" :asc="asc" :statu="statu" :refresh="refresh" :order="inputId" />
</Drawer> </Drawer>
<!-- 功能区 --> <!-- 功能区 -->
<Drawer <Drawer class="gn_box" :closable="false" :inner="true" :transfer="false" v-model="functionalMode">
class="gn_box"
:closable="false"
:inner="true"
:transfer="false"
v-model="functionalMode"
>
<functional @changeTitle="changeTitle" ref="functional" /> <functional @changeTitle="changeTitle" ref="functional" />
</Drawer> </Drawer>
</div> </div>
</template> </template>
<script> <script>
import functional from "./components/functional"; import functional from "./components/functional";
import orderlist from "./components/orderlist"; import orderlist from "./components/orderlist";
export default { export default {
components: { functional, orderlist }, components: {
functional,
orderlist
},
data() { data() {
return { return {
orderTitle: "进度汇报", orderTitle: "进度汇报",
...@@ -81,15 +67,21 @@ export default { ...@@ -81,15 +67,21 @@ export default {
row.id = this.$route.query.id; row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId; row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId; row.executeId = this.$route.query.executeId;
row.headid=this.$route.query.headid; row.headid = this.$route.query.headid;
row.routingdetailId=this.$route.query.routid; row.routingdetailId = this.$route.query.routid;
row.mesCode = this.$route.query.mesCode;
row.productName = this.$route.query.productName;
row.drawnNumber = this.$route.query.drawnNumber;
row.count = this.$route.query.quantity;
this.row = row; this.row = row;
this.inputId = this.$route.query.id; this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index"); this.detail = () => import("./starOrder/index");
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() {}, mounted() {},
...@@ -114,8 +106,7 @@ row.routingdetailId=this.$route.query.routid; ...@@ -114,8 +106,7 @@ row.routingdetailId=this.$route.query.routid;
this.detail = () => import("./starOrder/index"); this.detail = () => import("./starOrder/index");
} //进度汇报 } //进度汇报
if (number == 1) { if (number == 1) {
this.$Message.info("尊敬的用户,您没有该权限!"); this.detail = () => import("./MaterialCollec/index");
// this.detail = () => import("./MaterialCollec/index");
} //物料领用 } //物料领用
if (number == 2) { if (number == 2) {
// this.detail = () => import("./productSet/index"); // this.detail = () => import("./productSet/index");
......
...@@ -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;
} }
......
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