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

订单监控,暂停记录bug

parent fb442d69
<template> <template>
<div class="monitoring h100"> <div class="monitoring h100">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch"> <DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline style="margin-top:5px;"> <Form
<FormItem prop="productingpreparationpeople" style="width:200px"> ref="formInline"
<departmentSelect v-model="easySearch.productingpreparationpeople.value" :type="3"></departmentSelect> :model="easySearch"
inline
style="margin-top: 5px"
>
<FormItem prop="productingpreparationpeople" style="width: 200px">
<departmentSelect
v-model="easySearch.productingpreparationpeople.value"
:type="3"
></departmentSelect>
</FormItem> </FormItem>
<FormItem prop="keys"> <FormItem prop="keys">
<Input placeholder="请输入订单编号" v-model="easySearch.keys.value" /> <Input
placeholder="请输入订单编号"
v-model="easySearch.keys.value"
/>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
...@@ -19,23 +35,62 @@ ...@@ -19,23 +35,62 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="suspendModal" title="暂停原因" footer-hide class="suspend"> <Modal v-model="suspendModal" title="暂停原因" footer-hide class="suspend">
<Suspend @on-close="cancel" @on-ok="suspendOk" ref="addBug" :rowSuspend="rowSuspend" /> <Suspend
@on-close="cancel"
@on-ok="suspendOk"
ref="addBug"
:rowSuspend="rowSuspend"
/>
</Modal> </Modal>
<Modal v-model="recordModal" title="暂停记录" fullscreen footer-hide class="recordM"> <Modal
<Record :eid="recordId" /> v-model="recordModal"
title="暂停记录"
fullscreen
footer-hide
class="recordM"
>
<component :is="detail" :eid="recordId" @on-close="cancel" />
<!-- <Record :eid="recordId" /> -->
</Modal> </Modal>
<Modal v-model="SpeedModal" title="工单信息" fullscreen footer-hide class="recordM"> <Modal
<Speed :result="result" :load="loading" @on-close="clsoeSpeedModal" :executeId="dispatchExecuteId" :orderId="orderId" /> v-model="SpeedModal"
title="工单信息"
fullscreen
footer-hide
class="recordM"
>
<Speed
:result="result"
:load="loading"
@on-close="clsoeSpeedModal"
:executeId="dispatchExecuteId"
:orderId="orderId"
/>
</Modal> </Modal>
<Modal v-model="recycleModal" title="确定回收订单" width="600" class="suspend"> <Modal
<Form ref="form" :model="recovery" :rules="rulesRecycle" :label-width="120"> v-model="recycleModal"
title="确定回收订单"
width="600"
class="suspend"
>
<Form
ref="form"
:model="recovery"
:rules="rulesRecycle"
:label-width="120"
>
<Row> <Row>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('mesCode')">{{mesCode}}</FormItem> <FormItem :label="l('mesCode')">{{ mesCode }}</FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('demandFinishDate')" prop="demandFinishDate"> <FormItem :label="l('demandFinishDate')" prop="demandFinishDate">
<DatePicker type="date" placeholder="请选择日期" style="width:240px" v-model="recovery.demandFinishDate"></DatePicker> <DatePicker
type="date"
placeholder="请选择日期"
style="width: 240px"
v-model="recovery.demandFinishDate"
></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -45,26 +100,27 @@ ...@@ -45,26 +100,27 @@
<Button type="primary" @click="changeFinishiDate">确定</Button> <Button type="primary" @click="changeFinishiDate">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Suspend from "./suspend"; import Suspend from "./suspend";
import Record from "./record"; // import Record from "./record";
import Search from "./search"; import Search from "./search";
import Speed from "./speed"; import Speed from "./speed";
export default { export default {
name: "index", name: "index",
components: { components: {
Record, // Record,
Search, Search,
Suspend, Suspend,
Speed, Speed,
}, },
data() { data() {
return { return {
detail: null,
result: [], result: [],
dispatchExecuteId: null, //任务id dispatchExecuteId: null, //任务id
orderId: null, //订单id orderId: null, //订单id
...@@ -76,11 +132,11 @@ export default { ...@@ -76,11 +132,11 @@ export default {
easySearch: { easySearch: {
keys: { keys: {
op: "mesCode", op: "mesCode",
value: null value: null,
}, },
productingpreparationpeople: { productingpreparationpeople: {
op: "Equal", op: "Equal",
value: null value: null,
}, },
}, },
suspendModal: false, suspendModal: false,
...@@ -88,11 +144,12 @@ export default { ...@@ -88,11 +144,12 @@ export default {
deletelModal: false, deletelModal: false,
recycleModal: false, recycleModal: false,
curId: 0, curId: 0,
columns: [{ columns: [
{
key: "id", key: "id",
title: this.l("id"), title: this.l("id"),
hide: true, hide: true,
align: "left" align: "left",
}, },
{ {
title: "序号", title: "序号",
...@@ -118,7 +175,8 @@ export default { ...@@ -118,7 +175,8 @@ export default {
params.row.mesCode, params.row.mesCode,
[ [
h( h(
"Poptip", { "Poptip",
{
props: { props: {
content: "开工预警:" + params.row.startWarning + "条", content: "开工预警:" + params.row.startWarning + "条",
trigger: "hover", trigger: "hover",
...@@ -129,7 +187,8 @@ export default { ...@@ -129,7 +187,8 @@ export default {
}, },
[ [
h( h(
params.row.startWarning > 0 ? "Badge" : "", { params.row.startWarning > 0 ? "Badge" : "",
{
props: { props: {
type: "warning", type: "warning",
// count: 2, // count: 2,
...@@ -155,7 +214,8 @@ export default { ...@@ -155,7 +214,8 @@ export default {
] ]
), ),
h( h(
"Poptip", { "Poptip",
{
props: { props: {
content: "完工预警:" + params.row.finishWarning + "条", content: "完工预警:" + params.row.finishWarning + "条",
trigger: "hover", trigger: "hover",
...@@ -163,7 +223,8 @@ export default { ...@@ -163,7 +223,8 @@ export default {
}, },
[ [
h( h(
params.row.finishWarning > 0 ? "Badge" : "", { params.row.finishWarning > 0 ? "Badge" : "",
{
props: { props: {
type: "info", type: "info",
// count: 2, // count: 2,
...@@ -239,9 +300,9 @@ export default { ...@@ -239,9 +300,9 @@ export default {
return h( return h(
"span", "span",
// this.sliceStr(params.row.actualStartDate + ' ', 0, 10), // this.sliceStr(params.row.actualStartDate + ' ', 0, 10),
params.row.actualStartDate == "0001-01-01 00:00:00" ? params.row.actualStartDate == "0001-01-01 00:00:00"
"" : ? ""
params.row.actualStartDate : params.row.actualStartDate
); );
}, },
}, },
...@@ -255,9 +316,9 @@ export default { ...@@ -255,9 +316,9 @@ export default {
return h( return h(
"span", "span",
// this.sliceStr(params.row.actualFinishDate + ' ', 0, 10), // this.sliceStr(params.row.actualFinishDate + ' ', 0, 10),
params.row.actualFinishDate == "0001-01-01 00:00:00" ? params.row.actualFinishDate == "0001-01-01 00:00:00"
"" : ? ""
params.row.actualFinishDate : params.row.actualFinishDate
); );
}, },
}, },
...@@ -278,14 +339,16 @@ export default { ...@@ -278,14 +339,16 @@ export default {
render: (h, params) => { render: (h, params) => {
return h("div", [ return h("div", [
h( h(
"ButtonGroup", { "ButtonGroup",
{
props: { props: {
shape: "circle", shape: "circle",
}, },
}, },
[ [
h( h(
"Button", { "Button",
{
style: { style: {
background: "#e4e6ed ", background: "#e4e6ed ",
borderColor: "#e4e6ed ", borderColor: "#e4e6ed ",
...@@ -299,7 +362,8 @@ export default { ...@@ -299,7 +362,8 @@ export default {
params.row.unstartCount //未开工数 params.row.unstartCount //未开工数
), ),
h( h(
"Button", { "Button",
{
style: { style: {
background: "#ffc000", background: "#ffc000",
borderColor: "#ffc000", borderColor: "#ffc000",
...@@ -330,7 +394,8 @@ export default { ...@@ -330,7 +394,8 @@ export default {
params.row.stopCount //暂停数 params.row.stopCount //暂停数
), ),
h( h(
"Button", { "Button",
{
style: { style: {
background: "#27c149", background: "#27c149",
borderColor: "#27c149", borderColor: "#27c149",
...@@ -361,22 +426,27 @@ export default { ...@@ -361,22 +426,27 @@ export default {
width: 100, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { return h(
class: "action" "div",
}, [ {
class: "action",
},
[
h( h(
"op", { "op",
{
attrs: { attrs: {
oprate: "record", oprate: "record",
class: "edit" class: "edit",
}, },
on: { on: {
click: () => this.record(params.row.id) click: () => this.record(params.row.id),
}, },
}, },
"暂停记录" "暂停记录"
), ),
]); ]
);
}, },
}, },
{ {
...@@ -385,16 +455,19 @@ export default { ...@@ -385,16 +455,19 @@ export default {
width: 100, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { return h(
class: "action" "div",
}, [ {
class: "action",
},
[
h( h(
(params.row.status == 5 && params.row.upSplitId == 0) || (params.row.status == 5 && params.row.upSplitId == 0) ||
(params.row.status == 5 && (params.row.status == 5 &&
params.row.upSplitId > 0 && params.row.upSplitId > 0 &&
params.row.splitCardStatus == 1) ? params.row.splitCardStatus == 1)
"Button" : ? "Button"
"", //订单状态暂停,启动 : "", //订单状态暂停,启动
{ {
props: { props: {
type: "error", type: "error",
...@@ -441,9 +514,9 @@ export default { ...@@ -441,9 +514,9 @@ export default {
"" ""
), ),
h( h(
params.row.status == 5 && params.row.splitCardStatus == 0 ? params.row.status == 5 && params.row.splitCardStatus == 0
"op" : ? "op"
"", //订单状态执行中,暂停 : "", //订单状态执行中,暂停
{ {
attrs: { attrs: {
icon: "md-sync", icon: "md-sync",
...@@ -459,7 +532,8 @@ export default { ...@@ -459,7 +532,8 @@ export default {
}, },
} }
), ),
]); ]
);
}, },
}, },
], ],
...@@ -470,20 +544,19 @@ export default { ...@@ -470,20 +544,19 @@ export default {
}, },
mesCode: "", mesCode: "",
rulesRecycle: { rulesRecycle: {
demandFinishDate: [{ demandFinishDate: [
{
required: true, required: true,
message: "请选择计划完成时间", message: "请选择计划完成时间",
trigger: "change", trigger: "change",
type: "date", type: "date",
}, ], },
],
}, },
}; };
}, },
mounted() {}, mounted() {},
async fetch({ async fetch({ store, params }) {
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -491,6 +564,7 @@ export default { ...@@ -491,6 +564,7 @@ export default {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
record(id) { record(id) {
this.detail = () => import("./record");
this.recordModal = true; this.recordModal = true;
this.recordId = id; this.recordId = id;
}, },
...@@ -529,7 +603,7 @@ export default { ...@@ -529,7 +603,7 @@ export default {
// this.curId = 0 // this.curId = 0
}, },
start(row) { start(row) {
this.laster = this.$store.state.userInfo.userId, (this.laster = this.$store.state.userInfo.userId),
this.$Modal.confirm({ this.$Modal.confirm({
title: "提示", title: "提示",
content: "<p>确定要启动,是否继续?</p>", content: "<p>确定要启动,是否继续?</p>",
...@@ -564,7 +638,7 @@ export default { ...@@ -564,7 +638,7 @@ export default {
removeOk() { removeOk() {
Api.delete({ Api.delete({
id: this.curId id: this.curId,
}).then((r) => { }).then((r) => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.$refs.grid.load();
...@@ -640,7 +714,7 @@ export default { ...@@ -640,7 +714,7 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.ivu-btn-group>.ivu-btn { .ivu-btn-group > .ivu-btn {
height: 21px !important; height: 21px !important;
} }
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
type: "user", type: "user",
}, },
{ {
key: "laster", key: "lastModifierUserId",
title: this.l("laster"), title: this.l("laster"),
easy: true, easy: true,
high: true, high: true,
...@@ -192,10 +192,6 @@ export default { ...@@ -192,10 +192,6 @@ export default {
eid: Number, eid: Number,
}, },
mounted() { mounted() {
// this.$refs.grid.reload(this.easySearch);
// if (this.eid) {
// this.loadList();
// }
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
...@@ -214,9 +210,8 @@ export default { ...@@ -214,9 +210,8 @@ export default {
//格式化原始数据 //格式化原始数据
formatFun(data) { formatFun(data) {
data.map((e) => { data.map((e) => {
if (e.laster) { if (e.laster || e.creator) {
e.laster = parseInt(e.laster); e.laster = parseInt(e.laster);
} else if (e.creator) {
e.creator = parseInt(e.creator); e.creator = parseInt(e.creator);
} }
}); });
......
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