Commit b642e412 authored by renjintao's avatar renjintao

分卡原因

parent 05765173
<template>
<div class="record">
<div class="record">
<div v-if="load" style="width:100px;margin:0 auto;padding-top:260px;">
<Spin size="large"></Spin>
</div>
......@@ -18,23 +18,13 @@
<Col span="24">
<FormItem label="选择序列号" prop="num">
<Select v-model="entity.num" multiple>
<Option
v-for="(item,index) in numList"
:value="item.productcodes"
:key="index"
>{{ item.productcodes}}</Option>
<Option v-for="(item,index) in numList" :value="item.productcodes" :key="index">{{ item.productcodes}}</Option>
</Select>
</FormItem>
</Col>
<Col span="24">
<FormItem label="选择分卡原因" prop="reason">
<Select v-model="entity.reason" style="width:260px">
<Option
v-for="(item,index) in reasonList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
<dictionary code="taskList.split.reson" v-model="entity.reason" style="width:240px"></dictionary>
</FormItem>
</Col>
<Col span="24">
......@@ -71,8 +61,9 @@
</Col>
</Row>
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import EntryPause from "./entryPause";
......@@ -98,8 +89,7 @@ export default {
routingDetailId: null,
dispatchId: null
},
columns: [
{
columns: [{
key: "detailId",
title: this.l("detailId"),
align: "center",
......@@ -162,9 +152,9 @@ export default {
return h(
"span",
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params.row.actualStartDate == "0001-01-01 00:00:00"
? ""
: params.row.actualStartDate
params.row.actualStartDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualStartDate
);
}
},
......@@ -177,9 +167,9 @@ export default {
return h(
"span",
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
params.row.actualFinishDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualFinishDate
);
}
},
......@@ -204,39 +194,47 @@ export default {
width: 120,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
"op", {
props: {
oprate: "edit",
title: "暂停"
//msg: "确定暂停工序:" + params.row.detailName + "?"
},
style: params.row.status == 14 ? "" : "display:none",
on: { click: () => this.pause(params.row, params.index) }
on: {
click: () => this.pause(params.row, params.index)
}
},
"暂停"
),
h(
"op",
{
props: { oprate: "edit", title: "分卡" },
"op", {
props: {
oprate: "edit",
title: "分卡"
},
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.split(params.row, params.index) }
on: {
click: () => this.split(params.row, params.index)
}
},
"分卡"
),
h(
"op",
{
"op", {
props: {
oprate: "delete",
title: "继续",
msg: "确定继续执行工序:" + params.row.detailName + "?"
},
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.continue(params.row, params.index) }
on: {
click: () => this.continue(params.row, params.index)
}
},
"继续"
)
......@@ -246,53 +244,31 @@ export default {
],
listTask: [],
numList: [],
reasonList: [
{
value: 1,
label: "分卡原因1"
},
{
value: 2,
label: "分卡原因2"
},
{
value: 3,
label: "分卡原因3"
}
],
rules: {
num: [
{
num: [{
required: true,
message: "请选择分卡原因",
trigger: "change",
type: "array"
}
],
reason: [
{
}],
reason: [{
required: true,
message: "请选择分卡原因",
trigger: "change",
type: "number"
}
],
action: [
{
}],
action: [{
required: true,
message: "请选择操作",
trigger: "change",
type: "number"
}
],
scheduleType: [
{
}],
scheduleType: [{
required: true,
message: "请选择排产类型",
trigger: "change",
type: "number"
}
]
}]
}
};
},
......@@ -302,7 +278,10 @@ export default {
executeId: Number,
orderId: Number
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
created() {},
......@@ -324,11 +303,11 @@ export default {
},
getProduct(row) {
let params = {
dispatch_id:row.id,
execute_id:row.executeId,
order_id:row.orderId,
RoutingHeaderId:row.routingHeaderId,
RoutingDetailId:row.detailId,
dispatch_id: row.id,
execute_id: row.executeId,
order_id: row.orderId,
RoutingHeaderId: row.routingHeaderId,
RoutingDetailId: row.detailId,
};
Api.getentryproductcode(params).then(res => {
if (res.success) {
......@@ -400,7 +379,7 @@ export default {
this.workOrderPauseModal = false;
this.result[this.index].status = 5;
},
continue(row, index) {
continue (row, index) {
this.index = index;
//继续工单
let params = {
......@@ -439,11 +418,13 @@ export default {
}
};
</script>
<style lang='less' scope>
<style lang="less">
.scheduleTypeSelect {
display: inline;
width: 180px;
margin-left: -110px;
.ivu-select {
width: 180px;
}
......
......@@ -8,16 +8,12 @@
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes.project_plan_record.Status" v-model="entity.status"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
<Col :span="24">
<FormItem :label="l('note')" prop="note">
<i-quill v-model="entity.note" :height="300" v-paste="handleImg" /></Input>
</FormItem>
</Col>
<Col :span="12">
......@@ -34,8 +30,12 @@
<script>
import Api from './api'
import iQuill from '@/components/quill'
export default {
name: 'Add',
components: {
iQuill
},
data() {
return {
disabled: false,
......@@ -107,6 +107,27 @@ export default {
this.entity.id = 0;
});
},
handleImg(e) {
console.warn(e)
let file = null
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile()
let reader = new FileReader()
reader.readAsDataURL(file)
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>'
this.entity.note += img
}, 1000)
// new R
}
},
l(key) {
key = "project_plan_record" + "." + key;
return this.$t(key)
......
......@@ -5,71 +5,19 @@
<FormItem :label="l('title')" prop="title"> <Input v-model="entity.title"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('level')" prop="level">
<Dictionary code="project.task.level" v-model="entity.level"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('projectTitle')" prop="projectTitle"> <Input v-model="entity.projectTitle"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('planTitle')" prop="planTitle"> <Input v-model="entity.planTitle"> </Input>
</FormItem>
</Col>
<Col :span="12" v-if="false">
<FormItem :label="l('planId')" prop="planId">
<Input v-model="entity.planId"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="false">
<FormItem :label="l('projectId')" prop="projectId">
<Input v-model="entity.projectId"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('userId')" prop="userId">
<UserSelect ref="userSelected" v-model="entity.userId" /></Input>
<UserSelect ref="userSelected" v-model="entity.userId" />
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('userIds')" prop="userIds"> <Input v-model="entity.userIds" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('startDate')" prop="startDate">
<DatePicker type="date" v-model="entity.startDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('endDate')" prop="endDate">
<DatePicker type="date" v-model="entity.endDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToStartDate')" prop="plansToStartDate">
<DatePicker type="date" v-model="entity.plansToStartDate"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('plansToEndTime')" prop="plansToEndTime">
<DatePicker type="date" v-model="entity.plansToEndTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('completePercentage')" prop="completePercentage">
<InputNumber v-model="entity.completePercentage"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upTaskId')" prop="upTaskId">
<InputNumber v-model="entity.upTaskId"></InputNumber>
<FormItem :label="l('note')" prop="note">
<i-quill v-model="entity.note" :height="300" v-paste="handleImg" />
</FormItem>
</Col>
</Row>
......@@ -82,8 +30,12 @@
<script>
import Api from './api'
import iQuill from '@/components/quill'
export default {
name: 'Add',
components: {
iQuill
},
data() {
return {
disabled: false,
......@@ -169,6 +121,27 @@ export default {
this.entity.id = 0;
});
},
handleImg(e) {
console.warn(e)
let file = null
if (
e.clipboardData &&
e.clipboardData.items[0] &&
e.clipboardData.items[0].type &&
e.clipboardData.items[0].type.indexOf('image') > -1
) {
//这里就是判断是否有粘贴进来的文件且文件为图片格式
file = e.clipboardData.items[0].getAsFile()
let reader = new FileReader()
reader.readAsDataURL(file)
setTimeout(() => {
var img = '<img src="' + reader.result + '" alt=""/>'
this.entity.note += img
}, 1000)
// new R
}
},
l(key) {
key = "project_task" + "." + key;
return this.$t(key)
......
......@@ -10,15 +10,12 @@
<Filed :span="6" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="6" :name="l('projectTitle')">{{entity.projectTitle}}</Filed>
<Filed :span="6" :name="l('planTitle')">{{entity.planTitle}}</Filed>
<Filed :span="6" :name="l('userIds')">{{entity.userIds}}</Filed>
<Filed :span="6" :name="l('userId')">{{entity.userId}}</Filed>
<Filed :span="6" :name="l('endDate')">{{entity.endDate}}</Filed>
<Filed :span="6" :name="l('note')">{{entity.note}}</Filed>
<Filed :span="6" :name="l('startDate')">{{entity.startDate}}</Filed>
<Filed :span="6" :name="l('plansToStartDate')">{{entity.plansToStartDate}}</Filed>
<Filed :span="6" :name="l('plansToEndTime')">{{entity.plansToEndTime}}</Filed>
<Filed :span="6" :name="l('completePercentage')">{{entity.completePercentage}}</Filed>
<Filed :span="6" :name="l('upTaskId')">{{entity.upTaskId}}</Filed>
<Filed :span="6" :name="l('endDate')">{{entity.endDate}}</Filed>
<Filed :span="12">&nbsp;</Filed>
<Filed :span="24" :name="l('note')">{{entity.note}}</Filed>
</Row>
<component :is="detail" :eid="curId" />
</div>
......
......@@ -85,6 +85,9 @@
</template>
<script>
import {
replace
} from 'lodash';
import Api from './api'
export default {
name: 'Edit',
......@@ -121,6 +124,7 @@ export default {
id: v
}).then(r => {
this.entity = r.result;
this.entity.userId = parseInt(r.result.userId)
})
},
handleSubmit() {
......
......@@ -188,26 +188,6 @@ export default {
high: true,
type: 'date'
},
{
key: "plansToStartDate",
title: this.l("plansToStartDate"),
align: "center",
high: true,
type: 'date'
},
{
key: "plansToEndTime",
title: this.l("plansToEndTime"),
align: "center",
high: true,
type: 'date'
},
{
key: "completePercentage",
title: this.l("completePercentage"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
......
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