Commit d833d86b authored by kangzhenfei's avatar kangzhenfei

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

parents 6994cfe3 f8d35470
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<FooterToolbar v-if="batch" v-show="footerToolbar"> <FooterToolbar v-if="batch" v-show="footerToolbar">
<div class="tip">已选{{selectItems.length}}</div> <div class="tip">已选{{selectItems.length}}</div>
<slot name="batch"></slot> <slot name="batch"></slot>
<Button @click="footerToolbar=false">取消</Button> <Button @click="cancelBatch">取消</Button>
</FooterToolbar> </FooterToolbar>
</div> </div>
</template> </template>
...@@ -296,8 +296,8 @@ export default { ...@@ -296,8 +296,8 @@ export default {
} }
if (this.action) { if (this.action) {
//条件初始化处理。 //条件初始化处理。
if(this.initsearch){ if (this.initsearch) {
this.initsearch(this.search) this.initsearch(this.search);
} }
this.$api.post(this.action, this.search).then(r => { this.$api.post(this.action, this.search).then(r => {
if (this.format) { if (this.format) {
...@@ -484,6 +484,11 @@ export default { ...@@ -484,6 +484,11 @@ export default {
}, },
selectAll(status) { selectAll(status) {
this.$refs.table.selectAll(status); this.$refs.table.selectAll(status);
},
//批量取消
cancelBatch() {
this.footerToolbar = false;
this.$refs.table.selectAll(false);
} }
}, },
computed: { computed: {
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
<Icon type="md-git-compare" /> <Icon type="md-git-compare" />
</a> </a>
<DropdownMenu slot="list" style="text-align: center;"> <DropdownMenu slot="list" style="text-align: center;">
<DropdownItem v-for="li in items" :key="li" v-dragging="{ item: li, list: items}"> <DropdownItem v-for="li in items" :key="li.value" v-dragging="{ item: li, list: items}">
<a href="#"> <a href="#">
<Icon type="md-apps" /> <Icon type="md-apps" />
</a> </a>
<span>{{li}}</span> <span>{{li.name}}</span>
</DropdownItem> </DropdownItem>
</DropdownMenu> </DropdownMenu>
</Dropdown> </Dropdown>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
v-model="level" v-model="level"
:step="1" :step="1"
:min="0" :min="0"
:max="5" :max="4"
:marks="levelMarks" :marks="levelMarks"
show-stops show-stops
@on-change="setParameter" @on-change="setParameter"
...@@ -110,6 +110,15 @@ ...@@ -110,6 +110,15 @@
<span slot="open"></span> <span slot="open"></span>
<span slot="close"></span> <span slot="close"></span>
</i-switch> </i-switch>
</FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent">
<Slider
v-model="entity.discrete_percent"
:step="1"
:min="0"
:max="100"
@on-change="setPercent"
></Slider>
</FormItem> </FormItem>
<FormItem :label="l('discrete')" prop="discrete"> <FormItem :label="l('discrete')" prop="discrete">
<InputNumber <InputNumber
...@@ -117,12 +126,10 @@ ...@@ -117,12 +126,10 @@
:disabled="count==0" :disabled="count==0"
:min="1" :min="1"
:max="count==0?1:count" :max="count==0?1:count"
@on-change="setDiscrete"
></InputNumber> ></InputNumber>
<!-- <span>{{count}}</span> --> <!-- <span>{{count}}</span> -->
</FormItem> </FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent">
<span v-text="k"></span>
</FormItem>
</div> </div>
</Col> </Col>
</Row> </Row>
...@@ -138,7 +145,7 @@ import Api from "./api"; ...@@ -138,7 +145,7 @@ import Api from "./api";
export default { export default {
data() { data() {
return { return {
items:["是否多台","转序规则","加班策略","是否离散"], items:[{name:"是否多台",value:"multiple"},{name:"转序规则",value:"planState"},{name:"加班策略",value:"over"},{name:"是否离散",value:"dis"}],
entity: { entity: {
partTaskPk: 0, partTaskPk: 0,
opTaskPk: 0, opTaskPk: 0,
...@@ -154,6 +161,7 @@ export default { ...@@ -154,6 +161,7 @@ export default {
dis:false, dis:false,
isDiscrete: "否",//是否离散 是否 isDiscrete: "否",//是否离散 是否
discrete: 1, //离散数值 必须大于 1 discrete: 1, //离散数值 必须大于 1
discrete_percent:0,
multiple: false, multiple: false,
multipleEquip: "否", //"是否多台安排设备", 否 是 multipleEquip: "否", //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量 multipleCount: 1, //多台数量
...@@ -165,7 +173,7 @@ export default { ...@@ -165,7 +173,7 @@ export default {
levelRules: [], levelRules: [],
levelMarks: { levelMarks: {
0: "慢", 0: "慢",
5: "快" 4: "快"
}, },
rules: { rules: {
// calId: [ // calId: [
...@@ -228,10 +236,12 @@ export default { ...@@ -228,10 +236,12 @@ export default {
}, },
mounted() { mounted() {
this.$dragging.$on('dragged', ({ value }) => { this.$dragging.$on('dragged', ({ value }) => {
console.log(value.item) localStorage.setItem("apsitems",JSON.stringify(value.list));
console.log(value.list)
console.log(value.otherData)
}) })
var items=localStorage.getItem("apsitems");
if(items){
this.items=JSON.parse(items);
}
}, },
methods: { methods: {
getCal() { getCal() {
...@@ -254,20 +264,13 @@ export default { ...@@ -254,20 +264,13 @@ export default {
}); });
}, },
setParameter(v) { setParameter(v) {
// alert(v) this.entity.multiple=false;
let parameters = this.levelRules[v].prams; this.entity.planState=false;
parameters.map(u => { this.entity.over=false;
if (u.parametersCode == "PlanMethod") { this.entity.dis=false;
this.entity.planState = u.parameterValue == "平行"; for(var i=0;i<v;i++){
this.entity.planMethod = u.parameterValue; this.entity[this.items[i].value]=true;
} else if (u.parametersCode == "OverTime") {
this.entity.over = u.OverTime == "不加班";
this.entity.overTime = u.parameterValue;
} else if (u.parametersCode == "Discrete") {
this.entity.isDiscrete = u.parameterValue == "是";
this.entity.isDiscrete = u.parameterValue;
} }
});
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {
...@@ -310,6 +313,14 @@ export default { ...@@ -310,6 +313,14 @@ export default {
l(key) { l(key) {
let vkey = "mes_op_task_plan_simulate" + "." + key; let vkey = "mes_op_task_plan_simulate" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
},
setPercent(v){
this.entity.discrete=Math.round(((this.count-1)*v-this.count)/100);
},
setDiscrete(v){
this.entity.discrete_percent=(
(100 * this.count - 100 * this.entity.discrete) / (this.count - 1)
);
} }
}, },
computed: { computed: {
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
@click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status)" @click="toExecute(row.id,row.orderId,row.executeId,row.routingHeaderId,row.routingDetailId,row.quantity,row.status)"
> >
<Row class="title-i"> <Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col> <Col :span="10" class="order-code"><Ellipsis :text="row.productName" :lines="1" tooltip transfer /></Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col> <Col :span="10" class="order-code"><Ellipsis :text="row.mesCode" :lines="1" tooltip transfer /></Col>
<Col :span="4"> <Col :span="4">
<div class="sanjiao" :style="tdStyle(row.status)"></div> <div class="sanjiao" :style="tdStyle(row.status)"></div>
<div class="box"> <div class="box">
<div class="text" style="font-size:4px;font-weight:normal"> <div class="text">
<state <state
code="taskList.status" code="taskList.status"
ref="state" ref="state"
...@@ -217,7 +217,15 @@ export default { ...@@ -217,7 +217,15 @@ export default {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
toExecute(id, orderId, executeId, headid, routingDetailId,quantity, status) { toExecute(
id,
orderId,
executeId,
headid,
routingDetailId,
quantity,
status
) {
//跳转到对应操作页面 获取id:this.$route.query.id //跳转到对应操作页面 获取id:this.$route.query.id
this.$router.push({ this.$router.push({
path: "/produce/execute", path: "/produce/execute",
...@@ -315,11 +323,11 @@ export default { ...@@ -315,11 +323,11 @@ export default {
height: calc(100vh - 110px); height: calc(100vh - 110px);
.body { .body {
background: white; background: white;
border-radius: 4px; border-radius: 4px 0 4px 4px;
border: #cacbd0 solid 1px; border: #cacbd0 solid 1px;
margin-bottom: 30px; margin-bottom: 30px;
.title-i { .title-i {
padding: 0 8px; padding: 0 0 0 8px;
height: 38px; height: 38px;
line-height: 38px; line-height: 38px;
color: #2680eb; color: #2680eb;
...@@ -352,32 +360,30 @@ export default { ...@@ -352,32 +360,30 @@ export default {
box-shadow: 0 0 10px #888888; box-shadow: 0 0 10px #888888;
} }
} }
.sanjiao { .sanjiao {
margin: 38px;
height: 0px; height: 0px;
width: 0px; width: 0;
border-left: solid 60px transparent; border-left: solid 50px transparent;
position: absolute; float: right;
right: -46px; margin-right:-1px;
top: -38px;
} }
.box { .box {
color: white; color: white;
width: 80px; float: right;
height: 30px; margin-top: -42px;
overflow: hidden;
/* Rotate div */ /* Rotate div */
transform: rotate(33deg); transform: rotate(37deg);
-ms-transform: rotate(33deg); /* Internet Explorer */ -ms-transform: rotate(37deg); /* Internet Explorer */
-moz-transform: rotate(33deg); /* Firefox */ -moz-transform: rotate(37deg); /* Firefox */
-webkit-transform: rotate(33deg); /* Safari 和 Chrome */ -webkit-transform: rotate(37deg); /* Safari 和 Chrome */
-o-transform: rotate(33deg); /* Opera */ -o-transform: rotate(37deg); /* Opera */
.text { .text {
position: absolute; font-size: 8px;
left: 32px; font-weight: normal;
top: -13px;
} }
} }
.rowBottom .ivu-col-span-10 { .rowBottom .ivu-col-span-10 {
height: 24px; height: 24px;
padding-right: 10px; padding-right: 10px;
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger :style="{background: '#fff'}" class="menu" width="240" style=" flex:0;"> <Sider hide-trigger :style="{background: '#fff'}" class="menu" width="240" style=" flex:0;">
<StoreHouseLeft @storeIds="storeIds" :type='1'></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" :type='2'></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight">
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
:show.sync="showStoreHouseTree" :show.sync="showStoreHouseTree"
:value.sync="conditions.storeId.value" :value.sync="conditions.storeId.value"
:text.sync="conditions.storeTitle.value" :text.sync="conditions.storeTitle.value"
:type='2'
/> />
</div> </div>
</template> </template>
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
:show.sync="showStoreHouseTree" :show.sync="showStoreHouseTree"
:value.sync="conditions.storeId.value" :value.sync="conditions.storeId.value"
:text.sync="conditions.storeTitle.value" :text.sync="conditions.storeTitle.value"
:type='1'
/> />
</div> </div>
</template> </template>
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger :style="{background: '#fff'}" class="menu" width="240" style=" flex:0;"> <Sider hide-trigger :style="{background: '#fff'}" class="menu" width="240" style=" flex:0;">
<StoreHouseLeft @storeIds="storeIds" c></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" :type='3'></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight">
......
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
:show.sync="showStoreHouseTree" :show.sync="showStoreHouseTree"
:value.sync="conditions.storeId.value" :value.sync="conditions.storeId.value"
:text.sync="conditions.storeTitle.value" :text.sync="conditions.storeTitle.value"
:type='3'
/> />
</div> </div>
</template> </template>
......
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