Commit c1291ef6 authored by kangzhenfei's avatar kangzhenfei

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

parents 5d94412d d4efdb51
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
pageSizeOpts: [20, 50, 100], pageSizeOpts: [20, 50, 100],
tableHeight: 0, tableHeight: 0,
firstY: 0, firstY: 0,
config: false, config: false,
list: [], list: [],
columnsCur: [], columnsCur: [],
configLoad: false, configLoad: false,
...@@ -146,6 +146,14 @@ export default { ...@@ -146,6 +146,14 @@ export default {
type: Boolean, type: Boolean,
default: true default: true
}, },
format: {
type: Function,
default: null
},
initsearch: {
type: Function,
default: null
},
lazy: { lazy: {
//懒加载设置,设置为真时候,默认不加载数据。 //懒加载设置,设置为真时候,默认不加载数据。
type: Boolean, type: Boolean,
...@@ -223,17 +231,19 @@ export default { ...@@ -223,17 +231,19 @@ export default {
return ["table", "card", "list"].indexOf(value) !== -1; return ["table", "card", "list"].indexOf(value) !== -1;
} }
}, },
span: {//栅格数 span: {
//栅格数
type: Number, type: Number,
default: 24 default: 24
}, },
//table控件children子数据控制功能 //table控件children子数据控制功能
rowKey: { rowKey: {
type: [String, Number] type: [String, Number]
}, },
gutter:{//间距 gutter: {
type:Number, //间距
default:40 type: Number,
default: 40
} }
}, },
created() { created() {
...@@ -260,7 +270,7 @@ export default { ...@@ -260,7 +270,7 @@ export default {
this.easySearch(); this.easySearch();
} }
if (this.height === 0) { if (this.height === 0) {
this.$nextTick(()=>{ this.$nextTick(() => {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
...@@ -268,7 +278,7 @@ export default { ...@@ -268,7 +278,7 @@ export default {
this.tableHeight = this.$refs.main.offsetHeight; this.tableHeight = this.$refs.main.offsetHeight;
})(); })();
}; };
}) });
} else { } else {
this.tableHeight = this.height; this.tableHeight = this.height;
} }
...@@ -285,8 +295,16 @@ export default { ...@@ -285,8 +295,16 @@ export default {
this.tableHeight = window.innerHeight - this.firstY - 60; this.tableHeight = window.innerHeight - this.firstY - 60;
} }
if (this.action) { if (this.action) {
//条件初始化处理。
if(this.initsearch){
this.initsearch(this.search)
}
this.$api.post(this.action, this.search).then(r => { this.$api.post(this.action, this.search).then(r => {
this.list = r.result.items; if (this.format) {
this.list = this.format(r.result.items);
} else {
this.list = r.result.items;
}
this.search.total = r.result.totalCount || r.result.count; this.search.total = r.result.totalCount || r.result.count;
}); });
} }
...@@ -380,7 +398,11 @@ export default { ...@@ -380,7 +398,11 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if (this.conditions &&this.conditions.keys&& this.conditions.keys.default) { if (
this.conditions &&
this.conditions.keys &&
this.conditions.keys.default
) {
//判断没有传入条件的用默认的查询 //判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys; this.conditions.keys.value = this.keys;
} }
...@@ -486,11 +508,13 @@ export default { ...@@ -486,11 +508,13 @@ export default {
if (u.type == "user") { if (u.type == "user") {
u.render = (h, params) => { u.render = (h, params) => {
let values = u.key; let values = u.key;
return h("User", { if (params.row[values]) {
props: { return h("User", {
value: params.row[values] props: {
} value: params.row[values]
}); }
});
}
}; };
} }
if (u.type == "date" || u.type == "dateTime") { if (u.type == "date" || u.type == "dateTime") {
...@@ -546,7 +570,7 @@ export default { ...@@ -546,7 +570,7 @@ export default {
tr td .ivu-table-cell { tr td .ivu-table-cell {
padding: 0 5px; padding: 0 5px;
} }
overflow-x: hidden; overflow-x: hidden;
} }
.table-tools { .table-tools {
display: flex; display: flex;
......
...@@ -1489,5 +1489,30 @@ export default { ...@@ -1489,5 +1489,30 @@ export default {
description:'描述', description:'描述',
levelNum:'编码分类层数', levelNum:'编码分类层数',
codeLength:'编码分类位数', codeLength:'编码分类位数',
} },
//转续列表
order_execute_handon:{
dispatchId:'工单id',
currentUserId:'当前操作人',
handonUserId:'转序人',
status:'状态',
currentDetailId:'工序id',
nextDetailId:'下道工序id',
remark:'备注',
finishTime:'工单完成时间',
productIdStr:'交接判定产品id字符串',
actualHandonUser:'实际交接人',
handonCardNo:'交接人刷卡号',
currentDetailName:'工序名称',
nextDetailName:'下道工序名称',
productName:'产品名称',
drawnNumber:'图号',
batchNumber:'批次号',
handonTime:'接收时间',
handonNo:'交接单号',
handonCount:'交接数量',
qualifiedCount:'合格数量',
currentUserName:'交接人名称',
handonUserName:'接收人名称',
}
} }
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
this.checkList.splice(index, 1); this.checkList.splice(index, 1);
} }
}, },
setRow(row,index) { setRow(row, index) {
this.$set(this.checkList, index, row); this.$set(this.checkList, index, row);
}, },
addNew() { addNew() {
...@@ -229,12 +229,12 @@ export default { ...@@ -229,12 +229,12 @@ export default {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch(err => {
this.disabled = false; this.disabled = false;
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
}); });
} }
}); });
......
...@@ -69,8 +69,9 @@ ...@@ -69,8 +69,9 @@
<template <template
slot-scope="{ row, index }" slot-scope="{ row, index }"
slot="action" slot="action"
v-if="row.fieldType==2||row.fieldType==3" v-if="row.fieldType==2||row.fieldType==3||!row.notEditDelete"
> >
<!-- notEditDelete=true,删除不显示 -->
<a @click="remove(index,row)" style="color:#FF7A8B">删除</a> <a @click="remove(index,row)" style="color:#FF7A8B">删除</a>
</template> </template>
</Table> </Table>
...@@ -197,7 +198,7 @@ export default { ...@@ -197,7 +198,7 @@ export default {
this.checkList.splice(index, 1); this.checkList.splice(index, 1);
} }
}, },
setRow(row,index) { setRow(row, index) {
this.$set(this.checkList, index, row); this.$set(this.checkList, index, row);
}, },
addNew() { addNew() {
...@@ -227,12 +228,12 @@ export default { ...@@ -227,12 +228,12 @@ export default {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch(err => {
this.disabled = false; this.disabled = false;
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
}); });
} }
}); });
......
...@@ -74,12 +74,12 @@ export default { ...@@ -74,12 +74,12 @@ export default {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch(err => {
this.disabled = false; this.disabled = false;
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
}); });
} }
}); });
......
...@@ -83,12 +83,12 @@ export default { ...@@ -83,12 +83,12 @@ export default {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok",this.entity); this.$emit("on-ok",this.entity);
} else { } else {
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
} }
}) })
.catch(err => { .catch(err => {
this.disabled = false; this.disabled = false;
this.$Message.error("保存失败"); this.$Message.error(r.error.message);
}); });
} }
}); });
......
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="版本" prop="banben"> <FormItem label="版本" prop="version">
<Input v-model="entity.banben" placeholder="请输入"></Input> <Input v-model="entity.version" placeholder="请输入"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
...@@ -46,14 +46,15 @@ ...@@ -46,14 +46,15 @@
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
props: ["nodeInfo"],
data() { data() {
return { return {
arr: [], arr: [],
entity: { entity: {
code: 0, code: 0,
categoryId: 0, //左侧树点击的id categoryId: this.nodeInfo.categoryId, //左侧树点击的id
customProperties: {}, customProperties: {},
rootCategoryId: 0 //左侧树点击的数据的最顶层id rootCategoryId: this.nodeInfo.rootCategoryId //左侧树点击的数据的最顶层id
}, },
disabled: false, disabled: false,
...@@ -113,19 +114,19 @@ export default { ...@@ -113,19 +114,19 @@ export default {
if (v) { if (v) {
// let categoryDto = this.entity; // let categoryDto = this.entity;
// let pro = this.checkList.concat(this.arr); // let pro = this.checkList.concat(this.arr);
// Api.create({ categoryDto: categoryDto, pro: pro }) Api.create(this.entity)
// .then(r => { .then(r => {
// if (r.success) { if (r.success) {
// this.$Message.success("保存成功"); this.$Message.success("保存成功");
// this.$emit("on-ok"); this.$emit("on-ok");
// } else { } else {
// this.$Message.error("保存失败"); this.$Message.error(r.error.message);
// } }
// }) })
// .catch(err => { .catch(err => {
// this.disabled = false; this.disabled = false;
// this.$Message.error("保存失败"); this.$Message.error(r.error.message);
// }); });
} }
}); });
}, },
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
listTable(params){ index:`${systemUrl}/material/paged`,
return Api.post(`${systemUrl}/custompropertydefinition/list`,params); paged(params){
return Api.post(`${systemUrl}/material/paged`,params);
}, },
list(params){ list(params){
return Api.post(`${systemUrl}/category/list`,params); return Api.post(`${systemUrl}/category/list`,params);
......
...@@ -34,19 +34,9 @@ ...@@ -34,19 +34,9 @@
</a> </a>
</div> </div>
<Content :class="!showMenu?'con_bord':''"> <Content :class="!showMenu?'con_bord':''">
<MasterData ref="dataTable" @on-edit="edit" /> <MasterData ref="dataTable" :nodeInfo="nodeInfo" />
</Content> </Content>
</Layout> </Layout>
<!-- <Modal v-model="modal" :title="title" width="1000" footer-hide :mask-closable="false">
<component
:is="detail"
:eid="curId"
:nodeInfo="nodeInfo"
@on-close="cancel"
@on-ok="ok"
ref="chlidren"
/>
</Modal>-->
</div> </div>
</template> </template>
<script> <script>
...@@ -63,7 +53,10 @@ export default { ...@@ -63,7 +53,10 @@ export default {
keys: "", keys: "",
expand: false, expand: false,
list: [], list: [],
nodeInfo: {}, nodeInfo: {
categoryId: 0,
rootCategoryId: 0
},
modal: false, modal: false,
title: "新增", title: "新增",
curId: 0, curId: 0,
...@@ -105,14 +98,40 @@ export default { ...@@ -105,14 +98,40 @@ export default {
{ {
on: { on: {
click: () => { click: () => {
this.handleSelect(data); //手动选择树节点 this.handleSelect(root, data); //手动选择树节点
} }
} }
}, },
data.title data.title
); );
}, },
handleSelect(data) {}, handleSelect(root, data) {
// console.log(root);
let pid = null; //定义最顶级id
let upId = data.upId;
let roots = root;
function addId(roots, upId) {
roots.map(u => {
if (u.node.id == upId) {
if (u.node.upId == 0) {
pid = u.node.id;
} else {
upId = u.node.upId;
addId(roots, upId);
}
}
});
}
addId(roots, upId);
this.nodeInfo.categoryId = data.id;
if (pid == null) {
this.nodeInfo.rootCategoryId = data.id;
} else {
this.nodeInfo.rootCategoryId = pid;
}
},
loadTree() { loadTree() {
let conditions = []; let conditions = [];
Api.list({ conditions: conditions }).then(r => { Api.list({ conditions: conditions }).then(r => {
...@@ -132,24 +151,7 @@ export default { ...@@ -132,24 +151,7 @@ export default {
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
}, },
change(v, b) { change(v, b) {},
console.log(v);
console.log(b);
let ids = [];
ids.push(b.value);
if (b.children) {
addId(b.children);
function addId(data) {
data.map(u => {
ids.push(u.value);
if (u.children) {
addId(u.children);
}
});
}
}
// this.$emit("on-select", b.value, b, ids);
},
hide() { hide() {
this.showMenu = false; this.showMenu = false;
} }
......
<template> <template>
<div class="master-data"> <div class="master-data">
<DataGrid :columns="columns" ref="grid" :action="action"> {{nodeInfo}}
<DataGrid :columns="columns" ref="grid" :action="action" :initsearch="sets" :high="false">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input
placeholder="请输入工艺名称/工艺编号" placeholder="请输入编码/名称/状态"
v-width="200" v-width="200"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
clearable clearable
...@@ -43,16 +44,28 @@ export default { ...@@ -43,16 +44,28 @@ export default {
components: { components: {
// Search // Search
}, },
props: ["nodeInfo"],
data() { data() {
return { return {
action: "", action: Api.index,
modal: false, modal: false,
title: "新增", title: "新增",
curId: 0, curId: 0,
detail: null, detail: null,
nodeInfo: {}, sets: v => {
v.categoryId = this.nodeInfo.categoryId;
v.rootCategoryId = this.nodeInfo.rootCategoryId;
},
easySearch: { easySearch: {
keys: { op: "unicode,name,code", value: null } keys: { op: "Code,Name", value: null },
// categoryId: {
// op: "In",
// value: this.nodeInfo.categoryId
// },
// rootCategoryId: {
// op: "In",
// value: this.nodeInfo.rootCategoryId
// }
}, },
columns: [ columns: [
// { // {
...@@ -62,17 +75,17 @@ export default { ...@@ -62,17 +75,17 @@ export default {
// width: 60 // width: 60
// }, // },
{ {
key: "code", key: "Code",
title: "编码", title: "编码",
align: "left" align: "left"
}, },
{ {
key: "name", key: "Name",
title: "名称", title: "名称",
align: "left" align: "left"
}, },
{ {
key: "status", key: "Status",
title: "状态", title: "状态",
align: "left", align: "left",
render: (h, params) => { render: (h, params) => {
...@@ -80,17 +93,21 @@ export default { ...@@ -80,17 +93,21 @@ export default {
props: { props: {
code: "materail.category.status", code: "materail.category.status",
type: "text", type: "text",
value: params.row.status + "" value: params.row.Status + ""
} }
}); });
} }
}, },
{ {
key: "description", key: "Version",
title: "版本",
align: "left"
},
{
key: "Description",
title: "描述", title: "描述",
align: "left" align: "left"
}, },
{ {
title: "操作", title: "操作",
key: "action", key: "action",
...@@ -123,10 +140,7 @@ export default { ...@@ -123,10 +140,7 @@ export default {
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
created() { created() {},
// this.dataColumns = this.dataTable;
// console.log(this.dataColumns)
},
methods: { methods: {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
...@@ -156,7 +170,7 @@ export default { ...@@ -156,7 +170,7 @@ export default {
}); });
}, },
ok() { ok() {
// this.loadTree(); this.$refs.grid.reload(this.easySearch);
this.modal = false; this.modal = false;
this.curId = 0; this.curId = 0;
}, },
...@@ -164,6 +178,13 @@ export default { ...@@ -164,6 +178,13 @@ export default {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
} }
},
watch: {
"nodeInfo.categoryId"(v) {
if (v) {
this.$refs.grid.reload(this.easySearch);
}
}
} }
}; };
</script> </script>
......
...@@ -33,6 +33,15 @@ export default { ...@@ -33,6 +33,15 @@ export default {
confirmproductsandoperator(params) { confirmproductsandoperator(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params); return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params);
}, },
//转续列表
indexHandon: `${PlanUrl}/orderexecutehandon/handonpaged`,
handonpaged(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/handonpaged`, params);
},
//刷卡交接
handon(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/handon`, params);
},
//工时分配--下一步人员 //工时分配--下一步人员
getentryusers(params) { getentryusers(params) {
return Api.get(`${PlanUrl}/orderexecutenew/entryusers`, params); return Api.get(`${PlanUrl}/orderexecutenew/entryusers`, params);
......
<style lang="less"> <style lang="less">
@import "../execute/execute.less"; @import "../execute/execute.less";
</style> </style>
<!--:action="action"-->
<template> <template>
<div> <div>
<DataGrid <DataGrid
...@@ -13,6 +14,7 @@ ...@@ -13,6 +14,7 @@
:batch="true" :batch="true"
:border="false" :border="false"
:high="false" :high="false"
:format="formatFun"
> >
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -20,7 +22,7 @@ ...@@ -20,7 +22,7 @@
<Input <Input
search search
enter-button enter-button
placeholder="请输入关键字订单编号/项目名称" placeholder="请输入关键字产品名称"
v-model="easySearch.keys.value" v-model="easySearch.keys.value"
@on-search="search" @on-search="search"
v-width="300" v-width="300"
...@@ -33,13 +35,28 @@ ...@@ -33,13 +35,28 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="transModal" title="确认转续" width="900"> <Modal v-model="transModal" title="确认转续" width="900">
<div class="zhuanx mt30"> <div class="zhuanx mt30 mb20">
<p class="line_p"> <p class="line_p">
<Input prefix="ios-contact-outline" placeholder="请输入人员编号" style="width: auto" /> <Input
</p> prefix="ios-contact"
<p class="line_p"> v-model="handonCardNo"
<Input prefix="ios-lock-outline" placeholder="请输入人员密码" style="width: auto" /> placeholder="请输入接收人员编号"
style="width: auto"
size="large"
/>
</p> </p>
<!--<p class="line_p">
<Poptip trigger="focus">
<Input
v-model="handonCardNo"
prefix="ios-contact"
placeholder="请输入接收人员编号"
style="width: 300px"
/>
<div slot="content">{{ formatNumber }}</div>
</Poptip>
</p>-->
</div> </div>
<div slot="footer"> <div slot="footer">
<Button @click="transModal = false">取消</Button> <Button @click="transModal = false">取消</Button>
...@@ -49,16 +66,16 @@ ...@@ -49,16 +66,16 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../execute/api";
export default { export default {
name: "reOrder", name: "reOrder",
data() { data() {
return { return {
action: Api.index, action: Api.indexHandon,
starmodal: false, starmodal: false,
easySearch: { easySearch: {
keys: { keys: {
op: "mesCode,productName", op: "productName",
value: null, value: null,
default: true default: true
} }
...@@ -74,35 +91,18 @@ export default { ...@@ -74,35 +91,18 @@ export default {
align: "center" align: "center"
}, },
{ {
key: "quantity", key: "handonNo",
title: this.l("quantity"), title: this.l("handonNo"),
align: "right",
high: true,
width: 80
},
{
key: "taskRequire",
title: this.l("taskRequire"),
align: "left", align: "left",
easy: true, high: true
high: true,
hide: true
}, },
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
width: 120,
high: true, high: true,
code: "plan.order.status", code: "mes.order_execute_handon.status"
width: 100
},
{
key: "productCode",
title: this.l("productCode"),
align: "left",
easy: true,
high: true,
hide: true
}, },
{ {
key: "productName", key: "productName",
...@@ -115,30 +115,90 @@ export default { ...@@ -115,30 +115,90 @@ export default {
key: "drawnNumber", key: "drawnNumber",
title: this.l("drawnNumber"), title: this.l("drawnNumber"),
align: "left", align: "left",
easy: true,
high: true high: true
}, },
{ {
key: "batchNumber", key: "batchNumber",
title: this.l("batchNumber"), title: this.l("batchNumber"),
align: "left", align: "left",
high: true
},
{
key: "handonCount",
title: this.l("handonCount"),
align: "right",
high: true
},
{
key: "qualifiedCount",
title: this.l("qualifiedCount"),
align: "right",
high: true,
hide: true
},
{
key: "finishTime",
title: this.l("finishTime"),
align: "center",
width: 150,
high: true
},
{
key: "currentDetailName",
title: this.l("currentDetailName"),
align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "projectNumber", key: "nextDetailName",
title: this.l("projectNumber"), title: this.l("nextDetailName"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "urgencyLevel", key: "handonUserId",
title: this.l("urgencyLevel"), title: this.l("handonUserId"),
align: "center", align: "left",
high: true,
type: "user"
},
{
key: "handonCardNo",
title: this.l("handonCardNo"),
align: "left",
high: true,
hide: true
},
{
key: "currentUserName",
title: this.l("currentUserName"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "handonUserName",
title: this.l("handonUserName"),
align: "left",
easy: true,
high: true
},
{
key: "actualHandonUser",
title: this.l("actualHandonUser"),
align: "left",
high: true, high: true,
code: "plan.order.urgencyLevel", type: "user"
width: 100 },
{
key: "handonTime",
title: this.l("handonTime"),
high: true,
align: "center",
width: 150
}, },
{ {
title: "操作", title: "操作",
...@@ -151,15 +211,17 @@ export default { ...@@ -151,15 +211,17 @@ export default {
"op", "op",
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.openTrans(params.row) }, on: { click: () => this.openTrans(params.row.id) },
style: params.row.status == 1 ? "display:none" : "" style: params.row.status == 1 ? "" : "display:none"
}, },
"确认转续" "确认转续"
) )
]); ]);
} }
} }
] ],
handonCardNo: "",
userPwd: ""
}; };
}, },
created() { created() {
...@@ -181,25 +243,63 @@ export default { ...@@ -181,25 +243,63 @@ export default {
this.easySearch.keys.value = this.easySearch.keys.value.trim(); this.easySearch.keys.value = this.easySearch.keys.value.trim();
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
openTrans() { openTrans(val) {
if (val && val > 0) {
this.$refs.grid.selectAll(false);
this.arrayIds = [];
this.arrayIds.push(val);
}
this.transModal = true; this.transModal = true;
}, },
transOk() { transOk() {
alert("确定转续"); if (!this.handonCardNo || this.handonCardNo.trim == "") {
this.$Message.error("请输入接收人员编号!");
return;
}
let params = {
ids: this.arrayIds,
handonCardNo: this.handonCardNo
};
Api.handon(params)
.then(res => {
if (res.success && res.result) {
this.$Message.success("转续成功!");
this.transModal = false;
this.search();
} else {
this.$Message.error("转续失败!");
}
})
.catch(err => {
this.$Message.error("连接失败!");
});
}, },
onSelect(a, b) { onSelect(a, b) {
//alert(JSON.stringify(a));
//批量选择 //批量选择
let selectRows = a; let selectRows = a;
this.arrayIds = []; this.arrayIds = [];
this.rowDataArry = a; this.arrayIds = selectRows.map(e => e.id);
selectRows.forEach(e => {
this.arrayIds.push(e.id);
});
}, },
l(key) { l(key) {
let vkey = "mes_plan" + "." + key; let vkey = "order_execute_handon" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
},
//格式化原始数据
formatFun(data) {
data.map(e => {
if (e.status != 1) {
e._disabled = true;
} else {
e._disabled = false;
}
});
return data;
}
},
computed: {
formatNumber() {
if (this.handonCardNo == "") return "请输入接收人员编号";
return this.handonCardNo;
} }
} }
}; };
......
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