Commit 3807f686 authored by 仇晓婷's avatar 仇晓婷

订单报价

parent 4b8c76f6
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
</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,
...@@ -53,67 +53,68 @@ export default { ...@@ -53,67 +53,68 @@ export default {
SpeedModal: false, SpeedModal: false,
rowSuspend: {}, rowSuspend: {},
recordId: 0, recordId: 0,
laster: 0,
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: 'mesCode', value: null }, keys: { op: "mesCode", value: null },
productingpreparationpeople: { op: 'Equal', value: null } productingpreparationpeople: { op: "Equal", value: null }
}, },
suspendModal: false, suspendModal: false,
recordModal: false, recordModal: false,
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'status', key: "status",
title: this.l('status'), title: this.l("status"),
code: 'plan.order.status', code: "plan.order.status",
align: 'center', align: "center",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'mesCode', key: "mesCode",
title: this.l('mesCode'), title: this.l("mesCode"),
align: 'left', align: "left",
width: 230, width: 230,
render: (h, params) => { render: (h, params) => {
return h('div', [ return h("div", [
params.row.mesCode, params.row.mesCode,
[ [
h( h(
'Poptip', "Poptip",
{ {
props: { props: {
content: '开工预警:' + params.row.startWarning + '条', content: "开工预警:" + params.row.startWarning + "条",
trigger: 'hover' trigger: "hover"
}, },
style: { style: {
cursor: 'pointer' cursor: "pointer"
} }
}, },
[ [
h( h(
params.row.startWarning > 0 ? 'Badge' : '', params.row.startWarning > 0 ? "Badge" : "",
{ {
props: { props: {
type: 'warning', type: "warning",
// count: 2, // count: 2,
count: params.row.startWarning count: params.row.startWarning
}, },
style: { style: {
marginTop: '12px', marginTop: "12px",
marginLeft: '5px' marginLeft: "5px"
} }
}, },
[ [
h('Icon', { h("Icon", {
props: { props: {
type: 'md-alert' type: "md-alert"
}, },
style: { style: {
fontSize: '16px', fontSize: "16px",
color: '#f1cb08' color: "#f1cb08"
} }
}) })
] ]
...@@ -121,36 +122,36 @@ export default { ...@@ -121,36 +122,36 @@ export default {
] ]
), ),
h( h(
'Poptip', "Poptip",
{ {
props: { props: {
content: '完工预警:' + params.row.finishWarning + '条', content: "完工预警:" + params.row.finishWarning + "条",
trigger: 'hover' trigger: "hover"
} }
}, },
[ [
h( h(
params.row.finishWarning > 0 ? 'Badge' : '', params.row.finishWarning > 0 ? "Badge" : "",
{ {
props: { props: {
type: 'info', type: "info",
// count: 2, // count: 2,
count: params.row.finishWarning count: params.row.finishWarning
}, },
style: { style: {
marginTop: '12px', marginTop: "12px",
marginLeft: '5px' marginLeft: "5px"
} }
}, },
[ [
h('Icon', { h("Icon", {
props: { props: {
type: 'md-alert' type: "md-alert"
}, },
style: { style: {
fontSize: '16px', fontSize: "16px",
color: '#31F8E6', color: "#31F8E6",
marginLeft: '5px' marginLeft: "5px"
} }
}) })
] ]
...@@ -158,111 +159,111 @@ export default { ...@@ -158,111 +159,111 @@ export default {
] ]
) )
] ]
]) ]);
} }
}, },
{ {
key: 'productName', key: "productName",
title: this.l('productName'), title: this.l("productName"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
width: 130 width: 130
}, },
{ {
key: 'demandStartDate', key: "demandStartDate",
title: this.l('demandStartDate'), title: this.l("demandStartDate"),
align: 'center', align: "center",
high: true, high: true,
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
this.sliceStr(params.row.demandStartDate + ' ', 0, 10), this.sliceStr(params.row.demandStartDate + " ", 0, 10),
params.row.demandStartDate params.row.demandStartDate
) );
} }
}, },
{ {
key: 'demandFinishDate', key: "demandFinishDate",
title: this.l('demandFinishDate'), title: this.l("demandFinishDate"),
align: 'center', align: "center",
high: true, high: true,
width: 130, width: 130,
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
this.sliceStr(params.row.demandFinishDate + ' ', 0, 10), this.sliceStr(params.row.demandFinishDate + " ", 0, 10),
params.row.demandFinishDate params.row.demandFinishDate
) );
} }
}, },
{ {
key: 'actualStartDate', key: "actualStartDate",
title: this.l('actualStartDate'), title: this.l("actualStartDate"),
align: 'center', align: "center",
high: true, high: true,
width: 150, width: 150,
render: (h, params) => { render: (h, params) => {
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
) );
} }
}, },
{ {
key: 'actualFinishDate', key: "actualFinishDate",
title: this.l('actualFinishDate'), title: this.l("actualFinishDate"),
align: 'center', align: "center",
high: true, high: true,
width: 150, width: 150,
render: (h, params) => { render: (h, params) => {
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
) );
} }
}, },
{ {
key: 'routingType', key: "routingType",
title: this.l('routingType'), title: this.l("routingType"),
align: 'left', align: "left",
code: 'mes_xingchi_plan.order_material.routingType', code: "mes_xingchi_plan.order_material.routingType",
easy: true, easy: true,
high: true high: true
}, },
{ {
title: this.l('jindu'), title: this.l("jindu"),
key: 'action', key: "action",
width: 200, width: 200,
align: 'center', align: "center",
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 "
}, },
on: { on: {
click: () => { click: () => {
this.speed(params.row) this.speed(params.row);
} }
} }
}, },
...@@ -270,15 +271,15 @@ export default { ...@@ -270,15 +271,15 @@ export default {
params.row.unstartCount //未开工数 params.row.unstartCount //未开工数
), ),
h( h(
'Button', "Button",
{ {
style: { style: {
background: '#ffc000', background: "#ffc000",
borderColor: '#ffc000' borderColor: "#ffc000"
}, },
on: { on: {
click: () => { click: () => {
this.speed(params.row) this.speed(params.row);
} }
} }
}, },
...@@ -286,17 +287,17 @@ export default { ...@@ -286,17 +287,17 @@ export default {
params.row.startCount //开工数 params.row.startCount //开工数
), ),
h( h(
'Button', "Button",
{ {
style: { style: {
background: '#ff7a8b', background: "#ff7a8b",
borderColor: '#ff7a8b' borderColor: "#ff7a8b"
}, },
on: { on: {
click: () => { click: () => {
this.speed(params.row) this.speed(params.row);
} }
} }
}, },
...@@ -304,16 +305,16 @@ export default { ...@@ -304,16 +305,16 @@ export default {
params.row.stopCount //暂停数 params.row.stopCount //暂停数
), ),
h( h(
'Button', "Button",
{ {
style: { style: {
background: '#27c149', background: "#27c149",
borderColor: '#27c149' borderColor: "#27c149"
// color: '#fff' // color: '#fff'
}, },
on: { on: {
click: () => { click: () => {
this.speed(params.row) this.speed(params.row);
} }
} }
}, },
...@@ -322,176 +323,176 @@ export default { ...@@ -322,176 +323,176 @@ export default {
) )
] ]
) )
]) ]);
} }
}, },
{ {
key: 'remark', key: "remark",
title: this.l('remark'), title: this.l("remark"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
title: '暂停记录', title: "暂停记录",
key: 'id', key: "id",
width: 140, width: 140,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'op', "op",
{ {
attrs: { oprate: 'record', class: 'edit' }, attrs: { oprate: "record", class: "edit" },
on: { click: () => this.record(params.row.id) } on: { click: () => this.record(params.row.id) }
}, },
'暂停记录' "暂停记录"
) )
]) ]);
} }
}, },
{ {
title: '操作', title: "操作",
key: 'id', key: "id",
width: 100, width: 100,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
params.row.status == 5 ? 'Button' : '', //订单状态暂停,启动 params.row.status == 5 ? "Button" : "", //订单状态暂停,启动
{ {
props: { props: {
type: 'error', type: "error",
size: 'small', size: "small",
icon: 'md-play', icon: "md-play",
ghost: true ghost: true
}, },
style: { style: {
fontSize: '18px', fontSize: "18px",
width: '50px', width: "50px",
height: '25px', height: "25px",
paddingTop: '0' paddingTop: "0"
}, },
on: { on: {
click: () => { click: () => {
this.start(params.row) this.start(params.row);
} }
} }
}, },
'' ""
), ),
h( h(
params.row.status == 6 ? 'Button' : '', //订单状态执行中,暂停 params.row.status == 6 ? "Button" : "", //订单状态执行中,暂停
{ {
props: { props: {
type: 'default', type: "default",
size: 'small', size: "small",
icon: 'ios-pause', icon: "ios-pause",
ghost: true ghost: true
}, },
style: { style: {
fontSize: '18px', fontSize: "18px",
width: '50px', width: "50px",
height: '25px', height: "25px",
paddingTop: '0' paddingTop: "0"
}, },
on: { on: {
click: () => { click: () => {
this.suspend(params.row) this.suspend(params.row);
} }
} }
}, },
'' ""
) )
]) ]);
} }
} }
] ]
} };
}, },
mounted() {}, mounted() {},
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
record(id) { record(id) {
this.recordModal = true this.recordModal = true;
this.recordId = id this.recordId = id;
}, },
speed(row) { speed(row) {
this.SpeedModal = true this.SpeedModal = true;
Api.info({ Api.info({
routingHeaderId: row.routingHeaderId, routingHeaderId: row.routingHeaderId,
dispatchExecuteId: row.dispatchExecuteId dispatchExecuteId: row.dispatchExecuteId
}).then((r) => { }).then(r => {
if (r.success) { if (r.success) {
this.result = r.result this.result = r.result;
} }
}) });
}, },
suspendOk() { suspendOk() {
this.suspendModal = false this.suspendModal = false;
this.$refs.grid.load() this.$refs.grid.load();
// this.curId = 0 // this.curId = 0
}, },
start(row) { start(row) {
console.log(JSON.parse(localStorage.getItem('userInfo'))) this.laster = this.$store.state.userInfo.login_id;
this.$Modal.confirm({ this.$Modal.confirm({
title: '提示', title: "提示",
content: '<p>确定要启动,是否继续?</p>', content: "<p>确定要启动,是否继续?</p>",
onOk: () => { onOk: () => {
Api.start({ Api.start({
id: row.id, id: row.id,
status: 6, status: 6,
laster: this.$store.state.userInfo.login_id laster: this.laster
}).then((r) => { }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.$Message.success('启动成功') this.$Message.success("启动成功");
} }
}) });
// this.suspendModal = true // this.suspendModal = true
// this.curId = id // this.curId = id
}, },
onCancel: () => { onCancel: () => {
this.$Message.info('已取消') this.$Message.info("已取消");
} }
}) });
}, },
suspend(row) { suspend(row) {
console.log(row) console.log(row);
this.suspendModal = true this.suspendModal = true;
this.rowSuspend = row this.rowSuspend = row;
this.$refs.addBug.getEid() this.$refs.addBug.getEid();
}, },
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} }
}) });
}, },
//截取字符串 //截取字符串
sliceStr(str, lenS, lenE) { sliceStr(str, lenS, lenE) {
return str.slice(lenS, lenE) return str.slice(lenS, lenE);
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.suspendModal = false this.suspendModal = false;
}, },
l(key) { l(key) {
let vkey = 'mes_order_watch' + '.' + key let vkey = "mes_order_watch" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.ivu-btn-group > .ivu-btn { .ivu-btn-group > .ivu-btn {
......
...@@ -145,7 +145,7 @@ import PhotosensitiveDetails from "./components/photosensitiveDetails.vue"; // ...@@ -145,7 +145,7 @@ import PhotosensitiveDetails from "./components/photosensitiveDetails.vue"; //
import MetalQuotationGeneration from "./components/metalQuotationGeneration.vue"; //生成报价单弹框 import MetalQuotationGeneration from "./components/metalQuotationGeneration.vue"; //生成报价单弹框
import PhotosensitiveGeneration from "./components/photosensitiveGeneration.vue"; //生成报价单弹框 import PhotosensitiveGeneration from "./components/photosensitiveGeneration.vue"; //生成报价单弹框
var userId = this.$store.state.userInfo.userId;
export default { export default {
components: { components: {
DrawerSet, DrawerSet,
...@@ -164,6 +164,7 @@ export default { ...@@ -164,6 +164,7 @@ export default {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
userId: 0,
model1: "", model1: "",
rows: {}, rows: {},
modalDai: false, //待审核 modalDai: false, //待审核
...@@ -638,8 +639,9 @@ export default { ...@@ -638,8 +639,9 @@ export default {
}, },
//报价状态 //报价状态
statusData(row) { statusData(row) {
this.userId = this.$store.state.userInfo.userId;
if (row.status === 2) { if (row.status === 2) {
if (row.auditUser == userId) { if (row.auditUser == this.userId) {
//待审核 //待审核
this.modalDai = true; this.modalDai = true;
this.rows = {}; this.rows = {};
...@@ -648,7 +650,7 @@ export default { ...@@ -648,7 +650,7 @@ export default {
this.$Message.error("您不是当前数据处理的指定人员"); this.$Message.error("您不是当前数据处理的指定人员");
} }
} else if (row.status === 1) { } else if (row.status === 1) {
if (row.creatorUserId == userId) { if (row.creatorUserId == this.userId) {
//待送审 //待送审
this.modalSong = true; this.modalSong = true;
this.rows = {}; this.rows = {};
......
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