Commit cded697f authored by 仇晓婷's avatar 仇晓婷

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

parents 589d5870 e3f1c251
......@@ -977,6 +977,7 @@ html [type=button] {
background: #1890FF;
color: #fff;
}
background: transparent;
}
a.detail{
......
......@@ -304,6 +304,9 @@ export default {
},
getTimeQuotationFD(value) {
this.orderForm.QuotationFinishDate = value;
},
p(s) {
return s < 10 ? "0" + s : s;
}
},
created() {
......
......@@ -53,23 +53,23 @@
:loading="loading"
></Table>
<div class="table-footer" ref="footer">
<div>
<slot name="footer"></slot>
</div>&nbsp;
<Page
v-if="page"
:total="search.total"
:current="search.page"
class="mr15 mt15 fr"
show-total
size="small"
show-elevator
show-sizer
:page-size="search.pageSize"
:page-size-opts="pageSizeOpts"
@on-change="pageChange"
@on-page-size-change="pageSizeChange"
/>
<div>
<slot name="footer"></slot>
</div>&nbsp;
<Page
v-if="page"
:total="search.total"
:current="search.page"
class="mr15 mt15 fr"
show-total
size="small"
show-elevator
show-sizer
:page-size="search.pageSize"
:page-size-opts="pageSizeOpts"
@on-change="pageChange"
@on-page-size-change="pageSizeChange"
/>
</div>
</div>
<Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search">
......@@ -130,7 +130,7 @@ export default {
search: {
pageIndex: 1,
pageSize: 20,
conditions: [],
conditions: []
},
pageSizeOpts: [20, 50, 100],
tableHeight: 0,
......@@ -529,6 +529,16 @@ export default {
});
};
}
if (u.type == "outputTime") {
u.render = (h, params) => {
let values = u.key;
return h("OutputTime", {
props: {
value: params.row[values]
}
});
};
}
return !u.hide;
});
return cols;
......
<template>
<TreeSelect v-model="dep" :data="data" @on-change="change" :disabled="disabled" :multiple="multiple"/>
<TreeSelect v-model="dep" :data="data" @on-change="change" :disabled="disabled" :multiple="multiple" :transfer="true"/>
</template>
<script>
......
......@@ -17,6 +17,23 @@
<span :title="item.value">{{ item.label }}</span>
</Radio>
</RadioGroup>
<CheckboxGroup
v-else-if="type === 'checkbox'"
ref="dicradio"
v-model="name"
@on-change="change"
:vertical="vertical"
>
<Checkbox
v-for="(item, index) in dic"
:disabled="item.disabled"
:label="item.value"
:key="index"
:border="border"
>
<span :title="item.value">{{ item.label }}</span>
</Checkbox>
</CheckboxGroup>
<Select
v-else
:placeholder="placeholder"
......
<template>
<Col :span="span" class="filed-col">
<div class="label">
<label v-text="name"></label>
<label v-text="name"></label>
</div>
<div class="value">
<slot></slot>
......@@ -40,7 +40,7 @@ export default {
display: flex;
flex-direction: row;
line-height: 40px;
>.label {
> .label {
background: #f7f7f7;
flex-grow: 0;
width: 120px;
......@@ -49,25 +49,27 @@ export default {
border-right: 1px solid #ddd;
flex-shrink: 0;
}
>.value {
> .value {
word-break: break-all;
word-wrap: break-word;
flex-grow: 1;
padding-left: 10px;
>div{
> div {
line-height: 30px;
}
}
}
}
}
.new_detail {
.new-detail {
.ivu-row {
width: 100% !important;
.filed-col {
box-sizing: border-box;
line-height: 70px;
>.label {
display: flex;
flex-direction: row;
> .label {
display: inline-block;
width: 100px;
text-align: right;
......@@ -75,7 +77,7 @@ export default {
height: 100%;
font-weight: bold;
}
>p {
> .value {
text-align: left;
height: 100%;
word-break: break-all;
......
......@@ -36,6 +36,7 @@
</div>
</template>
<script>
import util from '@/libs/util';
export default {
name: "files",
model: {
......@@ -185,7 +186,7 @@ export default {
this.postUrl =
fileUrl +
"/upload/?token=Bearer " +
window.sessionStorage.getItem("token") +
util.cookies.get('token') +
"&" +
this.convertObj(this.parms);
//是否显示上传按钮
......
<!--一次只能上传一个文件 -->
<template>
<div>
<div>
<Input
v-model="newName"
style="height:30px;width:240px;float:left;"
placeholder="请选择上传文件"
disabled
/>
<Upload
v-model="name"
:action="postUrl"
:on-success="uploadSuccess"
:on-error="uploadError"
:on-remove="removeFile"
:format="formatList"
:max-size="maxSize"
:on-exceeded-size="onExceededSize"
:on-format-error="onFormatError"
:show-upload-list="false"
:files="files"
:on-progress="onProgress"
style="width:120px;float:left"
>
<Button icon="ios-cloud-upload-outline">上传文件</Button>
</Upload>
<a v-show="newName.length>2&&showButton" :href="fileUrlPath" @click="downFile(newPath)" target="_blank" style="float:left">查看</a>
</div>
<Input v-model="newName" placeholder="请选择上传文件">
<Button v-if="view" icon="ios-eye" slot="prepend" @click="downFile(newName)"> </Button>
<Button type="primary" icon="ios-cloud-upload-outline" slot="append" @click="handler">上传</Button>
</Input>
<Upload
v-model="name"
:action="postUrl"
:on-success="uploadSuccess"
:on-error="uploadError"
:on-remove="removeFile"
:format="formatList"
:max-size="maxSize"
:on-exceeded-size="onExceededSize"
:on-format-error="onFormatError"
:show-upload-list="false"
:files="files"
:on-progress="onProgress"
>
<Button v-show="1==2" type="primary" ref="upload">上传</Button>
</Upload>
<Progress :percent="per" :stroke-width="5" v-show="vshowPro" />
</div>
</template>
<script>
import util from "@/libs/util";
export default {
name: "inputFile",
model: {
......@@ -47,12 +41,12 @@ export default {
postUrl:
fileUrl +
"/upload/?token=Bearer " +
window.sessionStorage.getItem("token") +
util.cookies.get("token") +
"&" +
this.parms,
formatList: ["png", "jpg", "gif"],
newName: "",
newPath:'',
newPath: "",
per: 0,
vshowPro: false
};
......@@ -72,9 +66,9 @@ export default {
type: String,
default: ""
},
showButton:{
type:Boolean,
default:true,
showButton: {
type: Boolean,
default: true
}
},
methods: {
......@@ -82,6 +76,9 @@ export default {
this.per = 0;
this.vshowPro = true;
},
handler() {
this.$refs.upload.$el.click();
},
// change(event) {
// this.$emit('on-change', event.target.value)
// },
......@@ -96,8 +93,8 @@ export default {
objImag.fileName = file.response.data.fileName;
objImag.filePath = file.response.data.downloadPath;
filesList.push(objImag);
this.newName = file.response.data.fileName;
this.newPath=file.response.data.downloadPath
this.newName = file.response.data.downloadPath;
this.newPath = file.response.data.downloadPath;
this.$emit("on-change", JSON.stringify(filesList));
this.per = 100;
setTimeout(() => {
......@@ -146,9 +143,20 @@ export default {
}
return this.formatList;
},
downFile(path) {
this.fileUrlPath = this.downUrl + path;
},
downFile(path) {
let truePath = path.trim();
if (truePath.length > 2) {
if (
truePath.substring(0, 7).toLowerCase() == "http://" ||
truePath.substring(0, 8).toLowerCase() == "https://"
) {
window.open(truePath, "_blank");
} else {
this.fileUrlPath = this.downUrl + path;
window.open(this.fileUrlPath, "_blank");
}
}
}
},
mounted() {
this.formatL();
......@@ -156,6 +164,9 @@ export default {
computed: {
nativeInputValue() {
return this.value === null || this.value === undefined ? "" : this.value;
},
view(){
return true
}
},
watch: {
......@@ -166,5 +177,4 @@ export default {
};
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<div style="padding-top:5px">{{name}}</div>
</template>
<script>
export default {
name: "outputTime",
data() {
return {
name: "",
item: {},
items: [],
data: []
};
},
props: {
value: {
type: [String, Number],
required: false
}
},
created() {},
mounted() {
this.setName();
},
methods: {
setName() {
this.name = this.secondsFormat(this.value);
},
secondsFormat(s) {
var day = Math.floor(s / (24 * 3600)); // Math.floor()向下取整
var hour = Math.floor((s - day * 24 * 3600) / 3600);
var minute = Math.floor((s - day * 24 * 3600 - hour * 3600) / 60);
var second = s - day * 24 * 3600 - hour * 3600 - minute * 60;
let outStr = "";
if (day) {
if (second == 0 && minute > 0 && hour > 0) {
outStr = day + "天" + hour + "小时" + minute + "分";
} else if (second == 0 && minute == 0 && hour > 0) {
outStr = day + "天" + hour + "小时";
} else if (second == 0 && minute == 0 && hour == 0) {
outStr = day + "天";
} else {
outStr = day + "天" + hour + "小时" + minute + "分" + second + "秒";
}
return outStr;
} else {
if (hour) {
if (second == 0 && minute > 0) {
outStr = hour + "小时" + minute + "分";
} else if (second == 0 && minute == 0) {
outStr = hour + "小时";
} else {
outStr = hour + "小时" + minute + "分" + second + "秒";
}
return outStr;
} else {
if (minute) {
if (second == 0) {
outStr = minute + "分";
} else {
outStr = minute + "分" + second + "秒";
}
return outStr;
} else {
if (second) {
return second + "秒";
}
}
}
}
}
},
computed: {},
watch: {
value(v) {
if (v > 0) this.setName();
}
}
};
</script>
\ No newline at end of file
......@@ -5,6 +5,7 @@
@on-change="change"
:multiple="multiple"
clearable
transfer
>
<Option v-for="item in dic" :value="item.value" :key="item.value" :label="item.label">
<div>
......
......@@ -1329,12 +1329,12 @@ export default {
routingHeaderId: '工艺ID',
routingHeaderName: '工艺',
routingDetailId: '工序ID',
routingDetailName: '工序名称',
routingDetailName: '工序',
routingDetailNo: '工序号',
routingStepId: '工步ID',
checkContent: '检测内容',
checkType: '检测类型',
checkParams: '检测要求',
checkParams: '检测参数',
measurementUnit: '测量单位',
fillintype: '填报类型',
isphotograph: '是否拍照',
......
......@@ -23,4 +23,7 @@ export default {
processschemedispatchinsert(params) { //排产方案下发--普通+干扰;如果result.retcode=0,调用:
return Api.post(`${apsUrl}/apspoolappservices/processschemedispatch_insert`, params);
},
getResults(){
return Api.post(`${apsUrl}/apspoolappservices/messehemacensorgetall`)
}
}
<template>
<div class="compare">
<div class="compare_box" :style="{height:treeHeight+'px'}">
<div class="compare_box">
<div class="left_list">
<ul class="left_ul">
<li class="left_ul_title">
隐藏相同
<i-switch size="small" v-model="switch1" @on-change="change" />
<!-- 隐藏相同
<i-switch size="small" v-model="switch1" @on-change="change" /> -->
</li>
<li>延期交付批次数</li>
<li>延期交付天数</li>
......@@ -20,31 +20,32 @@
<li>离散值平均值</li>
<li>任务平衡工序数</li>
<li>效率系数</li>
<li>加工设备数</li>
<li>设备工作天数</li>
</ul>
</div>
<div class="right_add flex">
<div class="fg list_box" v-for="a of 5" :class="a%2 == 1?'dip_bg':''" :key="a">
<div v-if="items.length>0" class="fg list_box" v-for="(li,a) in items" :class="a%2 == 1?'dip_bg':''" :key="a">
<ul class="right_ul">
<li class="right_ul_title">
<a class="del_case">
<Icon type="md-close" size="16" @click="delitedCase" title="删除" />
</a>
<span class="case">方案一{{a}}</span>
<span class="case_time">2020-03-22 13:26:35</span>
</li>
<li>延期交付批次数</li>
<li>延期交付天数</li>
<li>提前交付批次数</li>
<li>提前交付天数</li>
<li>周日加班设备数</li>
<li>周日设备工作小时数</li>
<li>周六加班设备数</li>
<li>周六设备工作小时数</li>
<li>重叠法工序数</li>
<li>离散法工序数</li>
<li>离散值平均值</li>
<li>任务平衡工序数</li>
<li>效率系数</li>
<li>{{li.deferNum}}&nbsp;</li>
<li>{{li.deferTime}}&nbsp;</li>
<li>{{li.aheadNum}}&nbsp;</li>
<li>{{li.aheadTime}}&nbsp;</li>
<li>{{li.weekdayEquip}}&nbsp;</li>
<li>{{li.weekdayTime}}&nbsp;</li>
<li>{{li.saturdayEquip}}&nbsp;</li>
<li>{{li.saturdayTime }}&nbsp;</li>
<li>{{li.superposeTask}}&nbsp;</li>
<li>{{li.disperseTask }}&nbsp;</li>
<li>{{li.disvalueAvg }}&nbsp;</li>
<li>{{li.poiseTask }}&nbsp;</li>
<li>{{li.efficiencyAvg}}&nbsp;</li>
<li>{{li.runEquip}}&nbsp;</li>
<li>{{li.runEquipTime}}&nbsp;</li>
</ul>
</div>
</div>
......@@ -60,33 +61,33 @@ export default {
name: "添加",
tree: [],
switch1: true,
treeHeight: ""
list:[],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
props:{
schemas:{
//方案集合
type:Array
}
},
components: {},
created() {
this.treeHeight = window.innerHeight - 170;
this.load()
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 170;
})();
};
},
methods: {
async load(){
let {result} = await Api.getResults();
console.log(result)
this.list=result;
},
change(status) {
this.$Message.info("开关状态:" + status);
},
// 删除方案
delitedCase() {
this.$Message.info("删除方案");
},
tabChange(name) {
if (name == "technicalcoordination") {
this.$refs.technicalcoordination.loadchangelist();
......@@ -95,6 +96,16 @@ export default {
this.$refs.unqualifiedorder.loadchangelist();
}
}
},
computed:{
items(){
var items=[];
this.schemas.map(p=>{
var info=this.list.filter(u=>u.schedule_Id==p.scheduleId)[0];
items.push(info);
})
return items;
}
}
};
</script>
......@@ -18,7 +18,7 @@
:key="index"
:class="isactive == index ? 'addclass' : '' "
>
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li)"></Checkbox>
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li,index)"></Checkbox>
<div class="title-t" @click="listData(li.schedule_Id,index)">排产方案:{{li.schedule_Id}}</div>
<div class="fa">排产时间:{{li.plan_Date}}</div>
<div class="fa">
......@@ -34,18 +34,18 @@
<h4 :text="title">{{title}}</h4>
</Col>
<Col span="10">
<a href="#" @click="comeBlck" class="black">返回</a>
<a href="#" @click="comeBlck" class="black">APS排产</a>
</Col>
<Col span="10" style="text-align: right;" v-if="gant">
<a href="#" @click="gantChart" class="gant">甘特图</a>
</Col>
</Row>
<component :is="detail" :eid="id" />
<component :is="detail" :eid="id" :schemas="schemas"/>
</Content>
</Layout>
<div class="footer" v-if="showFooter">
<span>已选:{{total}}</span>&nbsp;&nbsp;&nbsp;
<span>已选:{{schemas.length}}</span>&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="submit">方案对比</Button>&nbsp;
<Button type="default" @click="cancel">取消</Button>
</div>
......@@ -78,6 +78,7 @@ export default {
blacks: false,
gant: false,
gantt:null,
curPage:null
};
},
async fetch({ store, params }) {
......@@ -109,12 +110,6 @@ export default {
this.isactive = index;
this.id = id;
this.title = "排产方案结果";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
},
clear() {
if (this.list.length > 0) {
......@@ -156,49 +151,26 @@ export default {
this.modal1Gant = true;
this.gantt = () => import("./gantt");
},
changeCheck(item) {
this.isactive = null;
(this.id = null), (this.blacks = true);
if (item.checked == true) {
this.contrastList.push(item.schedule_Id);
} else if (item.checked == false) {
let index = this.contrastList.indexOf(item.schedule_Id);
if (index > -1) {
this.contrastList.splice(index, 1);
}
}
if (this.contrastList.length > 1) {
this.showFooter = true;
}
this.total = this.contrastList.length;
if (this.total == 0) {
this.showFooter = false;
changeCheck(item,i) {
this.$set(this.list,i,item);
if(this.title!='排产方案对比'){
this.showFooter=true;
}
},
submit() {
if (this.total >= 2) {
this.detail = () => import("./compare");
this.title = "排产方案比对";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
this.showFooter = false;
this.gant = false;
} else {
this.$Message.error("请选择大于等于2项方案进去比对");
}
this.title = "排产方案对比";
this.showFooter=false;
},
cancel() {
this.showFooter = false;
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
}
},
computed:{
schemas(){
return this.list.filter(u=>{
return u.checked==true;
})
}
}
};
......
......@@ -136,7 +136,7 @@
}
li {
line-height: 50px;
line-height: 40px;
text-align: center;
border-bottom: 1px solid #ccc;
}
......@@ -181,7 +181,7 @@
}
li {
line-height: 50px;
line-height: 40px;
text-align: center;
border-bottom: 1px solid #ccc;
}
......
......@@ -35,6 +35,9 @@ export default {
pauseCauseGetpaged(params){//获取工单暂停记录
return Api.get(`${PlanUrl}/orderexecutepausecause/getpaged`, params);
},
orderrecovery(params) {//订单回收
return Api.post(`${PlanUrl}/mesorders/orderrecovery`, params);
},
// getplantdepartments(params) {// 组织为”车间“的部门
// return Api.get(`${systemUrl}/department/getplantdepartments`, params);
......
......@@ -4,10 +4,8 @@
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline style="margin-top:5px;">
<FormItem prop="productingpreparationpeople" style="width:200px">
<WorkShopSelect
ref="userSelected"
v-model="easySearch.productingpreparationpeople.value"
/>
<!-- <departmentSelect v-model="easySearch.productingpreparationpeople.value"></departmentSelect>-->
<workShop v-model="easySearch.productingpreparationpeople.value"></workShop>
</FormItem>
<FormItem prop="keys">
<Input placeholder="请输入订单编号" v-model="easySearch.keys.value" />
......@@ -28,7 +26,30 @@
<Record :eid="recordId" />
</Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" :load="loading" :executeId="dispatchExecuteId" :orderId="orderId" />
<Speed :result="result" :load="loading" @on-close="clsoeSpeedModal" :executeId="dispatchExecuteId" :orderId="orderId" />
</Modal>
<Modal v-model="recycleModal" title="确定回收订单" width="600" class="suspend">
<Form ref="form" :model="recovery" :rules="rulesRecycle" :label-width="120">
<Row>
<Col :span="24">
<FormItem :label="l('mesCode')">{{mesCode}}</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('demandFinishDate')" prop="demandFinishDate">
<DatePicker
type="date"
placeholder="请选择日期"
style="width:240px"
v-model="recovery.demandFinishDate"
></DatePicker>
</FormItem>
</Col>
</Row>
</Form>
<div slot="footer">
<Button @click="cancelRecycle">取消</Button>
<Button type="primary" @click="changeFinishiDate">确定</Button>
</div>
</Modal>
</div>
</template>
......@@ -50,8 +71,8 @@ export default {
data() {
return {
result: [],
dispatchExecuteId:null,//任务id
orderId:null,//订单id
dispatchExecuteId: null, //任务id
orderId: null, //订单id
SpeedModal: false,
rowSuspend: {},
recordId: 0,
......@@ -64,6 +85,7 @@ export default {
suspendModal: false,
recordModal: false,
deletelModal: false,
recycleModal: false,
curId: 0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
......@@ -175,7 +197,7 @@ export default {
title: this.l("productName"),
align: "left",
easy: true,
high: true,
high: true
},
{
......@@ -245,7 +267,7 @@ export default {
code: "mes_xingchi_plan.order_material.routingType",
easy: true,
high: true,
width: 100,
width: 100
},
{
title: this.l("jindu"),
......@@ -334,7 +356,7 @@ export default {
key: "remark",
title: this.l("remark"),
align: "center",
hide:true
hide: true
},
{
title: "暂停记录",
......@@ -346,7 +368,7 @@ export default {
h(
"op",
{
attrs: { oprate: "record", class: "edit",title:'暂停记录' },
attrs: { oprate: "record", class: "edit" },
on: { click: () => this.record(params.row.id) }
},
"暂停记录"
......@@ -362,7 +384,9 @@ export default {
render: (h, params) => {
return h("div", { class: "action" }, [
h(
params.row.status == 5&&params.row.upSplitId==0 ? "Button" : "", //订单状态暂停,启动
params.row.status == 5 && params.row.upSplitId == 0
? "Button"
: "", //订单状态暂停,启动
{
props: {
type: "error",
......@@ -385,13 +409,16 @@ export default {
""
),
h(
params.row.status == 6&&params.row.upSplitId==0 ? "Button" : "", //订单状态执行中,暂停
params.row.status == 6 && params.row.upSplitId == 0
? "Button"
: "", //订单状态执行中,暂停
{
props: {
type: "success",
size: "small",
icon: "ios-pause",
ghost: true
ghost: true,
tooltip: "暂停"
},
style: {
fontSize: "18px",
......@@ -406,12 +433,44 @@ export default {
}
},
""
),
h(
params.row.status == 5 && params.row.upSplitId > 0 ? "op" : "", //订单状态执行中,暂停
{
attrs: {
icon: "md-sync",
type: "icon",
title: "回收订单",
oprate: "edit",
msg: "确认要恢复工序吗?"
},
on: {
click: () => {
this.recycle(params.row);
}
}
}
)
]);
}
}
],
loading: false
loading: false,
recovery: {
orderId: null,
demandFinishDate: "" //计划完成时间
},
mesCode: "",
rulesRecycle: {
demandFinishDate: [
{
required: true,
message: "请选择计划完成时间",
trigger: "change",
type: "date"
}
]
}
};
},
mounted() {},
......@@ -438,19 +497,21 @@ export default {
this.result = [];
this.loading = true;
this.SpeedModal = true;
this.dispatchExecuteId=row.dispatchExecuteId
this.orderId=row.id
this.dispatchExecuteId = row.dispatchExecuteId;
this.orderId = row.id;
Api.info({
routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId
}).then(r => {
if (r.success) {
this.result = r.result;
this.loading = false;
}
}).catch(err=>{
this.$Message.error("连接错误");
});
})
.then(r => {
if (r.success) {
this.result = r.result;
this.loading = false;
}
})
.catch(err => {
this.$Message.error("连接错误");
});
}
},
suspendOk() {
......@@ -482,7 +543,10 @@ export default {
}
});
},
clsoeSpeedModal()
{
this.SpeedModal=false;
},
suspend(row) {
console.log(row);
this.suspendModal = true;
......@@ -499,6 +563,53 @@ export default {
}
});
},
recycle(row) {
//回收订单
this.recycleModal = true;
this.mesCode = row.mesCode;
this.recovery = {
orderId: row.id,
demandFinishDate: row.demandFinishDate
};
},
changeFinishiDate() {
let temTime = this.recovery.demandFinishDate;
this.recovery.demandFinishDate = "";
this.recovery.demandFinishDate = this.getFormatDateEnd(temTime);
Api.orderrecovery(this.recovery)
.then(res => {
if (res.success) {
this.$Message.success("回收成功");
this.$refs.grid.reload(this.easySearch);
this.recycleModal = false;
}
})
.catch(err => {
this.$Message.error("数据连接错误");
});
},
cancelRecycle() {
this.mesCode = "";
this.recovery = {
orderId: null,
demandFinishDate: "" //计划完成时间
};
this.recycleModal = false;
},
getFinishedDate(value) {
this.recovery.demandFinishDate = value;
},
getFormatDateEnd(dates) {
const d = new Date(dates);
const resDate =
d.getFullYear() +
"-" +
this.p(d.getMonth() + 1) +
"-" +
this.p(d.getDate()) +
" 23:59:59";
return resDate;
},
//截取字符串
sliceStr(str, lenS, lenE) {
return str.slice(lenS, lenE);
......@@ -507,6 +618,9 @@ export default {
this.curId = 0;
this.suspendModal = false;
},
p(s) {
return Number(s) < 10 ? "0" + s : s;
},
l(key) {
let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key;
......@@ -521,4 +635,5 @@ export default {
.ivu-btn-group {
height: 21px !important;
}
</style>
\ No newline at end of file
......@@ -127,29 +127,38 @@ export default {
}
],
columnsProcess: [
{
key: "dispatch_id",
title: "工序Id",
{
key: "processcode",
title: "工艺文件编号",
align: "left",
width: 90
width: 200,
tooltip:true,
},
{
key: "processname",
title: "工艺名称",
align: "left",
tooltip:true,
},
{
key: "dispatch_id",
key: "taskSeq",
title: "工序号",
align: "left",
width: 90
},
{
key: "dispatch_id",
key: "detailName",
title: "工序名称",
align: "left",
width: 350
width: 350,
tooltip:true,
},
{
key: "desc",
title: "暂停原因",
align: "left"
align: "left",
tooltip:true,
},
{
key: "creatorUserId",
......@@ -162,7 +171,7 @@ export default {
{
key: "creationTime",
title: "暂停时间",
align: "left",
align: "center",
width: 180
}
],
......@@ -190,16 +199,9 @@ export default {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
// tabClick(tabIndex) {
// if (tabIndex == 2) {
// this.loadList();
// } else {
// this.$refs.grid.reload(this.easySearch);
// }
// },
loadList() {
let params = {
FilterText: "dispatch_id=104"
FilterText: 'order_id="'+this.eid+'"'
};
Api.pauseCauseGetpaged(params)
.then(res => {
......@@ -229,6 +231,7 @@ export default {
eid(v) {
this.condition.orderId.value = v;
this.$refs.grid.reload(this.condition);
this.loadList()
}
}
};
......
......@@ -353,6 +353,7 @@ export default {
.then(res => {
if (res.success) {
this.$Message.success("分卡成功");
this.$emit("on-close")
} else {
this.$Message.error("分卡失败");
}
......
<template>
<div class="">
<div class="wu_bg">
<div class="star" v-if="!starmodal">
<a class="start" @click="starFun" >
<Icon type="md-play" />
物料领用</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
</div>
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>名称:名称1</li>
<li>图号:UIGT-763245</li>
<li>状态:未开工</li>
<li>订单编号:097543346</li>
<li>订单属性1:</li>
<li>订单属性2:</li>
<li>订单属性3:</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:名称1</li>
<li>工序序号:UIGT-763245</li>
<li>派工数量:66</li>
<li>资源名称:23366</li>
<li>资源编号:986732038</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul>
</div>
<div class="img_box fl">
图片区
</div>
</div>
</div>
</template>
......
<template>
<div class="">
<div class="star" v-if="!starmodal">
<a class="start" @click="starFun" >
<Icon type="md-play" />
工艺案例</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
<div class="wu_bg">
<div class="case_top">
<div class="sear_btn">
<Input search class="search_box mr10" enter-button placeholder="请输入文件名" />
<a @click="allChecked" ><Icon type="md-checkbox-outline" />全选</a>
<a @click="copyCard" ><Icon type="ios-browsers-outline" />复制</a>
<a @click="deliteCard" ><Icon type="ios-trash-outline" />删除</a>
<a @click="importCard" ><Icon type="ios-log-in" />导入</a>
<a @click="exportCard" ><Icon type="ios-log-out" />导出</a>
<a @click="addCard" ><Icon type="ios-add-circle-outline" />新建</a>
<span>{{cardlist.length}} 个案例;</span>
<span>已选择 {{checkCards}} 个案例</span>
</div>
<a class="slip fr" @click="starFun" ><Icon type="md-swap" /></a>
</div>
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>名称:名称1</li>
<li>图号:UIGT-763245</li>
<li>状态:未开工</li>
<li>订单编号:097543346</li>
<li>订单属性1:</li>
<li>订单属性2:</li>
<li>订单属性3:</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:名称1</li>
<li>工序序号:UIGT-763245</li>
<li>派工数量:66</li>
<li>资源名称:23366</li>
<li>资源编号:986732038</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul>
</div>
<div class="img_box fl">
图片区
</div>
<div class="case_box">
<!-- <Row>
<Col span="6" v-for="i of 10" :key="i"> -->
<!-- <Card class="file_card" @click="checkCard">
<div class="file">
<Icon type="ios-paper" v-if="i%2==0"/>
<Icon type="ios-film" v-else/>
</div>
<div class="list">
<ul>
<li>工艺文档名称</li>
<li>张三</li>
<li>2020-02-12</li>
</ul>
</div>
</Card> -->
<!-- </Col>
</Row> -->
<CheckboxGroup v-model="caseLise" @on-change="changeCards">
<Checkbox class="file_card" border @on-change="changeCard"
v-for="(item,index) in cardlist" :label="item.id" :key="index">
<div class="file">
<Icon type="ios-paper" v-if="item.id%3==0"/>
<Icon type="ios-film" v-else/>
</div>
<div class="list">
<ul>
<li>{{item.name}}</li>
<li>{{item.userName}}</li>
<li>{{item.time}}</li>
</ul>
</div>
</Checkbox>
</CheckboxGroup>
</div>
</div>
</template>
......@@ -51,26 +58,205 @@ export default {
name:'starOrder',
data(){
return{
starmodal: false,
caseLise:[],
checkCards:0,
cardlist:[
{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:1,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:2,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:3,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:4,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:5,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:6,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:7,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:8,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:9,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:10,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:11,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:12,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:13,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:14,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:15,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:16,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:17,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:18,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:19,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:20,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:21,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:22,
checked:false
},{
name:'工艺文档名称',
userName:'张三',
time:'2020-02-06',
id:23,
checked:false
},
],
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
//
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
mounted() { },
methods: {
starFun(){
this.$Message.success("开工...")
this.$Message.success("排序...")
},
allChecked(){
let items = this.cardlist;
let item = [];
items.map(u=>{ item.push(u.id) } )
if(this.caseLise.length==0){
this.caseLise = item
this.checkCards = item.length
}else{
this.caseLise = []
this.checkCards = 0
}
},
copyCard(){
this.$Message.success("复制工艺案例")
},
deliteCard(){
if(this.checkCards==0){
this.$Message.warning("请选择工艺案例 !")
return
}else{
this.$Modal.confirm({
title: "删除确认",
content: "<p>确认要删除这 " + this.checkCards +" 个工艺案例吗?</p>",
onOk: () => {
this.$Message.success("删除工艺案例...")
}
});
}
},
importCard(){
this.$Message.success("导入工艺案例")
},
exportCard(){
this.$Message.success("导出工艺案例")
},
addCard(){
this.$Message.success("新建工艺案例")
},
changeCards(list){
this.checkCards = list.length
},
changeCard(value){
console.log(111)
},
},
}
......
<template>
<div class="">
<div class="star" v-if="!starmodal">
<a class="start" @click="starFun" >
<Icon type="md-play" />
工艺查看</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
</div>
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>名称:名称1</li>
<li>图号:UIGT-763245</li>
<li>状态:未开工</li>
<li>订单编号:097543346</li>
<li>订单属性1:</li>
<li>订单属性2:</li>
<li>订单属性3:</li>
<li>计划数量:10</li>
<li>节点日期:2020-02-25</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:名称1</li>
<li>工序序号:UIGT-763245</li>
<li>派工数量:66</li>
<li>资源名称:23366</li>
<li>资源编号:986732038</li>
<li>人员信息:</li>
<li>开始时间:</li>
<li>结束时间:</li>
<li>单件工时:10</li>
<li>准备工时:2020-02-25</li>
</ul>
</div>
<div class="img_box fl">
图片区
</div>
</div>
<div class="wu_bg">
<div class="wu_top">
工艺查看
</div>
</div>
</template>
<script>
......
.execute_box{
position: relative;
margin: 0px -10px;
.top_title{
height: 50px;
line-height: 49px;
text-align: center;
font-weight: 600;
padding: 0 15px;
border-bottom: 1px solid #CACBD0;
}
.star{
......@@ -24,10 +25,25 @@
line-height: 176px;
font-size: 22px;
color: #fff;
}
}
.button{
margin: 0 9%;
}
.star_step{
padding: 24px;
.step_item{
display: inline-block;
width: 200px;
.icon_B{
i{
font-size: 40px;
}
}
ul,li{
list-style: disc;
}
}
}
}
.gd_list{
position: absolute;
......@@ -217,6 +233,7 @@
margin: 20px 72px;
width: 300px;
height: 240px;
border-color: #2680EB;
.ivu-card-head{
background: #d3e6fb;
border-radius: 4px 4px 0px 0px;
......@@ -259,6 +276,7 @@
}
.gs_card:hover {
border-color: #2680EB;
box-shadow: 0px 6px 9px #484040b5;
}
.gs_add{
border: 1px dashed #2680EB;
......@@ -271,4 +289,106 @@
}
}
}
}
.add_user{
.gd_userB{
border: 1px solid #ccc;
padding: 10px;
height: 440px;
overflow-x: auto;
.user_item {
max-width: 160px;
display: inline-block;
width: 160px;
height: 56px;
border-radius: 28px 4px 4px 28px;
border: 1px solid #2d8cf0;
margin: 15px 23px;
i {
font-size: 56px;
float: left;
color: #2680EB;
}
.gd_user {
padding: 6px;
color: #707070;
}
.user_bg {
// border: 3px solid #ceb0b0;
border-radius: 25px 4px 4px 25px;
height: 54px;
background: #2680eb;
color: #fff;
i {
font-size: 56px;
color: #ffffff;
}
.gd_user {
padding: 6px;
color: #fff;
}
}
}
}
}
.wu_bg{
height: calc(100vh - 165px);
}
.case_top{
padding: 15px 70px 10px;
.sear_btn{
width: calc(100% - 80px);
display: inline-block;
.search_box{
width: 200px;
float: left;
}
a{
display: inline-block;
width: 65px;
height: 33px;
line-height: 40px;
text-align: center;
i{
font-size: 24px;
}
}
}
.slip{
margin-right: 20px;
i.ivu-icon{
font-size: 32px;
transform:rotate(90deg);
-ms-transform:rotate(90deg); /* Internet Explorer */
-moz-transform:rotate(90deg); /* Firefox */
-webkit-transform:rotate(90deg); /* Safari 和 Chrome */
-o-transform:rotate(90deg); /* Opera */
}
}
}
.case_box{
padding: 10px 20px;
height: calc(100vh - 210px);
overflow-y: auto;
.file_card{
background: #F5F6FA;
margin: 10px 50px;
width: 360px;
padding: 18px;
height: 110px;
line-height: 24px;
.ivu-checkbox {
display: none;
}
.file {
display: block;
width: 60px;
height: 64px;
float: left;
margin: 0 8px 0 0;
i{
font-size: 58px;
}
}
}
}
\ No newline at end of file
......@@ -4,21 +4,10 @@
<template>
<div class="execute_box">
<div class="top_title">
<span class="fl">{{orderTitle}}--{{orderindex}}</span>
<span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div>
</div>
<starOrder v-if="orderindex==0" ref="starOrder"/>
<MaterialCollec v-else-if="orderindex==1" ref="MaterialCollec"/>
<productSet v-else-if="orderindex==2" ref="productSet"/>
<taskTime v-else-if="orderindex==3" ref="taskTime"/>
<preparation v-else-if="orderindex==4" ref="preparation"/>
<ProcessCheck v-else-if="orderindex==5" ref="ProcessCheck"/>
<ProcessCase v-else-if="orderindex==6" ref="ProcessCase"/>
<judgment v-else-if="orderindex==7" ref="judgment"/>
<datafilling v-else-if="orderindex==8" ref="datafilling"/>
<testdata v-else-if="orderindex==9" ref="testdata"/>
<component :is="detail" :gdid="gdId"/>
<a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 -->
......@@ -47,29 +36,17 @@
<script>
import functional from "./components/functional";
import orderlist from "./components/orderlist";
import starOrder from "./starOrder/index";
import MaterialCollec from "./MaterialCollec/index";
import productSet from "./productSet/index";
import taskTime from "./taskTime/index";
import preparation from "./preparation/index";
import ProcessCheck from "./ProcessCheck/index";
import ProcessCase from "./ProcessCase/index";
import judgment from "./judgment/index";
import datafilling from "./datafilling/index";
import testdata from "./testdata/index";
export default {
components: { functional, orderlist,
starOrder,MaterialCollec,productSet,taskTime,preparation,
ProcessCheck,ProcessCase,judgment,datafilling,testdata
},
components: { functional, orderlist,},
data(){
return{
orderTitle:'进度汇报',
orderindex:0,
gdId:0,
starmodal: true,
orderlistMode:false,
functionalMode:false,
detail: null,
odermodel:'全部',
oderList:[
{
......@@ -98,19 +75,12 @@ export default {
}
},
created() {
// this.treeHeight = window.innerHeight - 120;
this.detail = () => import("./starOrder/index");
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
mounted() {},
methods: {
starFun(){
this.$Message.success("开工...")
......@@ -122,7 +92,6 @@ export default {
this.$refs.orderlist.loadTree();
}else{
allList.map((u,i)=>{
// console.log(i,":",u)
if(u.status==value){
newitems.push(u)
}
......@@ -133,6 +102,16 @@ export default {
changeTitle(number,type){
this.orderTitle = type
this.orderindex = number
if(number==0){ this.detail = () => import("./starOrder/index");}//进度汇报
if(number==1){ this.detail = () => import("./MaterialCollec/index");}//物料领用
if(number==2){ this.detail = () => import("./productSet/index");}//产品装配
if(number==3){ this.detail = () => import("./taskTime/index");}//工时分配
if(number==4){ this.detail = () => import("./preparation/index");}//生产准备
if(number==5){ this.detail = () => import("./ProcessCheck/index");}//工艺查看
if(number==6){ this.detail = () => import("./ProcessCase/index");}//工艺案例
if(number==7){ this.detail = () => import("./judgment/index");}//质量判定
if(number==8){ this.detail = () => import("./datafilling/index");}//数据填报
if(number==9){ this.detail = () => import("./testdata/index");}//测试数据
},
},
}
......
......@@ -6,11 +6,31 @@
<Icon type="md-play" />
开工</a>
</div>
<div class="star flex fc-b" v-else-if="starmodal">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
<div class="star" v-else-if="starmodal">
<div class=" flex fc-b">
<Button class="button" size='large' type="primary"><Icon type="ios-pause" /> 暂停</Button>
<Button class="button" size='large' type="primary"><Icon type="logo-angular" /> 交检</Button>
<Button class="button" size='large' type="primary"><Icon type="ios-checkmark-circle-outline" /> 完工</Button>
<Button class="button" size='large' type="primary"><Icon type="md-swap" /> 转序交接</Button>
</div>
<div class="star_step">
<div class="step_item" v-for="i of 6" :key="i">
<p class="icon_B">
<Icon type="md-arrow-dropright-circle" />
</p>
<p><a> 开工</a></p>
<ul>
<li>暂停 2020-02-06 15:35</li>
<li>继续 2020-02-06 15:35</li>
</ul>
</div>
<!-- <p><span></span>
2020-02-06 15:35
</p> -->
<!-- <Steps :current="6">
<Step icon="md-arrow-dropright-circle" v-for="i of 6" :key="i" :content="contentMsge"></Step>
</Steps> -->
</div>
</div>
<div class="footer_box">
<div class="ul_box fl">
......@@ -52,6 +72,7 @@ export default {
data(){
return{
starmodal: true,
contentMsge:"<ul><li>暂停 2020-02-06 15:35</li><li>继续 2020-02-06 15:35</li></ul>",
}
},
created() {
......
<template>
<div>
<div class="add_user">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<Col span="12">
<Col span="8">
<FormItem label="所属车间">
<Input v-model="entity.projectNo" disabled></Input>
<Select v-model="entity.che" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">
{{ item.label }}
</Option>
</Select>
</FormItem>
</Col>
<Col span="12">
<Col span="8">
<FormItem label="所属班组">
<Input v-model="entity.productName" disabled></Input>
<Select v-model="entity.productName" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
</Col>
<Col span="12">
<FormItem label="数字">
<InputNumber v-model="entity.outSideTime" style="width:150px;" :min="0"></InputNumber>
<Col span="8">
<FormItem label="">
<Input search enter-button placeholder="请输入编号" />
</FormItem>
</Col>
<Col span="24" class="mb20">
<div class="gd_userB">
<a class="user_item" @click="checkItem(index)" v-for="(item,index) in listMan" :key="index">
<div :class="{user_bg:item.checked}" >
<Icon type="md-contact" />
<div class="gd_user">
<span class="user_name">{{item.userName}}</span>
<span class="user_number">{{item.userCode}}</span>
</div>
</div>
</a>
</div>
</Col>
<Col span="24">
<FormItem label="分配工时">
<InputNumber :max="30" :min="0" v-model="value1"></InputNumber>&nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="23" :min="0" v-model="value1"></InputNumber> 小时 &nbsp;&nbsp;&nbsp;&nbsp;
<InputNumber :max="59" :min="1" v-model="value1"></InputNumber> 分钟 &nbsp;&nbsp;&nbsp;&nbsp;
</FormItem>
</Col>
</Row>
</Form>
<Row>
......@@ -33,13 +59,51 @@ export default {
data(){
return{
admor:1,
value1:1,
u_bgFlag:false,
entity: {
},
rules: {
outSideTime: [
{ required: true, message: "必填", type: "number", trigger: "change" }
]
}
},
cityList:[
{
value: '车间A1',
label: '车间A1'
},{
value: '车间A2',
label: '车间A2'
},{
value: '车间A3',
label: '车间A3'
},{
value: '车间A4',
label: '车间A4'
},{
value: '车间A5',
label: '车间A5'
},
],
listMan:[
{
checked:false,
userName:'张珊珊1',
userCode:'08965481',
id: 1
},{
checked:false,
userName:'张珊珊2',
userCode:'08965482',
id: 2
},{
checked:false,
userName:'张珊珊3',
userCode:'08965483',
id: 3
}
],
}
},
methods: {
......@@ -49,6 +113,9 @@ export default {
handleClose(){
this.$emit("on-close");
},
checkItem(i){
this.listMan[i].checked = !this.listMan[i].checked;
},
},
}
</script>
\ No newline at end of file
......@@ -87,11 +87,11 @@ export default {
},
delItem(){
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
this.$Message.success("删除工时...")
}
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
this.$Message.success("删除工时...")
}
});
},
cancel(){
......
<template>
<div class="">
<div class="">
<Button @click="toExecute">工单执行</Button>
</div>
</div>
</template>
<script>
export default {
name:'starOrder',
data(){
return{
starmodal: false,
}
},
created() { },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() { },
methods: {
toExecute(){
this.$router.push("/produce/execute");
},
},
}
</script>
......@@ -13,14 +13,14 @@
<Filed :span="12" :name="l('isImportantResources')">
<state code="Process.state" :value="entity.isImportantResources" type="text"></state>
</Filed>
<Filed :span="12" :name="l('schedulingWorkingHours')">{{entity.schedulingWorkingHours}}</Filed>
<Filed :span="12" :name="l('runtime')">{{entity.runtime}}</Filed>
<Filed :span="12" :name="l('realRuntime')">{{entity.realRuntime}}</Filed>
<Filed :span="12" :name="l('realWorkingHours')">{{entity.realWorkingHours}}</Filed>
<Filed :span="12" :name="l('schedulingWorkingHours')"><OutputTime :value="entity.schedulingWorkingHours"></OutputTime></Filed>
<Filed :span="12" :name="l('runtime')"><OutputTime :value="entity.runtime"></OutputTime></Filed>
<Filed :span="12" :name="l('realRuntime')"><OutputTime :value="entity.realRuntime"></OutputTime></Filed>
<Filed :span="12" :name="l('realWorkingHours')"><OutputTime :value="entity.realWorkingHours"></OutputTime></Filed>
<Filed :span="12" :name="l('isOutside')">
<state code="Process.state" :value="entity.isOutside" type="text"></state>
</Filed>
<Filed :span="12" :name="l('outsideTime')">{{entity.outsideTime}}</Filed>
<Filed :span="12" :name="l('outsideTime')"><OutputTime :value="entity.outsideTime"></OutputTime></Filed>
<Filed :span="12" :name="l('isParticipateIntime')">
<state code="Process.state" :value="entity.isParticipateIntime" type="text"></state>
</Filed>
......
......@@ -94,7 +94,7 @@ export default {
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true,
easy: true
},
{
key: "isImportantResources",
......@@ -106,19 +106,27 @@ export default {
{
key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"),
align: "right"
align: "right",
type: "outputTime",
},
{ key: "runtime", title: this.l("runtime"), align: "right" },
{
key: "runtime",
title: this.l("runtime"),
align: "right",
type: "outputTime",
},
{
key: "realRuntime",
title: this.l("realRuntime"),
align: "right"
align: "right",
type: "outputTime",
},
{
key: "outsideTime",
title: this.l("outsideTime"),
align: "right"
align: "right",
type: "outputTime",
},
{
......@@ -277,7 +285,12 @@ export default {
{
attrs: { oprate: "detail" },
on: {
click: () => this.addStep(params.row.id, params.row.name,params.row.maxNumStep)
click: () =>
this.addStep(
params.row.id,
params.row.name,
params.row.maxNumStep
)
}
},
"新增"
......@@ -313,7 +326,7 @@ export default {
],
list: [],
maxNum: 0,
maxNumTemp:0,
maxNumTemp: 0
};
},
created() {
......@@ -322,7 +335,7 @@ export default {
} else {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
this.hid =Number(this.easySearch.routingHeaderId.value);
this.hid = Number(this.easySearch.routingHeaderId.value);
},
mounted() {
this.load();
......@@ -385,7 +398,7 @@ export default {
},
add() {
this.curId = 0;
this.maxNum=this.maxNumTemp
this.maxNum = this.maxNumTemp;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
......@@ -420,10 +433,10 @@ export default {
this.curId = 0;
this.modal = false;
},
addStep(detailId, detailName,detailMaxNumStep) {
addStep(detailId, detailName, detailMaxNumStep) {
this.curId = detailId;
this.curName = detailName;
this.maxNum=detailMaxNumStep;
this.maxNum = detailMaxNumStep;
this.title = "新增工步";
this.detail = () => import("./routingStep/add");
this.modal = true;
......
......@@ -4,7 +4,7 @@
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字更改单编号" v-model="easySearch.keys.value" />
<Input placeholder="请输入关键字更改单编号" v-model="easySearch.keys.value" v-width="260"/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......
......@@ -70,6 +70,11 @@
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType" type="checkbox"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
......@@ -80,24 +85,15 @@
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
<Dictionary code="QC.fillintype" v-model="entity.fillintype" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -111,8 +107,13 @@
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<inputFile v-model="tempFile" :parms="parms" />
<FormItem :label="l('qualityTemplate')" prop="qualityTemplate">
<InputFile v-model="entity.qualityTemplate" :parms="parms" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="QC.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<!--
......@@ -154,11 +155,7 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -188,13 +185,13 @@ export default {
routingDetailId: null,
routingStepId: 0,
checkContent: "",
checkType: null,
checkType: [1],
checkParams: "",
measurementUnit: "",
fillintype: null,
fillintype: 2,
qualityTemplate: "",
isphotograph: null,
status: null,
isphotograph: 0,
status: 1,
extend: "",
remark: "",
productionRequirement: "",
......@@ -210,12 +207,21 @@ export default {
tempFile: "",
rules: {
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
{ required: true, message: "请选择工序", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
checkContent: [{ required: true, message: "必填", trigger: "blur" }],
checkType: [
{
required: true,
message: "检测类型至少选择一项",
type: "array",
min: 1,
trigger: "change"
}
]
},
routingDetailList: [],
parms: "app=qccard&eid=" + this.$u.guid() + "&name=''"
parms: "app=qccard&eid=" + this.$u.guid() + "&name=qualityTemplateName"
// parms: {
// app: "qccard",
// eid: null,
......@@ -231,8 +237,6 @@ export default {
},
mounted() {
this.loadDetails();
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
methods: {
handleSubmit() {
......@@ -247,23 +251,7 @@ export default {
this.entity.qualityTemplateName = "";
this.entity.qualityTemplate = "";
}
// if (this.$refs.refFile.nameList.length > 0) {
// let nameList = this.$refs.refFile.nameList;
// let names = [];
// let url = [];
// nameList.forEach(e => {
// names.push(e.fileName);
// url.push(e.filePath);
// });
// this.entity.qualityTemplateName = JSON.stringify(names)
// .replace("[", "")
// .replace("]", "")
// .replace(/\"/g, ""); //附件本地库暂存文件名称
// this.entity.qualityTemplate = JSON.stringify(url)
// .replace("[", "")
// .replace("]", "")
// .replace(/\"/g, "");
// }
this.entity.routingHeaderId = this.headid;
Api.create(this.entity)
......@@ -272,8 +260,6 @@ export default {
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
//let newId = r.result
//this.updateEid(newId) //更新服务器上的id
} else {
this.$Message.error("保存失败");
}
......@@ -306,41 +292,12 @@ export default {
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempObj.label = data.taskSeq + " " + data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
//新增时将uid转为eid
updateEid(newId) {
let parms = {
eid: this.parms.eid,
id: newId + ""
};
this.$http.sysUser.updateEid(parms).then(res => {
if (res.status) {
// this.$Message.success('修改成功!')
} else {
//this.$Message.error('修改失败!')
}
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
clearCheck() {
this.raidoDis = false;
this.entity.isphotograph = null;
},
l(key) {
key = "routing_qc_card" + "." + key;
return this.$t(key);
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<!--
<Col :span="12">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<Input v-model="entity.isDeleted"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('extend')" prop="extend">
<Input v-model="entity.extend"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingStepId')" prop="routingStepId">
<InputNumber v-model="entity.routingStepId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingHeaderName')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('qualityTemplate')" prop="qualityTemplate">
<Input v-model="entity.qualityTemplate" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
<Col :span="12">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
......@@ -12,6 +70,11 @@
</Select>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType" type="checkbox"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
......@@ -22,24 +85,15 @@
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
<Dictionary code="QC.fillintype" v-model="entity.fillintype" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
......@@ -53,18 +107,64 @@
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<inputFile ref="inputfile" v-model="tempFile" :parms="parms" />
<!--
<files ref="refFile" :parms="parms" files singleFile />
<a
:href="fileUrlPath"
@click="downFile(entity.qualityTemplate)"
target="_blank"
>{{entity.qualityTemplateName}}</a>
-->
<FormItem :label="l('qualityTemplate')" prop="qualityTemplate">
<InputFile v-model="entity.qualityTemplate" :parms="parms" />
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="QC.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<!--
<files ref="refFile" :parms="parms" files singleFile />
<Col :span="12">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('firstCheck')" prop="firstCheck">
<Dictionary code="Process.state" v-model="entity.firstCheck" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspection')" prop="inspection">
<Dictionary code="Process.state" v-model="entity.inspection" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspectionTime')" prop="inspectionTime">
<InputNumber v-model="entity.inspectionTime"></InputNumber>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('sampling')" prop="sampling">
<Dictionary code="Process.state" v-model="entity.sampling" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('samplingBatch')" prop="samplingBatch">
<Input v-model="entity.samplingBatch"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('measurementUnit')" prop="measurementUnit">
<Input v-model="entity.measurementUnit"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -86,16 +186,22 @@ export default {
tempFile: "",
tempFileName: "",
tempFilePath: "",
entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
entity: {},
rules: {
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
{ required: true, message: "请选择工序", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
checkContent: [{ required: true, message: "必填", trigger: "blur" }],
checkType: [
{
required: true,
message: "检测类型至少选择一项",
type: "array",
min: 1,
trigger: "change"
}
]
},
routingDetailList: [],
parms: "app=qccard&eid=" + this.$u.guid() + "&name=''"
......@@ -120,16 +226,8 @@ export default {
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$refs.inputfile.newName = this.entity.qualityTemplateName;
this.$refs.inputfile.newPath = this.entity.qualityTemplate;
if (r.result.checkType == 1 || r.result.checkType == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
}
});
},
downFile(path) {
......@@ -139,11 +237,6 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if (this.tempFile != "") {
let tempName = JSON.parse(this.$u.clone(this.tempFile));
this.entity.qualityTemplateName = tempName[0].fileName;
this.entity.qualityTemplate = tempName[0].filePath;
}
Api.update(this.entity)
.then(r => {
this.disabled = false;
......@@ -176,23 +269,12 @@ export default {
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempObj.label = data.taskSeq + " " + data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
l(key) {
key = "routing_qc_card" + "." + key;
return this.$t(key);
......
......@@ -7,6 +7,7 @@
<Input
placeholder="请输入检测要求/标准指标"
v-model="easySearch.keys.value"
v-width="260"
/>
</FormItem>
<FormItem>
......
......@@ -7,6 +7,7 @@
<Input
placeholder="请输入关键字物料名称"
v-model="easySearch.keys.value"
v-width="260"
/>
</FormItem>
<FormItem>
......
......@@ -28,6 +28,14 @@
<div>
<i-switch v-model="sitch"/>
</div>
<div style="text-align:center">
<User value="46"/>
<User value="43"/>
<User value="44"/>
<User value="115"/>
<User value="37"/>
</div>
<User value="46"/>
</div>
</template>
<script>
......
......@@ -32,7 +32,7 @@ import clipboard from 'clipboard';
import radioButton from '@/components/page/radioButton.vue'
import InputIcon from '@/components/page/inputIcon.vue'
import checkBoxButton from '@/components/page/checkBoxButton.vue'
import inputFile from '@/components/page/inputFile.vue'
import InputFile from '@/components/page/inputFile.vue'
import imgUploadFile from '@/components/page/imgUploadFile.vue'
import files from '@/components/page/files.vue'
import FilesList from '@/components/page/filesList.vue'
......@@ -46,6 +46,7 @@ import ProductSelect from '@/components/page/productSelect.vue'
import DTSpan from '@/components/page/dtSpan.vue'
import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue'
import OutputTime from '@/components/page/outputTime.vue'
// import FormMaking from 'form-making'
// import 'form-making/dist/FormMaking.css'
......@@ -74,7 +75,7 @@ Vue.component("State", State)
Vue.component("Dictionary", Dictionary)
Vue.component("radioButton", radioButton)
Vue.component("checkBoxButton", checkBoxButton)
Vue.component("inputFile", inputFile)
Vue.component("InputFile", InputFile)
Vue.component("imgUploadFile", imgUploadFile)
Vue.component("InputIcon", InputIcon)
Vue.component("files", files)
......@@ -98,6 +99,7 @@ Vue.component("ProductSelect", ProductSelect)
Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime)
Vue.component("OutputTime", OutputTime)
//注入mock
// require("../mock")
......
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