Commit 400f53be authored by 骆瑛's avatar 骆瑛

表格修改相关页面

parent 73641eca
//定义变量
// @import './themes/deepBlank.less';
// @import './themes/green.less';
@import './themes/default.less';
@import './themes/green.less';
// @import './themes/default.less';
......@@ -142,7 +142,7 @@
@table-bottom-border:#ffffff;
@action-buttons_col:#106FFE;
@add_col:#ffffff;
@buttons_bg:rgba(47, 47, 87, 0.6);
@buttons_bg:rgba(47, 47, 87, 1);
@add_border-right:rgba(255, 255, 255, 0.06);
//工单列表等背景色
@part_body_backcolor:#2F2F57;
......
......@@ -141,7 +141,7 @@
@table-bottom_line:#dcdee2;
@table-bottom-border:#ffffff;
@action-buttons_col:#515a6e;
@buttons_bg:rgba(186, 232, 238, 0.06);
@buttons_bg:#ebf7ff;
@add_border-right:rgba(98, 97, 102, 0.06);
@add_col:#5f6470;
//工单列表等背景色
......
......@@ -138,7 +138,7 @@
@part_top_border:1px solid #ffffff;
@table_border-bg:transparent;
@table_line: #ffffff;
@buttons_bg:rgba(255, 255, 255, 0.6);
@buttons_bg:rgba(255, 255, 255, 1);
@table-bottom_line:transparent;
@table-bottom-border:#ffffff;
@action-buttons_col:#04BB8C;
......
......@@ -19,10 +19,9 @@
background: #f5f7f9;
}
}
</style>
<template>
<Layout class="lay100">
<Layout class="lay100">
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
......@@ -31,15 +30,33 @@
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content class="con" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" exportTitle="工艺规程" >
<Content class="con" :class="!showMenu ? 'con_bord' : ''">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
exportTitle="工艺规程"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入工艺名称/工艺编号" v-width="200" v-model="easySearch.keys.value" clearable /> <Button type="primary" class="search_icon" @click="search" icon="ios-search"></Button>
<Input
placeholder="请输入工艺名称/工艺编号"
v-width="200"
v-model="easySearch.keys.value"
clearable
/>
<Button
type="primary"
class="search_icon"
@click="search"
icon="ios-search"
></Button>
</FormItem>
<FormItem>
<Button type="text" class="search_text" @click="search">高级搜索</Button>
<Button type="text" class="search_text" @click="search"
>高级搜索</Button
>
</FormItem>
</Form>
</template>
......@@ -47,24 +64,29 @@
<Search />
</template>
<template slot="buttons">
<Button type="text" @click="add" class="search_text" icon="icon iconfont iconxinzeng">新增</Button>
<Dropdown class="dropIcon" @on-click="changeMenu">
<a href="javascript:void(0)">
<Icon type="icon iconfont iconshezhi-liebiaozhanshi" class="zhanshi" />
<Icon type="ios-arrow-down" class="arrow_down"></Icon>
</a>
<DropdownMenu slot="list" >
<DropdownItem name='导入' > <Icon type="icon iconfont icondaoru" />导入</DropdownItem>
<DropdownItem name='导出' > <Icon type="icon iconfont icondaochu" />导出</DropdownItem>
</DropdownMenu>
</Dropdown>
<Button @click="openModalIm" icon="icon iconfont icondaoru" class="search_text" type="text">导入</Button>
<Button type="text" @click="add" class="yuan_add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1120" footer-hide>
<component :is="detail" :eid="curId" :uid="uId" :title="title" :headid="hid" @on-close="cancel" @on-ok="ok" />
<component
:is="detail"
:eid="curId"
:uid="uId"
:title="title"
:headid="hid"
@on-close="cancel"
@on-ok="ok"
/>
</Modal>
<Modal v-model="documentShow" title="送审" :mask-closable="false" :scrollable="true" ok-text="确定" cancel-text="取消" fullscreen>
<Modal
v-model="documentShow"
title="送审"
:mask-closable="false"
:scrollable="true"
ok-text="确定"
cancel-text="取消"
fullscreen
>
<sendAudit ref="sendAudit"></sendAudit>
<div slot="footer">
......@@ -83,28 +105,46 @@
<Icon type="ios-undo-outline" size="24" />返回工艺规程
</a>
</div>
<div class="fg tc f14 fwBold blueTitle" style="padding-right:200px;">
{{l('code')}}:
<span class="grayTitle mr10">{{titleObj.code}}</span>
{{l('name')}}:
<span class="grayTitle mr10">{{titleObj.name}}</span>
{{l('routingType')}}:
<div class="fg tc f14 fwBold blueTitle" style="padding-right: 200px">
{{ l("code") }}:
<span class="grayTitle mr10">{{ titleObj.code }}</span>
{{ l("name") }}:
<span class="grayTitle mr10">{{ titleObj.name }}</span>
{{ l("routingType") }}:
<span class="grayTitle mr10">
<state code="Process.Routing.routingType" :value="titleObj.routingType" type="text"></state>
<state
code="Process.Routing.routingType"
:value="titleObj.routingType"
type="text"
></state>
</span>
{{l('version')}}:
<span class="grayTitle">{{titleObj.version}}</span>
{{l('departmentName')}}:
<span class="grayTitle">{{titleObj.departmentName}}</span>
{{ l("version") }}:
<span class="grayTitle">{{ titleObj.version }}</span>
{{ l("departmentName") }}:
<span class="grayTitle">{{ titleObj.departmentName }}</span>
</div>
</div>
<div class="fg">
<iframe width="100%" id="infoFrame" height="100%" frameborder="0" :src="src"></iframe>
<iframe
width="100%"
id="infoFrame"
height="100%"
frameborder="0"
:src="src"
></iframe>
</div>
</div>
<ImportExcel ref="importExcel" @on-get-data="getData" :modalTitle="temTitle" :columns="columns" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
<ImportExcel
ref="importExcel"
@on-get-data="getData"
:modalTitle="temTitle"
:columns="columns"
:open="ModalIm"
@on-cancel="ModalImCancel"
@on-ok="ok"
/>
</Content>
</Layout>
</Layout>
</template>
<script>
......@@ -115,7 +155,7 @@ import ProductTree from "@/components/page/productTree.vue";
import sendAudit from "./sendAudit.vue";
import routingchangeorder from "../processDesign/Process/routingchangeorder.vue";
import changelist from "../processDesign/Process/changelist.vue";
import theme from '../theme'
import theme from "../theme";
export default {
components: {
ProductTree,
......@@ -127,7 +167,7 @@ export default {
head: {
title: "工艺规程",
author: "henq",
description: "routing_header 4/26/2020 10:12:38 AM"
description: "routing_header 4/26/2020 10:12:38 AM",
},
data() {
return {
......@@ -137,8 +177,8 @@ export default {
easySearch: {
keys: {
op: "unicode,name,code",
value: null
}
value: null,
},
},
hid: 0,
modal: false,
......@@ -150,13 +190,14 @@ export default {
curId: 0,
uId: "",
documentShow: false,
columns: [{
columns: [
{
key: "code",
title: this.l("code"),
align: "left",
width: 200,
easy: true,
high: true
high: true,
},
{
key: "name",
......@@ -172,7 +213,7 @@ export default {
align: "center",
high: true,
width: 100,
code: "Process.Routing.phase"
code: "Process.Routing.phase",
},
{
key: "versionid",
......@@ -180,14 +221,14 @@ export default {
align: "center",
high: true,
width: 100,
code: "Process.Routing.version"
code: "Process.Routing.version",
},
{
title: this.l("approvalStatus"),
key: "approvalStatus",
align: "center",
width: "120",
code: "process.RoutingStatus"
code: "process.RoutingStatus",
},
{
key: "routingType",
......@@ -195,13 +236,13 @@ export default {
align: "center",
width: 100,
high: true,
code: "Process.Routing.routingType"
code: "Process.Routing.routingType",
},
{
key: "drawingNo",
title: this.l("drawingNo"),
align: "left",
high: true
high: true,
},
{
key: "productName",
......@@ -245,7 +286,7 @@ export default {
align: "center",
width: 80,
high: true,
code: "Process.Status"
code: "Process.Status",
},
//{ key: "id", title: this.$t("id"), hide: true, align: "left" },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
......@@ -266,27 +307,27 @@ export default {
key: "creationTime",
title: this.$t("creationTime"),
align: "left",
hide: true
hide: true,
},
{
key: "creatorUserId",
title: this.$t("creatorUserId"),
align: "left",
hide: true,
type: "user"
type: "user",
},
{
key: "lastModificationTime",
title: this.$t("lastModificationTime"),
align: "left",
hide: true
hide: true,
},
{
key: "lastModifierUserId",
title: this.$t("lastModifierUserId"),
align: "left",
hide: true,
type: "user"
type: "user",
},
{
title: "操作",
......@@ -294,97 +335,111 @@ export default {
width: 260,
align: "left",
render: (h, params) => {
return h("div", {
class: "action"
}, [
return h(
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",
},
on: {
click: () => this.viewprocess(params.row)
}
click: () => this.viewprocess(params.row),
},
},
"预览"
),
h(
"op", {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",
},
on: {
click: () => this.view(params.row)
}
click: () => this.view(params.row),
},
},
"查看"
),
h(
"op", {
"op",
{
attrs: {
oprate: "copy"
oprate: "copy",
},
on: {
click: () => this.copy(params.row.id)
}
click: () => this.copy(params.row.id),
},
},
"克隆"
),
h(
"op", {
"op",
{
attrs: {
oprate: "edit"
oprate: "edit",
},
on: {
click: () => this.edit(params.row)
}
click: () => this.edit(params.row),
},
'编辑'
},
"编辑"
// params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : ""
),
h(
"op", {
"op",
{
attrs: {
oprate: "delete"
oprate: "delete",
},
on: {
click: () => this.remove(params.row.id)
}
click: () => this.remove(params.row.id),
},
params.row.approvalStatus == 4 || params.row.approvalStatus == 0 ? "删除" : ""
},
params.row.approvalStatus == 4 ||
params.row.approvalStatus == 0
? "删除"
: ""
),
h(
"op", {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",
},
on: {
click: () => this.TechnologyChange(params.row)
}
click: () => this.TechnologyChange(params.row),
},
},
params.row.approvalStatus == 1 ? "新增更改单" : ""
),
h(
"op", {
"op",
{
attrs: {
oprate: "detail"
oprate: "detail",
},
on: {
click: () => this.sendAuditFun(params.row)
}
click: () => this.sendAuditFun(params.row),
},
},
params.row.approvalStatus == 4 ? "送审" : ""
)
]);
}
}
),
]
);
},
},
],
titleObj: {
code: "", //工艺编号
name: "", //工艺名称
routingType: 0, //工艺类型
version: "", //工艺版本
departmentName: null //车间
departmentName: null, //车间
},
processviewModal: false,
ModalIm: false,
......@@ -394,10 +449,7 @@ export default {
created() {
this.treeHeight = window.innerHeight - 120;
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
......@@ -422,8 +474,8 @@ export default {
let where = {
productId: {
op: "In",
value: ids
}
value: ids,
},
};
this.$refs.grid.reload(where);
},
......@@ -435,11 +487,17 @@ export default {
name: row.name,
routingType: row.routingType,
version: row.version,
departmentName: row.departmentName
departmentName: row.departmentName,
};
// this.info=()=>import("./details")
this.src = "/technology/details?id=" + row.id + "&headerStatus=" + row.approvalStatus + "&productBomId=" + row.productBomId;
this.src =
"/technology/details?id=" +
row.id +
"&headerStatus=" +
row.approvalStatus +
"&productBomId=" +
row.productBomId;
},
viewClose() {
this.viewModal = false;
......@@ -495,7 +553,7 @@ export default {
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
......@@ -522,7 +580,7 @@ export default {
passDocument() {
this.dataListRetrun = [];
this.dataListRetrun = this.$refs.sendAudit.returnDataList();
this.$http.order.batchstart(this.dataListRetrun).then(res => {
this.$http.order.batchstart(this.dataListRetrun).then((res) => {
if (res.success) {
this.$Message.success("工艺规程送审成功!");
this.loaddata();
......@@ -546,9 +604,11 @@ export default {
this.seleId = data.row.id;
this.$refs.changelist.seleId = data.row.id;
let url = `${designUrl}/routingheaderchangeorder/getpaged`;
service.get(`${url}`, {
routing_header_id: this.seleId
}).then(res => {
service
.get(`${url}`, {
routing_header_id: this.seleId,
})
.then((res) => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items;
this.$refs.changelist.myloading = false;
......@@ -563,14 +623,18 @@ export default {
//批量导入start
//导入功能
openModalIm() {
this.ModalIm = true
this.ModalIm = true;
},
ModalImCancel() {
this.ModalIm = false
this.ModalIm = false;
},
getData(val) {
let url = `${technologyUrl}routingheaderimportservice/import`;
this.$refs.importExcel.deelData(url, this.columns, this.formatMethod(val))
this.$refs.importExcel.deelData(
url,
this.columns,
this.formatMethod(val)
);
},
//根据页面二次处理数据
formatMethod(val) {
......@@ -580,9 +644,9 @@ export default {
let obj = {
classId: null,
unicode: "",
name: ele.name ? ele.name : '',
code: ele.code ? ele.code : '',
productId: ele.productId ? ele.productId : '', //?
name: ele.name ? ele.name : "",
code: ele.code ? ele.code : "",
productId: ele.productId ? ele.productId : "", //?
productName: ele.productName ? ele.productName : "", //?
productBomId: ele.productBomId ? ele.productBomId : "", //?
drawingNo: ele.drawingNo ? ele.drawingNo : "", //?
......@@ -606,32 +670,30 @@ export default {
isSendPpm: 1,
fileId: "",
phase: ele.phase ? ele.phase : null,
isEffect: ele.isEffect ? ele.isEffect : 1
isEffect: ele.isEffect ? ele.isEffect : 1,
};
if (ele.name && ele.name != '') {
obj.ico = false
if (ele.name && ele.name != "") {
obj.ico = false;
} else {
obj.ico = true
obj.ico = true;
}
tempList.push(obj);
});
return tempList
return tempList;
},
//批量导入end
//下拉菜单事件导入
changeMenu(name){
if(name=='导入'){
changeMenu(name) {
if (name == "导入") {
openModalIm();
}
if(name=='导出'){
}
}
if (name == "导出") {
}
},
},
};
</script>
<style lang="less" scoped>
.order-quotation {
height: 100vh !important;
}
......@@ -651,5 +713,14 @@ export default {
.single-page-con {
overflow-y: hidden !important;
}
.yuan_add {
color: #747b8b;
background-color: #ffffff;
border-color: #e3e5e8;
}
.yuan_add:hover {
color: #57a3f3;
background-color: white;
border-color: #57a3f3;
}
</style>
......@@ -7,8 +7,7 @@
placeholder="请输入工艺名称/工艺编号"
v-width="280"
v-model="formInline.value"
clearable
/>
clearable/>
<Button type="primary" class="search_icon" icon="ios-search"></Button>
<Button type="text" class="search_text">高级搜索</Button>
</Form>
......@@ -46,7 +45,7 @@
<Table :border="false" stripe :columns="columns1" :data="data1">
<template
slot="action"
slot-scope="{ row, index }"
slot-scope="{ row , index }"
style="width: 100%; height: 100%"
>
<a href="" class="action-buttons"
......@@ -62,10 +61,6 @@
<Icon type="icon iconfont iconshanchu" />
删除</a
>
<!-- <a class="add mr20">
<Icon type="icon iconfont iconshanchu" />
分解</a
> -->
</div>
</a>
</template>
......@@ -78,8 +73,7 @@
type="flex"
justify="center"
align="end"
class="page_index"
>
class="page_index">
<Page :total="100" show-elevator />
</Col>
</Row>
......@@ -343,7 +337,6 @@ export default {
font-size: 22px;
}
.ivu-select-dropdown {
background-color: #222341 !important;
.ivu-dropdown-item {
color: #ffffff !important;
......@@ -402,7 +395,7 @@ export default {
position: absolute;
display: none;
right: -58px;
top: -22px;
top: -21px;
width: -webkit-max-content; // 兼容
width: -moz-max-content; // 兼容
width: max-content;
......
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