Commit 55c5dad0 authored by 周远喜's avatar 周远喜

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

parents 5ce7025c fe1902fd
......@@ -158,4 +158,5 @@ export default {
};
</script>
<style lang="less">
</style>
\ No newline at end of file
......@@ -7665,7 +7665,8 @@
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
"bundled": true,
"optional": true
},
"aproba": {
"version": "1.2.0",
......@@ -7683,11 +7684,13 @@
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"bundled": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -7700,15 +7703,18 @@
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
......@@ -7811,7 +7817,8 @@
},
"inherits": {
"version": "2.0.4",
"bundled": true
"bundled": true,
"optional": true
},
"ini": {
"version": "1.3.5",
......@@ -7821,6 +7828,7 @@
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
......@@ -7833,17 +7841,20 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
},
"minimist": {
"version": "1.2.5",
"bundled": true
"bundled": true,
"optional": true
},
"minipass": {
"version": "2.9.0",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
......@@ -7860,6 +7871,7 @@
"mkdirp": {
"version": "0.5.3",
"bundled": true,
"optional": true,
"requires": {
"minimist": "^1.2.5"
}
......@@ -7915,7 +7927,8 @@
},
"npm-normalize-package-bin": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"npm-packlist": {
"version": "1.4.8",
......@@ -7940,7 +7953,8 @@
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
......@@ -7950,6 +7964,7 @@
"once": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"wrappy": "1"
}
......@@ -8018,7 +8033,8 @@
},
"safe-buffer": {
"version": "5.1.2",
"bundled": true
"bundled": true,
"optional": true
},
"safer-buffer": {
"version": "2.1.2",
......@@ -8048,6 +8064,7 @@
"string-width": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
......@@ -8065,6 +8082,7 @@
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"optional": true,
"requires": {
"ansi-regex": "^2.0.0"
}
......@@ -8103,11 +8121,13 @@
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"optional": true
},
"yallist": {
"version": "3.1.1",
"bundled": true
"bundled": true,
"optional": true
}
}
},
......@@ -9538,7 +9558,8 @@
"dependencies": {
"deepmerge": {
"version": "2.2.1",
"bundled": true
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
}
}
},
......@@ -19895,7 +19916,8 @@
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true
"dev": true,
"optional": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
......
......@@ -21,7 +21,7 @@
import GanttElastic from "gantt-elastic";
import GanttHeader from "./components/gantt-header";
import dayjs from "dayjs";
import Api from "./api";
// just helper to get current dates
function getDate(hours) {
const currentDate = new Date();
......@@ -273,17 +273,18 @@ let options = {
value: "label",
width: 200,
expander: true,
html: true,
events: {
click({ data, column }) {
alert("description clicked!\n" + data.label);
}
}
html: true
// events: {
// click({ data, column }) {
// alert("description clicked!\n" + data.label);
// }
// }
},
{
id: 3,
label: "责任人",
label: "设备编号",
value: "user",
width: 130,
html: true
},
......@@ -295,12 +296,25 @@ let options = {
},
{
id: 5,
label: "类型",
value: "type",
width: 68
label: "结束时间",
value: task => dayjs(task.endTime).format("YYYY-MM-DD"),
width: 78
},
{
id: 6,
label: "投入数量",
value: "put_into_qty",
width: 68
},
{
id: 7,
label: "派工数量",
value: "dispatch_qty",
width: 68
},
{
id: 8,
label: "%",
value: "progress",
width: 35,
......@@ -349,15 +363,60 @@ export default {
GanttElastic,
GanttHeader
},
props: {
id: String
},
data() {
return {
tasks,
tasks:[],
options,
dynamicStyle: {},
lastId: 16
};
},
mounted() {
this.gantData();
},
methods: {
gantData() {
if (this.id) {
Api.paged({ scheduleId: this.id })
.then(r => {
if (r.result) {
Api.getdetail({
part_task_pk: r.result[0].id,
scheduleId: this.id
}).then(r => {
if (r.result) {
var list = [];
for (var i = 0; i < r.result.length; i++) {
let temp = {
id: r.result[i].op_task_pk,
label: r.result[i].task_name,
user: r.result[i].equip_id,
// start: r.result[i].plan_start,
// endTime: r.result[i].plan_finish,
endTime: "2020-7-30",
start: getDate(1),
duration: (15*i) * 24 * 60 * 60 * 1000,
percent: 85,
put_into_qty: r.result[i].put_into_qty,
dispatch_qty: r.result[i].dispatch_qty
};
list.push(temp);
}
this.tasksUpdate(list);
}
});
}
})
.catch(error => {
this.$Message.error("请求失败");
});
}
},
addTask() {
this.tasks.push({
id: this.lastId++,
......@@ -372,9 +431,11 @@ export default {
});
},
tasksUpdate(tasks) {
// console.log(tasks);
this.tasks = tasks;
},
optionsUpdate(options) {
// console.log(options);
this.options = options;
},
styleUpdate(style) {
......
......@@ -50,22 +50,23 @@
<Button type="default" @click="cancel">取消</Button>
</div>
<Modal v-model="modal1Gant" fullscreen title="甘特图" footer-hide>
<Gantt />
<!-- <Gantt :id="id" /> -->
<gantt :is="gantt" :id="id" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Gantt from "./gantt";
// import Gantt from "./gantt";
export default {
components: {
Gantt
},
// components: {
// Gantt
// },
data() {
return {
curId: null,
detail: null,
isactive: 0,
isactive: null,
list: [],
name: "name1",
id: null,
......@@ -75,7 +76,8 @@ export default {
showFooter: false,
total: 0,
blacks: false,
gant: false
gant: false,
gantt:null,
};
},
async fetch({ store, params }) {
......@@ -152,10 +154,11 @@ export default {
//甘特图
gantChart() {
this.modal1Gant = true;
this.gantt = () => import("./gantt");
},
changeCheck(item) {
this.isactive = null;
this.blacks = true;
(this.id = null), (this.blacks = true);
if (item.checked == true) {
this.contrastList.push(item.schedule_Id);
} else if (item.checked == false) {
......
......@@ -4,8 +4,13 @@
<p slot="title">个人头像</p>
<div style="height:415px;">
<p style="text-align:center;padding-top:100px;">
<Avatar :src="avatorPath" size="150" v-if="avatorPath" />
<Avatar size="150" style="background-color: #87d068" v-else-if="!avatorPath" icon="ios-person" />
<Avatar :src="avatorPath" size="150" v-if="avatorPath" />
<Avatar
size="150"
style="background-color: #87d068"
v-else-if="!avatorPath"
icon="ios-person"
/>
</p>
<p style="text-align:center;padding:10px;">
<Button @click="openModalAvatar">修改头像</Button>
......@@ -80,15 +85,20 @@
</Card>
<Modal v-model="modalAvatar" title="修改头像" :width="460">
<Form :model="imageModel">
<div class="imgBg">
<img :src="avatorPath" />
</div>
<inputFiles v-model="imgName" :parms="parms" />
<Row>
<div class="imgBg">
<img :src="avatorPath" />
</div>
<inputFiles v-model="imgName" :parms="parms" :showButton="false" />
</Row>
</Form>
<Row>
</Row>
<div slot="footer">
<Button @click="cancelAvatar">取消</Button>
<Button type="primary" @click="upAvatar">确定</Button>
</div>
<Button @click="cancelAvatar">取消</Button>
<Button type="primary" @click="upAvatar">确定</Button>
</div>
</Modal>
</div>
</template>
......@@ -132,7 +142,7 @@ export default {
remark: "",
avatarUrl: ""
},
userInfos:{},
userInfos: {},
imageModel: {
id: null,
avatar_Url: "",
......@@ -208,7 +218,7 @@ export default {
this.$http.sysUser.getuserinfo(parma).then(res => {
if (res.result) {
this.userInfo = res.result;
this.userInfos=res.result;
this.userInfos = res.result;
this.imageModel.id = this.userInfo.id;
if (
res.result.avatarUrl &&
......@@ -268,9 +278,9 @@ export default {
};
</script>
<style lang="less" >
.img_top01{
width:350px;
float:left;
.img_top01 {
width: 350px;
float: left;
.ivu-card-body {
padding: 0px;
}
......
......@@ -20,6 +20,22 @@ export default {
info(params) {//工单信息
return Api.post(`${PlanUrl}/dispatch/orderdispatchsummary`, params);
},
mesordersplitcard(params) {//分卡操作
return Api.post(`${PlanUrl}/mesorders/mesordersplitcard`, params);
},
createorupdate(params) {//暂停工单
return Api.post(`${PlanUrl}/orderexecutepausecause/createorupdate`, params);
},
entrycontinue(params) {//继续开始工单
return Api.post(`${PlanUrl}/orderexecute/entrycontinue`, params);
},
getentryproductcode(params){//更加工单id获取产品号
return Api.get(`${PlanUrl}/orderexecutequalityrecord/getentryproductcode`, params);
},
pauseCauseGetpaged(params){//获取工单暂停记录
return Api.get(`${PlanUrl}/orderexecutepausecause/getpaged`, params);
},
// getplantdepartments(params) {// 组织为”车间“的部门
// return Api.get(`${systemUrl}/department/getplantdepartments`, params);
// },
......
<template>
<div class="new_box">
<Form ref="cardModeldata" :model="cardModeldata" :rules="ruleValidate" :label-width="120">
<Row>
<Col span="22">
<FormItem label="暂停原因">
<Dictionary
code="plan.dispatch.pauseCause"
v-model="cardModeldata.pausecause_id"
type="select"
style="width:100%"
></Dictionary>
</FormItem>
</Col>
</Row>
<Row>
<Col span="22">
<FormItem label="详细描述" prop="desc">
<Input
type="textarea"
:rows="6"
style="width:100%;"
size="large"
v-model="cardModeldata.desc"
placeholder="请输入..."
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="24">
<FormItem>
<Button type="primary" @click="handleSubmit">保存</Button>
</FormItem>
</Col>
</Row>
</Form>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "entryPause",
props: {
info: Object
},
data() {
return {
newModel: false,
cardModeldata: {
id: 0,
dispatch_id: 0,
execute_id: 0,
order_id: "",
pausecause_type: 1,
pausecause_id: 0,
title: "",
desc: "",
userids: "",
status: 0,
layersnum: 0,
height: 0
},
ruleValidate: {
// pausecause_id: [{ required: true, message: '原因不能为空', trigger: 'blur' }],
desc: [{ required: true, message: "详细描述不能为空", trigger: "blur" }]
}
};
},
created() {},
methods: {
handleSubmit() {
this.$refs["cardModeldata"].validate(valid => {
if (valid) {
var url = `${PlanUrl}/orderexecutepausecause/createorupdate`;
let parms = {
orderExecutePausecause: {
dispatch_id: this.info.dispatch_id,
execute_id: this.info.execute_id,
order_id: this.info.order_id,
pausecause_type: 1,
pausecause_id: this.cardModeldata.pausecause_id,
desc: this.cardModeldata.desc,
title: "",
userids: "",
status: 0,
layersnum: 0,
height: 0
}
};
Api.createorupdate(parms)
.then(response => {
if (response.success) {
this.$Message.success("保存成功");
this.cleardata();
this.$emit("on-ok")
}
})
.catch(error => {
console.log(error);
this.$Message.error("保存失败");
});
}
});
},
cancel() {
this.cleardata();
},
cleardata() {
this.cardModeldata.title = "";
this.cardModeldata.desc = "";
this.cardModeldata.userids = "";
this.cardModeldata.layersnum = 0;
this.cardModeldata.height = 0;
}
},
watch: {
info(v) {
if (v && JSON.stringify(v) != "{}") {
}
}
}
};
</script>
......@@ -28,7 +28,7 @@
<Record :eid="recordId" />
</Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM">
<Speed :result="result" :load="loading" />
<Speed :result="result" :load="loading" :executeId="dispatchExecuteId" :orderId="orderId" />
</Modal>
</div>
</template>
......@@ -50,6 +50,8 @@ export default {
data() {
return {
result: [],
dispatchExecuteId:null,//任务id
orderId:null,//订单id
SpeedModal: false,
rowSuspend: {},
recordId: 0,
......@@ -360,7 +362,7 @@ export default {
render: (h, params) => {
return h("div", { class: "action" }, [
h(
params.row.status == 5 ? "Button" : "", //订单状态暂停,启动
params.row.status == 5&&params.row.upSplitId==0 ? "Button" : "", //订单状态暂停,启动
{
props: {
type: "error",
......@@ -383,7 +385,7 @@ export default {
""
),
h(
params.row.status == 6 ? "Button" : "", //订单状态执行中,暂停
params.row.status == 6&&params.row.upSplitId==0 ? "Button" : "", //订单状态执行中,暂停
{
props: {
type: "success",
......@@ -436,6 +438,8 @@ export default {
this.result = [];
this.loading = true;
this.SpeedModal = true;
this.dispatchExecuteId=row.dispatchExecuteId
this.orderId=row.id
Api.info({
routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId
......
......@@ -5,7 +5,13 @@
<DataGrid :columns="columns" ref="grid" :action="action" :tool="false" :height="tdHeight"></DataGrid>
</TabPane>
<TabPane label="工单暂停记录" name="name2">
<DataGrid :columns="columnsProcess" ref="gridProcess" :tool="false" :height="tdHeight"></DataGrid>
<DataGrid
:columns="columnsProcess"
ref="gridProcess"
:data="list"
:tool="false"
:height="tdHeight"
></DataGrid>
</TabPane>
</Tabs>
<Modal v-model="detailModal" title="详情" width="800">
......@@ -122,67 +128,53 @@ export default {
],
columnsProcess: [
{
key: "productName",
key: "dispatch_id",
title: "工序Id",
align: "left",
width: 90
},
{
key: "productName",
key: "dispatch_id",
title: "工序号",
align: "left",
width: 90
},
{
key: "productName",
key: "dispatch_id",
title: "工序名称",
align: "left",
width: 350,
width: 350
},
{
key: "remark",
key: "desc",
title: "暂停原因",
align: "left"
},
{
key: "productName",
key: "creatorUserId",
title: "暂停人",
align: "left",
high: true,
width: 180
width: 180,
type: "user"
},
{
key: "productName",
key: "creationTime",
title: "暂停时间",
align: "left",
width: 180
},
{
key: "productName",
title: "恢复人",
align: "left",
width: 180
},
{
key: "productName",
title: "恢复时间",
align: "left",
width: 180
},
{
key: "productName",
title: "相关人",
align: "left",
width: "180"
}
]
],
list: []
};
},
props: {
eid: Number
},
mounted() {
this.$refs.grid.reload(this.easySearch);
this.loadList()
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
......@@ -198,6 +190,29 @@ 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"
};
Api.pauseCauseGetpaged(params)
.then(res => {
if (res.success) {
this.list = res.result.items;
} else {
this.$Message.error("获取数据失败");
}
})
.catch(err => {
this.$Message.error("连接失败");
});
},
search() {
this.$refs.grid.reload(this.easySearch);
},
......
......@@ -6,6 +6,9 @@
<div v-show="!load">
<DataGrid :columns="columns" :data="result" border :tool="false" :height="820" :page="false"></DataGrid>
</div>
<Modal v-model="workOrderPauseModal" title="工单暂停原因" width="800" footer-hide class="suspend">
<EntryPause @on-ok="pauseOk" ref="addBug" :info="info" />
</Modal>
<Modal v-model="modalSplit" title="订单分卡" width="650" footer-hide>
<div slot="close">
<Icon type="ios-close" size="31" color="gray" @click="handleClose" />
......@@ -17,9 +20,9 @@
<Select v-model="entity.num" multiple>
<Option
v-for="(item,index) in numList"
:value="item.value"
:value="item.productcodes"
:key="index"
>{{ item.label }}</Option>
>{{ item.productcodes}}</Option>
</Select>
</FormItem>
</Col>
......@@ -72,19 +75,28 @@
</template>
<script>
import Api from "./api";
import EntryPause from "./entryPause";
export default {
name: "",
components: {
EntryPause
},
data() {
return {
modalSplit: false,
workOrderPauseModal: false,
index: null,
entity: {
num: [], //序列号组合
reason: null, //分卡原因
remark: "", //备注信息
action: null, //操作
scheduleType: null //排产类型
count: 0,
code: "",
routingDetailId: 0,
orderId: 0,
dispatchId: 0
},
info: {},
initeId: {
routingDetailId: null,
dispatchId: null
},
columns: [
{
......@@ -197,12 +209,12 @@ export default {
"op",
{
props: {
oprate: "delete",
title: "暂停",
msg: "确定暂停工序:" + params.row.detailName + "?"
oprate: "edit",
title: "暂停"
//msg: "确定暂停工序:" + params.row.detailName + "?"
},
style: params.row.status == 14 ? "" : "display:none",
on: { click: () => this.pause(params.row) }
on: { click: () => this.pause(params.row, params.index) }
},
"暂停"
),
......@@ -211,7 +223,7 @@ export default {
{
props: { oprate: "edit", title: "分卡" },
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.split(params.row) }
on: { click: () => this.split(params.row, params.index) }
},
"分卡"
),
......@@ -223,8 +235,8 @@ export default {
title: "继续",
msg: "确定继续执行工序:" + params.row.detailName + "?"
},
style: params.row.status == 5? "" : "display:none",
on: { click: () => this.continue(params.row) }
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.continue(params.row, params.index) }
},
"继续"
)
......@@ -233,40 +245,7 @@ export default {
}
],
listTask: [],
numList: [
{
value: 1,
label: "SKJC-001"
},
{
value: 2,
label: "SKJC-002"
},
{
value: 3,
label: "SKJC-003"
},
{
value: 4,
label: "SKJC-004"
},
{
value: 5,
label: "SKJC-005"
},
{
value: 6,
label: "SKJC-006"
},
{
value: 7,
label: "SKJC-007"
},
{
value: 8,
label: "SKJC-008"
}
],
numList: [],
reasonList: [
{
value: 1,
......@@ -319,16 +298,23 @@ export default {
},
props: {
result: Array,
load: Boolean
load: Boolean,
executeId: Number,
orderId: Number
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {},
methods: {
split(row) {
split(row, index) {
//工单分卡
this.modalSplit = true;
this.getProduct(row.id);
(this.initeId = {
routingDetailId: row.detailId,
dispatchId: row.id
}),
(this.modalSplit = true);
},
onchangeAction(val) {
//选择移入排产时显示排产模型下拉框
......@@ -336,18 +322,44 @@ export default {
this.entity.scheduleType = null;
}
},
getProduct(id) {
let params = {
entryID: id
};
Api.getentryproductcode(params).then(res => {
if (res.success) {
this.numList = [];
this.numList = res.result;
}
});
},
splitOk() {
//确定分卡
this.$refs.form.validate(valid => {
if (valid) {
let params = {
num: this.entity.num,
reason: this.entity.reason,
remark: this.entity.remark,
action: this.entity.action,
scheduleType: this.entity.scheduleType
count: this.entity.num.length,
code: JSON.stringify(this.entity.num)
.replace("[", "")
.replace("]", "")
.replace(/\"/g, ""),
routingDetailId: this.initeId.routingDetailId,
orderId: this.orderId,
dispatchId: this.initeId.dispatchId
//reason: this.entity.reason,
//remark: this.entity.remark
};
alert(JSON.stringify(params));
Api.mesordersplitcard(params)
.then(res => {
if (res.success) {
this.$Message.success("分卡成功");
} else {
this.$Message.error("分卡失败");
}
})
.catch(err => {
this.$Message.error("连接失败");
});
this.handleClose();
} else {
this.modalSplit = true;
......@@ -369,13 +381,40 @@ export default {
scheduleType: null
};
},
pause(row) {
pause(row, index) {
this.index = index;
//暂停工单
alert(JSON.stringify(row));
this.info = {
dispatch_id: row.id,
execute_id: this.executeId,
order_id: this.orderId
};
this.workOrderPauseModal = true;
},
pauseOk() {
this.workOrderPauseModal = false;
this.result[this.index].status = 5;
},
continue(row) {
continue(row, index) {
this.index = index;
//继续工单
alert(JSON.stringify(row));
let params = {
id: row.id,
orderid: this.orderId,
time: null
};
Api.entrycontinue(params)
.then(response => {
if (response.success) {
this.$Message.success("操作成功");
this.result[this.index].status = 14;
} else {
this.$Message.error("操作失败");
}
})
.catch(error => {
this.$Message.error("连接失败");
});
},
//截取字符串
sliceStr(str, lenS, lenE) {
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="addd">
<ul>
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="order_list">
<!-- <div slot="header">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
......@@ -172,12 +172,103 @@
}
}
.gs_set{
height: 100vh;
height: calc(100vh - 165px);
.gs_top{
margin: 0 auto;
margin: 15px auto;
width: 1000px;
height: 120px;
background: #2680EB;
color: #fff;
border-radius:4px;
padding: 20px 0 0;
.line_slit{
height: 5em;
float: left;
margin: 5px 0 0;
}
.gs_top_box{
float: left;
width: calc(50% - 1px);
text-align: center;
i{
font-size: 71px;
}
.gs_bo01{
display: inline-block;
height: 62px;
text-align: left;
padding: 0 0 0 10px;
}
span{
display: block;
}
.shi{
}
.number{
font-size: 32px;
}
}
}
.gs_card_box{
padding: 15px 50px;
.gs_card{
float: left;
margin: 20px 72px;
width: 300px;
height: 240px;
.ivu-card-head{
background: #d3e6fb;
border-radius: 4px 4px 0px 0px;
border-bottom: 1px dashed #2680EB;
.gs_title{
color: #2680EB;
}
}
.gs_p{
height: 32px;
line-height: 32px;
}
.gs_time{
text-align: center;
color: #2680EB;
.b_size{
font-size: 32px;
}
}
.gs_footer{
background: #d3e6fb;
margin: 0 -16px;
height: 59px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: 1px solid #2680eb;
a{
display: inline-block;
height: 59px;
line-height: 60px;
text-align: center;
width: calc(50% - 2px);
}
.gs_del{
background: #2680EB;
color: #fff;
border-bottom-right-radius: 4px;
}
}
}
.gs_card:hover {
border-color: #2680EB;
}
.gs_add{
border: 1px dashed #2680EB;
color: #2680EB;
text-align: center;
line-height: 275px;
border-radius: 4px;
i{
font-size: 80px;
}
}
}
}
\ No newline at end of file
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<Col span="12">
<FormItem label="所属车间">
<Input v-model="entity.projectNo" disabled></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="所属班组">
<Input v-model="entity.productName" disabled></Input>
</FormItem>
</Col>
<Col span="12">
<FormItem label="数字">
<InputNumber v-model="entity.outSideTime" style="width:150px;" :min="0"></InputNumber>
</FormItem>
</Col>
</Row>
</Form>
<Row>
<Col span="24" style="text-align:right;height:60px;line-height:60px">
<Button @click="handleClose" class="mr20">取消</Button>
<Button type="primary" @click="handleSubmit">确定</Button>
</Col>
</Row>
</div>
</template>
<script>
export default {
data(){
return{
admor:1,
entity: {
},
rules: {
outSideTime: [
{ required: true, message: "必填", type: "number", trigger: "change" }
]
}
}
},
methods: {
handleSubmit(){
this.$emit("on-ok", this.entity);
},
handleClose(){
this.$emit("on-close");
},
},
}
</script>
\ No newline at end of file
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="gs_set">
<div class="gs_top">
<div class="total_time">
<Icon type="md-pie" />
<div class="gs_top_box total_time">
<!-- <Icon type="md-pie" /> -->
<Icon type="ios-time" />
<div class="gs_bo01">
<span class="shi">总工时</span>
<span class="number">250</span>
</div>
</div>
<Divider type="vertical" />
<div class="allocated">
<Divider type="vertical" class="line_slit"/>
<div class="gs_top_box allocated">
<Icon type="md-pie" />
<div class="gs_bo01">
<span class="shi">待分配</span>
<span class="number">200</span>
</div>
</div>
</div>
<div class="gs_card_box"></div>
<div class="gs_card_box">
<Card class="gs_card" v-for="i of 5" :key="i">
<p slot="title" class="gs_title">
张三
<span class="fr">02816335{{i}}</span>
</p>
<p class="gs_p">所属车间:车间A{{i}}</p>
<p class="gs_p">所属班组:班组B{{i}}</p>
<p class="gs_time">
<span class="b_size">100</span> 工时
</p>
<p class="gs_footer">
<a class="gs_edit" @click="editItem">
<Icon type="md-create" />
编辑</a>
<a class="gs_del" @click="delItem">
<Icon type="ios-trash-outline" />
删除</a>
</p>
</Card>
<a class="gs_card gs_add" @click="addItem">
<Icon type="ios-add" />
</a>
</div>
<!-- 新增弹框 -->
<Modal
v-model="addmodal" width='1100' :mask-closable="false"
title="添加人员" footer-hide >
<addview ref="addview" @on-close="cancel" @on-ok="addInfo"></addview>
</Modal>
</div>
</template>
<script>
import addview from "./add";
export default {
name:'starOrder',
components: {addview,},
data(){
return{
starmodal: false,
msg:'确认要删除吗?',
title:'删除确认',
addmodal: false,
}
},
created() {
......@@ -38,9 +79,27 @@ export default {
};
},
methods: {
starFun(){
this.$Message.success("开工...")
addItem(){
this.addmodal = true
},
editItem(){
this.$Message.success("编辑工时...")
},
delItem(){
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
this.$Message.success("删除工时...")
}
});
},
cancel(){
this.addmodal = false
},
addInfo(){
this.addmodal = false
}
},
}
</script>
<style lang="less">
@import "../execute.less";
</style>
<template>
<div class="">
<div class="star" v-if="!starmodal">
......
......@@ -117,6 +117,7 @@
</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>
......@@ -207,6 +208,7 @@ export default {
sampling: null,
samplingBatch: ""
},
tempFile: "",
rules: {
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
......@@ -214,12 +216,13 @@ export default {
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
app: "qccard",
eid: null,
name: "",
field: ""
}
parms: "app=qccard&eid=" + this.$u.guid() + "&name=''"
// parms: {
// app: "qccard",
// eid: null,
// name: "",
// field: ""
// }
};
},
props: {
......@@ -237,26 +240,31 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
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, "");
if (this.tempFile != "") {
let tempName = JSON.parse(this.$u.clone(this.tempFile));
this.entity.qualityTemplateName = tempName[0].fileName;
this.entity.qualityTemplate = tempName[0].filePath;
} else {
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)
......
......@@ -54,8 +54,9 @@
</Col>
<Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<files ref="refFile" :parms="parms" files singleFile />
<inputFile ref="inputfile" v-model="tempFile" :parms="parms" />
<!--
<files ref="refFile" :parms="parms" files singleFile />
<a
:href="fileUrlPath"
@click="downFile(entity.qualityTemplate)"
......@@ -82,10 +83,14 @@ export default {
raidoDis: false,
downUrl: fileUrlDown,
fileUrlPath: "",
tempFile: "",
tempFileName: "",
tempFilePath: "",
entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
rules: {
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
......@@ -93,12 +98,13 @@ export default {
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
app: "qccard",
eid: this.eid,
name: "",
field: ""
}
parms: "app=qccard&eid=" + this.$u.guid() + "&name=''"
// parms: {
// app: "qccard",
// eid: this.eid,
// name: "",
// field: ""
// }
};
},
props: {
......@@ -115,10 +121,9 @@ export default {
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = v;
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;
......@@ -134,26 +139,11 @@ export default {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
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, "");
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;
......@@ -213,7 +203,7 @@ export default {
if (v != 0) {
this.load(v);
}
}
},
}
};
</script>
......@@ -11,7 +11,7 @@
<Input v-model="entity.unicode"></Input>
</FormItem>
</Col>-->
<Col :span="8">
<Col :span="8">
<FormItem :label="l('code')" prop="code">
<Input v-model="entity.code" disabled></Input>
</FormItem>
......@@ -21,7 +21,7 @@
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
......@@ -52,7 +52,7 @@
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
......@@ -184,6 +184,9 @@ export default {
this.$refs.refFile.intFilesClone();
this.parms.eid = this.uid;
this.entity = r.result;
if (this.entity.isEffect && this.entity.isEffect != "") {
this.entity.isEffect = Number(this.entity.isEffect);
}
});
},
handleSubmit() {
......
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