Commit f02db6e4 authored by renjintao's avatar renjintao

mesplan

parent 67ccc8b9
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<Content class="content" :class="!showMenu?'con_bord':''"> <Content class="content" :class="!showMenu?'con_bord':''">
<!--:data="dataT"--> <!--:data="dataT"-->
<DataGrid :action="action" :columns="columns" :conditions="easySearch" ref="grid" @on-selection-change="onSelect" :batch="true" :border="false" rowKey="id" exportTitle="订单管理" @on-import-data="onImportData"> <DataGrid :action="action" :columns="columns" :conditions="easySearch" ref="grid" @on-selection-change="onSelect" :batch="true" :border="false" rowKey="id">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -376,7 +376,7 @@ export default { ...@@ -376,7 +376,7 @@ export default {
h( h(
"op", { "op", {
attrs: { attrs: {
oprate: "remove" // oprate: "delete"
}, },
on: { on: {
click: () => this.remove(params.row) click: () => this.remove(params.row)
...@@ -389,14 +389,14 @@ export default { ...@@ -389,14 +389,14 @@ export default {
params.row.id != params.row.rootId || params.row.id != params.row.rootId ||
params.row.status != 1 ? params.row.status != 1 ?
"display:none" : "display:none" :
"") : ( "color:red") : (
(params.row.status == 3 && (params.row.status == 3 &&
params.row.id == params.row.rootId && params.row.id == params.row.rootId &&
params.row.divideMark != 0) || params.row.divideMark != 0) ||
params.row.id != params.row.rootId || params.row.id != params.row.rootId ||
params.row.status != 3 ? params.row.status != 3 ?
"display:none" : "display:none" :
"") "color:red")
}, },
"删除" "删除"
), ),
...@@ -770,7 +770,7 @@ export default { ...@@ -770,7 +770,7 @@ export default {
this.delMsg = ""; this.delMsg = "";
this.delNum = 0; this.delNum = 0;
this.actIds = []; this.actIds = [];
this.$refs.grid.cancelFooterToolbar(); //this.$refs.grid.cancelFooterToolbar();
this.actIds.push(row.id); this.actIds.push(row.id);
if (row.id != row.rootId) { if (row.id != row.rootId) {
this.sondeletecheck(row.rootId); this.sondeletecheck(row.rootId);
......
<template> <template>
<Layout class="quotation"> <Layout class="quotation">
<!-- 左侧树 --> <!-- 左侧树 -->
<!-- <Sider hide-trigger :style="{background: '#fff'}" width="260"> <!-- <Sider hide-trigger :style="{background: '#fff'}" width="260">
<Tree-Type @func="getMsgFormSon" :style="{ height: treeHeight + 'px' }"></Tree-Type> <Tree-Type @func="getMsgFormSon" :style="{ height: treeHeight + 'px' }"></Tree-Type>
</Sider>--> </Sider>-->
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" /> <ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider> </Sider>
<div v-if="!showMenu" class="show_menu"> <div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开"> <a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" /> <Icon type="ios-arrow-forward" size="24" />
</a> </a>
</div> </div>
<!-- 右侧内容 --> <!-- 右侧内容 -->
<Content class="content" :class="!showMenu?'con_bord':''"> <Content class="content" :class="!showMenu?'con_bord':''">
<Tabs v-model="selectName" @on-click="handleClick"> <Tabs v-model="selectName" @on-click="handleClick">
<TabPane label="订单报价" key="offer" name="offer"> <TabPane label="订单报价" key="offer" name="offer">
<div class="search-form"> <div class="search-form">
<Row> <Row>
<Col span="12" style="display: flex;"> <Col span="12" style="display: flex;">
<Input <Input search v-model="mesCode" enter-button placeholder="订单编号、产品编码..." @on-search="easySearch(mesCode)" style="width:235px;flaot:left;" />
search <Button @click="advancedSearch" type="primary" style="margin-left:8px;">高级搜索</Button>
v-model="mesCode" </Col>
enter-button <Col span="12" style=" text-align: right;">
placeholder="订单编号、产品编码..." <Button type="primary" @click="orderQuotation">订单报价</Button>
@on-search="easySearch(mesCode)" <div @click="drawerShow = true" class="divIco">
style="width:235px;flaot:left;" <Icon type="ios-list" class="icoListInfo" />
/> </div>
<Button @click="advancedSearch" type="primary" style="margin-left:8px;">高级搜索</Button> </Col>
</Col> </Row>
<Col span="12" style=" text-align: right;">
<Button type="primary" @click="orderQuotation">订单报价</Button>
<div @click="drawerShow = true" class="divIco">
<Icon type="ios-list" class="icoListInfo" />
</div> </div>
</Col> <div style="margin-top:10px;">
</Row> <Table border highlight-row ref="selection" :columns="newColumn" :data="dataTable" :loading="loading" :height="tableHeight" class="tableCommon" @on-selection-change="selectInfo"></Table>
</div> </div>
<div style="margin-top:10px;"> </TabPane>
<Table <TabPane label="报价记录" key="record" name="record">
border <Input search enter-button placeholder="订单编号、报价单编号..." v-model="mesCodeT" @on-search="jlSearch(mesCodeT)" style="width:235px;flaot:left;" />
highlight-row <div style="margin-top:10px;">
ref="selection" <Table border ref="selection" :columns="recordColumn" :data="recordTable" :loading="loading" class="tableCommon" :height="tableHeight"></Table>
:columns="newColumn" </div>
:data="dataTable" </TabPane>
:loading="loading" </Tabs>
:height="tableHeight" <Page style="margin-top:10px;" show-elevator show-sizer :total="total" :page-size-opts="showPagesize" :page-size="pageSize" :current="current" @on-change="pageChange" @on-page-size-change="pageSizeChange" />
class="tableCommon"
@on-selection-change="selectInfo"
></Table>
</div>
</TabPane>
<TabPane label="报价记录" key="record" name="record">
<Input
search
enter-button
placeholder="订单编号、报价单编号..."
v-model="mesCodeT"
@on-search="jlSearch(mesCodeT)"
style="width:235px;flaot:left;"
/>
<div style="margin-top:10px;">
<Table
border
ref="selection"
:columns="recordColumn"
:data="recordTable"
:loading="loading"
class="tableCommon"
:height="tableHeight"
></Table>
</div>
</TabPane>
</Tabs>
<Page
style="margin-top:10px;"
show-elevator
show-sizer
:total="total"
:page-size-opts="showPagesize"
:page-size="pageSize"
:current="current"
@on-change="pageChange"
@on-page-size-change="pageSizeChange"
/>
</Content> </Content>
<!-- 待审核弹框 --> <!-- 待审核弹框 -->
<Modal v-model="modalDai" width="360" :mask-closable="false" title="待审核"> <Modal v-model="modalDai" width="360" :mask-closable="false" title="待审核">
<Form :model="formItem" :label-width="80"> <Form :model="formItem" :label-width="80">
<FormItem label="审核状态"> <FormItem label="审核状态">
<RadioGroup v-model="formItem.animal"> <RadioGroup v-model="formItem.animal">
<Radio label="3">通过</Radio> <Radio label="3">通过</Radio>
<Radio label="4">未通过</Radio> <Radio label="4">未通过</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem label="备注"> <FormItem label="备注">
<Input <Input v-model="formItem.auditIdea" type="textarea" :autosize="{ minRows: 2, maxRows: 5 }" placeholder="Enter something..."></Input>
v-model="formItem.auditIdea" </FormItem>
type="textarea" </Form>
:autosize="{ minRows: 2, maxRows: 5 }" <div slot="footer">
placeholder="Enter something..." <Button type="primary" size="large" @click="dal">确认</Button>
></Input> </div>
</FormItem>
</Form>
<div slot="footer">
<Button type="primary" size="large" @click="dal">确认</Button>
</div>
</Modal> </Modal>
<!-- 待送审弹框--> <!-- 待送审弹框-->
<Modal v-model="modalSong" width="360" :mask-closable="false" title="待审核"> <Modal v-model="modalSong" width="360" :mask-closable="false" title="待审核">
<div class="shenpi"> <div class="shenpi">
<label>审批人:</label> <label>审批人:</label>
<UserSelect ref="userSelected" v-model="model1" style="width:240px;" /> <UserSelect ref="userSelected" v-model="model1" style="width:240px;" />
</div> </div>
<div slot="footer"> <div slot="footer">
<Button type="primary" size="large" @click="dalSong">确认</Button> <Button type="primary" size="large" @click="dalSong">确认</Button>
</div> </div>
</Modal> </Modal>
<!-- 列设置抽屉 --> <!-- 列设置抽屉 -->
<Drawer-Set <Drawer-Set :isShow="drawerShow" :tcolumn="column" :newColumn="newColumn" @close="drawerShow = false" @updateCol="updateColumn"></Drawer-Set>
:isShow="drawerShow"
:tcolumn="column"
:newColumn="newColumn"
@close="drawerShow = false"
@updateCol="updateColumn"
></Drawer-Set>
<!-- 高级搜索弹框 --> <!-- 高级搜索弹框 -->
<Search-Box ref="searchBox" @heightSearch="gSearch"></Search-Box> <Search-Box ref="searchBox" @heightSearch="gSearch"></Search-Box>
<!-- 订单报价 --> <!-- 订单报价 -->
...@@ -134,17 +81,9 @@ ...@@ -134,17 +81,9 @@
<Metal-Details ref="metalDetail" :resultDetils="resultDetils"></Metal-Details> <Metal-Details ref="metalDetail" :resultDetils="resultDetils"></Metal-Details>
<Photosensitive-Details ref="photosensitiveDetail" :resultDetils="resultDetils"></Photosensitive-Details> <Photosensitive-Details ref="photosensitiveDetail" :resultDetils="resultDetils"></Photosensitive-Details>
<!-- 报价记录里送审 --> <!-- 报价记录里送审 -->
<MetalQuotation-Generation <MetalQuotation-Generation ref="metalQuotationExamine" :childData="zPhotosensitive" @update="update"></MetalQuotation-Generation>
ref="metalQuotationExamine" <Photosensitive-Generation ref="photosensitiveExamine" :childData="zPhotosensitive" @update="update"></Photosensitive-Generation>
:childData="zPhotosensitive" </Layout>
@update="update"
></MetalQuotation-Generation>
<Photosensitive-Generation
ref="photosensitiveExamine"
:childData="zPhotosensitive"
@update="update"
></Photosensitive-Generation>
</Layout>
</template> </template>
<script> <script>
...@@ -160,700 +99,750 @@ import ProductTree from "@/components/page/productTree.vue"; //左侧树列表 ...@@ -160,700 +99,750 @@ import ProductTree from "@/components/page/productTree.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"; //生成报价单弹框
export default { export default {
components: { components: {
DrawerSet, DrawerSet,
QuotationBox, QuotationBox,
TreeType, TreeType,
SearchBox, SearchBox,
MetalQuotation, MetalQuotation,
Photosensitive, Photosensitive,
MetalDetails, MetalDetails,
PhotosensitiveDetails, PhotosensitiveDetails,
ProductTree, ProductTree,
MetalQuotationGeneration, MetalQuotationGeneration,
PhotosensitiveGeneration PhotosensitiveGeneration
}, },
data() { data() {
return { return {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
status: "", status: "",
userId: 0, userId: 0,
showMenu: true, showMenu: true,
model1: "", model1: "",
rows: {}, rows: {},
modalDai: false, //待审核 modalDai: false, //待审核
modal_loading: false, modal_loading: false,
modalSong: false, modalSong: false,
formItem: { formItem: {
auditIdea: "", auditIdea: "",
animal: "3" animal: "3"
}, },
cxResult: [], cxResult: [],
orderSearchForm: {}, //高级搜索 orderSearchForm: {}, //高级搜索
mesCode: "", //搜索 mesCode: "", //搜索
mesCodeT: "", mesCodeT: "",
simpleSearch: "", simpleSearch: "",
resultDetils: [], //报价记录详情 resultDetils: [], //报价记录详情
materialId: "", //用料id判断订单报价为铺粉还是光敏 materialId: "", //用料id判断订单报价为铺粉还是光敏
total: null, total: null,
bjData: [], bjData: [],
newJsData: [], newJsData: [],
remark: "", remark: "",
Party: false, Party: false,
productId: "", productId: "",
selectName: "offer", selectName: "offer",
recordColumn: [], //报价记录 recordColumn: [], //报价记录
recordTable: [], //报价记录 recordTable: [], //报价记录
loading: true, loading: true,
treeHeight: "", treeHeight: "",
showPagesize: [20, 50, 100], showPagesize: [20, 50, 100],
pageSize: 20, pageSize: 20,
current: 1, //当前页 整形 选填 默认1 current: 1, //当前页 整形 选填 默认1
treeData: [], treeData: [],
value1: false, value1: false,
drawerShow: false, drawerShow: false,
newColumn: [], //订单报价 newColumn: [], //订单报价
tableHeight: "", tableHeight: "",
column: [ column: [{
{ type: "selection", width: 70, align: "center", fixed: "left" }, type: "selection",
{ width: 70,
title: "序号", align: "center",
type: "index", fixed: "left"
width: 70, },
align: "center", {
fixed: "left" title: "序号",
type: "index",
width: 70,
align: "center",
fixed: "left"
},
{
title: "订单编号",
key: "mesCode",
minWidth: 200,
align: "center",
fixed: "left"
},
{
title: "产品名称",
key: "productName",
width: 120,
fixed: "left"
},
{
title: "报价状态",
key: "orderQuotationStatus",
align: "center",
width: 120,
fixed: "left",
filters: this.getArry(
this.$store.getters.dictionaryByKey(
"plan.quotation.orderQuotationStatusName"
)
),
filterMethod(value, row) {
let statusChar = row.orderQuotationStatus + "";
return statusChar.indexOf(value) > -1;
},
render: (h, params) => {
return h("state", {
props: {
code: "plan.quotation.orderQuotationStatusName",
type: "text",
value: params.row.orderQuotationStatus + ""
}
});
}
},
{
title: "任务类型",
key: "taskType",
width: 120,
filters: this.getArry(
this.$store.getters.dictionaryByKey("plan.order.taskType")
),
filterMethod(value, row) {
return row.taskType.indexOf(value) > -1;
},
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.taskType",
type: "text",
value: params.row.taskType + ""
}
});
}
},
{
title: "阶段",
key: "stage",
width: 80,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.stage",
type: "text",
value: params.row.stage + ""
}
});
}
},
{
title: "材料",
key: "materialId",
width: 100,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.material",
type: "text",
value: params.row.materialId ? (params.row.materialId + "") : ""
}
});
}
},
{
title: "数量",
key: "quantity",
minWidth: 80,
align: "right"
},
{
title: "甲方客户",
key: "guestName",
width: 120,
tooltip: true,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.guestName",
type: "text",
value: params.row.guestName + ""
}
});
}
},
{
title: "3D打印承制单位",
key: "printSupply",
width: 160,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.printSupply",
type: "text",
value: params.row.printSupply + ""
}
});
}
},
{
title: "厂内责任机关",
key: "functionaryOffice",
width: 140
},
{
title: "厂内主体责任部门",
key: "mainDepartmentId",
width: 180,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.mainDepartment",
type: "text",
value: params.row.mainDepartmentId + ""
}
});
}
},
{
title: "备注",
key: "remark",
width: 120,
tooltip: true
},
{
title: "任务输入日期",
key: "taskInputDate",
width: 180,
align: "center"
},
{
title: "任务节点要求",
key: "taskRequire",
width: 150
},
{
title: "甲方投产输入文件(编号)",
key: "putintDocmentCode",
width: 220
},
{
title: "甲方技术输入文件(编号)",
key: "technologyDocmentCode",
width: 220
},
{
title: "外部图号/模型号",
key: "outerDrawnNumber",
width: 180
},
{
title: "模型版本",
key: "modelVersion",
width: 120
},
{
title: "甲方任务号",
key: "taskCode",
width: 120
},
{
title: "甲方设计人员",
key: "designer",
width: 150
},
{
title: "厂内机关负责人",
key: "officeFunctionary",
width: 150
},
{
title: "厂内主工艺人员",
key: "mainRoutingPeople",
width: 150
}
],
dataTable: []
};
},
created() {
this.treeHeight = window.innerHeight - 140;
this.tableHeight = window.innerHeight - 250;
this.newColumn = this.column;
this.tableTata(this.selectName);
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 140;
this.tableHeight = window.innerHeight - 250;
})();
};
},
methods: {
onHide() {
this.showMenu = false;
}, },
{ showMenuFn() {
title: "订单编号", this.showMenu = true;
key: "mesCode",
minWidth: 200,
align: "center",
fixed: "left"
}, },
{ title: "产品名称", key: "productName", width: 120, fixed: "left" }, productSearch(id, item, ids) {
{ // console.log(item)
title: "报价状态", this.getMsgFormSon(ids);
key: "orderQuotationStatus", // let where = { productId: { op: "In", value: ids } };
align: "center", // this.$refs.grid.reload(where);
width: 120,
fixed: "left",
filters: this.getArry(
this.$store.getters.dictionaryByKey(
"plan.quotation.orderQuotationStatusName"
)
),
filterMethod(value, row) {
let statusChar = row.orderQuotationStatus + "";
return statusChar.indexOf(value) > -1;
},
render: (h, params) => {
return h("state", {
props: {
code: "plan.quotation.orderQuotationStatusName",
type: "text",
value: params.row.orderQuotationStatus + ""
}
});
}
}, },
{ update() {
title: "任务类型", this.tableTata(this.selectName);
key: "taskType",
width: 120,
filters: this.getArry(
this.$store.getters.dictionaryByKey("plan.order.taskType")
),
filterMethod(value, row) {
return row.taskType.indexOf(value) > -1;
},
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.taskType",
type: "text",
value: params.row.taskType + ""
}
});
}
}, },
{ getMsgFormSon(data) {
title: "阶段", // console.log(data)
key: "stage", this.productId = data.join(",");
width: 80, this.tableTata(this.selectName);
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.stage",
type: "text",
value: params.row.stage + ""
}
});
}
}, },
{ //select选项 多选
title: "材料", selectInfo(val) {
key: "materialId", this.bjData = val;
width: 100, var list = [];
render: (h, params) => { var listId = [];
return h("state", { val.forEach(data => {
props: { list.push(data.guestName);
code: "plan.order.material", listId.push(data.materialId);
type: "text", for (var i = 0; i < list.length; i++) {
value: params.row.materialId + "" if (list[i] === data.guestName) {
} for (var j = 0; j < listId.length; j++) {
if (listId[j] === data.materialId) {
return (this.Party = true);
} else {
this.$Message.info("请选择同一个材质进行报价");
return (this.Party = false);
}
}
} else {
this.$Message.info("请选择同一个甲方客户");
return (this.Party = false);
}
}
}); });
}
}, },
{ title: "数量", key: "quantity", minWidth: 80, align: "right" }, //tab切换
{ handleClick(name) {
title: "甲方客户", this.selectName = name;
key: "guestName", this.tableTata(this.selectName);
width: 120,
tooltip: true,
render: (h, params) => {
return h("state", {
props: {
code: "plan.order.guestName",
type: "text",
value: params.row.guestName + ""
}
});
}
}, },
{ tableTata() {
title: "3D打印承制单位", console.log(this.selectName);
key: "printSupply", if (this.selectName == "offer") {
width: 160, this.$http.quotation
render: (h, params) => { .getListTable({
return h("state", { productId: this.productId,
props: { pageSize: this.pageSize,
code: "plan.order.printSupply", current: this.current,
type: "text", mesCode: this.mesCode,
value: params.row.printSupply + "" productName: this.orderSearchForm.productName, //产品名称
} orderQuotationStatus: this.orderSearchForm.status, //状态
}); taskType: this.orderSearchForm.taskType, //任务类型
} stage: this.orderSearchForm.stage, //阶段
materialId: this.orderSearchForm.materialId, //材料
putintDocmentCode: this.orderSearchForm.putintDocmentCode, //甲方投产输入文件(编号)
guestName: this.orderSearchForm.guestName, //甲方客户
printSupply: this.orderSearchForm.printSupply, //3D打印
functionaryOffice: this.orderSearchForm.functionaryOffice, //厂内责任机关
mainDepartmentId: this.orderSearchForm.mainDepartmentId //厂内责任主体部门
})
.then(res => {
this.loading = false;
this.total = res.result.totalCount;
res.result.items.forEach(u => {
if (u.orderQuotationStatus === 0) {
u._disabled = false;
} else {
u._disabled = true;
}
});
this.dataTable = res.result.items;
this.materialId = res.result.items[0].materialId;
});
}
if (this.selectName == "record") {
this.recordColumn = [{
type: "index",
width: 65,
title: "序号",
align: "center"
},
{
title: "报价单编号",
key: "code",
align: "center",
render: (h, params) =>
h("div", [
h(
"a", {
on: {
click: () => {
this.infoDetail(params.row);
}
}
},
params.row.code
)
])
},
{
title: "报价时间",
key: "creationTime",
align: "center"
},
{
title: "制单人",
key: "maker",
align: "center"
},
{
title: "发往单位",
key: "postCompany",
align: "center"
},
{
title: "联系人",
key: "contactUser",
align: "center"
},
{
title: "电话",
key: "contactTel",
align: "center"
},
{
title: "报价状态",
key: "status",
align: "center",
width: 120,
filters: this.getArry(
this.$store.getters.dictionaryByKey(
"plan.quotation.orderQuotationStatusName"
)
),
filterMethod(value, row) {
let statusChar = row.status + "";
return statusChar.indexOf(value) > -1;
},
render: (h, params) => {
return h(
"a", {
// on: {
// click: () => {
// this.statusData(params.row)
// }
// }
},
[
h("state", {
props: {
code: "plan.quotation.orderQuotationStatusName",
type: "text",
value: params.row.status + ""
}
})
]
);
}
},
{
title: "备注",
key: "remark",
align: "center"
},
{
title: "操作",
key: "action",
width: 150,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
params.row.status === 3 || params.row.status === 4 ?
"op" :
params.row.status === 1 ?
"op" :
"", {
attrs: {
oprate: "detail"
},
on: {
click: () => {
if (params.row.status === 1) {
this.resetGeneration(params.row);
} else {
this.requote(params.row);
}
}
}
},
(params.row.status === 3 || params.row.status === 4) &&
!params.row.upCode ?
"重新报价" :
params.row.status === 1 && this.status == 0 ?
"送审" :
""
)
]);
}
}
];
this.$http.quotation
.quotationRecordList({
pageSize: this.pageSize,
current: this.current,
mesCode: this.mesCodeT
})
.then(res => {
console.log(res);
this.loading = false;
this.recordTable = res.result.items;
this.total = res.result.totalCount;
// recordTable
})
.catch(error => {});
}
},
updateColumn(checkShowColumn) {
this.newColumn = checkShowColumn;
},
//订单报价按钮
orderQuotation() {
// 通过甲方客户判断定价报单的类型(类型分为三种情况:铺粉、光敏、外协)
this.newJsData = [];
if (this.Party === true) {
this.bjData.forEach(data => {
let obj = {
mesCode: data.mesCode,
orderId: data.id,
productName: data.productName,
num: data.quantity,
sizeCheckPrice: ""
};
this.newJsData.push(obj);
this.materialId = data.materialId;
});
//用料id判断订单报价为铺粉还是光敏
if (this.materialId == 2) {
//光敏
this.$refs.photosensitive.modalShow = true;
this.$refs.photosensitive.formItem = {};
this.$refs.photosensitive.formItem.quotationType = "光敏树脂";
} else {
//铺粉
this.$refs.metalQuotation.modalShow = true;
this.$refs.metalQuotation.formItem = {};
this.$refs.metalQuotation.formItem.quotationType = "AlSi10Mg";
}
} else {
this.$Message.info("请选择至少一个订单,并为同一个甲方客户");
}
},
//报价状态
statusData(row) {
this.userId = this.$store.state.userInfo.userId;
if (row.status === 2) {
if (row.auditUser == this.userId) {
//待审核
this.modalDai = true;
this.rows = {};
this.rows = row;
} else {
this.$Message.error("您不是当前数据处理的指定人员");
}
} else if (row.status === 1) {
if (row.creatorUserId == this.userId) {
//待送审
this.modalSong = true;
this.rows = {};
this.rows = row;
} else {
this.$Message.error("您不是当前数据的创建人员,不能进行送审");
}
}
},
dal() {
var data = {
id: this.rows.id,
status: this.formItem.animal,
auditIdea: this.formItem.auditIdea,
orderIds: this.rows.orderIds.join(",")
};
this.$http.quotation
.submitCensorship(data)
.then(res => {
this.modalDai = false;
this.tableTata(this.selectName);
})
.then(error => {
this.$Message.error(error.result.message);
});
}, },
{ title: "厂内责任机关", key: "functionaryOffice", width: 140 }, dalSong() {
{ var data = {
title: "厂内主体责任部门", auditUser: parseInt(this.model1),
key: "mainDepartmentId", id: this.rows.id,
width: 180, status: this.rows.status + 1,
render: (h, params) => { orderIds: this.rows.orderIds.join(",")
return h("state", { };
props: { this.$http.quotation.submitCensorship(data).then(res => {
code: "plan.order.mainDepartment", this.modalSong = false;
type: "text", this.tableTata(this.selectName);
value: params.row.mainDepartmentId + ""
}
}); });
}
}, },
{ title: "备注", key: "remark", width: 120, tooltip: true }, //高级搜索
{ advancedSearch() {
title: "任务输入日期", this.$refs.searchBox.modalShow = true;
key: "taskInputDate",
width: 180,
align: "center"
}, },
{ title: "任务节点要求", key: "taskRequire", width: 150 }, gSearch(data) {
{ this.orderSearchForm = data;
title: "甲方投产输入文件(编号)", this.$refs.searchBox.modalShow = false;
key: "putintDocmentCode", this.tableTata(this.selectName);
width: 220
}, },
{ //搜索查询
title: "甲方技术输入文件(编号)", easySearch(val) {
key: "technologyDocmentCode", this.mesCode = val;
width: 220 this.simpleSearch = "SimpleSearch";
this.tableTata(this.selectName);
}, },
{ title: "外部图号/模型号", key: "outerDrawnNumber", width: 180 }, //报价记录搜索
{ title: "模型版本", key: "modelVersion", width: 120 }, jlSearch(val) {
{ title: "甲方任务号", key: "taskCode", width: 120 }, console.log(val);
{ title: "甲方设计人员", key: "designer", width: 150 }, this.mesCodeT = val;
{ title: "厂内机关负责人", key: "officeFunctionary", width: 150 }, // this.simpleSearch = 'SimpleSearch'
{ title: "厂内主工艺人员", key: "mainRoutingPeople", width: 150 } this.tableTata(this.selectName);
], },
dataTable: [] //重新报价
}; requote(row) {
}, this.newJsData = [];
created() { if (row.quotationType == "AlSi10Mg") {
this.treeHeight = window.innerHeight - 140; //铺粉
this.tableHeight = window.innerHeight - 250; this.$refs.metalQuotation.modalShow = true;
this.newColumn = this.column; } else if (row.quotationType == "光敏树脂") {
this.tableTata(this.selectName); this.$refs.photosensitive.modalShow = true;
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 140;
this.tableHeight = window.innerHeight - 250;
})();
};
},
methods: {
onHide() {
this.showMenu = false;
},
showMenuFn() {
this.showMenu = true;
},
productSearch(id, item, ids) {
// console.log(item)
this.getMsgFormSon(ids);
// let where = { productId: { op: "In", value: ids } };
// this.$refs.grid.reload(where);
},
update() {
this.tableTata(this.selectName);
},
getMsgFormSon(data) {
// console.log(data)
this.productId = data.join(",");
this.tableTata(this.selectName);
},
//select选项 多选
selectInfo(val) {
this.bjData = val;
var list = [];
var listId = [];
val.forEach(data => {
list.push(data.guestName);
listId.push(data.materialId);
for (var i = 0; i < list.length; i++) {
if (list[i] === data.guestName) {
for (var j = 0; j < listId.length; j++) {
if (listId[j] === data.materialId) {
return (this.Party = true);
} else {
this.$Message.info("请选择同一个材质进行报价");
return (this.Party = false);
}
} }
} else {
this.$Message.info("请选择同一个甲方客户"); this.$http.quotation
return (this.Party = false); .orderList({
} id: row.id
} })
}); .then(res => {
}, this.loading = false;
//tab切换 this.newJsData = res.result;
handleClick(name) { this.cxResult = res.result;
this.selectName = name; this.newJsData.forEach(el => {
this.tableTata(this.selectName); return (el.id = null);
}, });
tableTata() { this.$refs.metalQuotation.formItem.quotationId = row.id;
console.log(this.selectName); this.$refs.metalQuotation.formItem.postCompany = this.cxResult[0].postCompany;
if (this.selectName == "offer") { this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].contactUser;
this.$http.quotation this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].contactTel;
.getListTable({ this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].quotationType;
productId: this.productId, this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].remark;
pageSize: this.pageSize, this.$refs.photosensitive.formItem.postCompany = this.cxResult[0].postCompany;
current: this.current, this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].contactUser;
mesCode: this.mesCode, this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].contactTel;
productName: this.orderSearchForm.productName, //产品名称 this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].quotationType;
orderQuotationStatus: this.orderSearchForm.status, //状态 this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].remark;
taskType: this.orderSearchForm.taskType, //任务类型 this.$refs.metalQuotation.formItem.quotationId = row.id;
stage: this.orderSearchForm.stage, //阶段 })
materialId: this.orderSearchForm.materialId, //材料 .catch(error => {
putintDocmentCode: this.orderSearchForm.putintDocmentCode, //甲方投产输入文件(编号) this.$Message.error("请求失败");
guestName: this.orderSearchForm.guestName, //甲方客户 });
printSupply: this.orderSearchForm.printSupply, //3D打印 },
functionaryOffice: this.orderSearchForm.functionaryOffice, //厂内责任机关
mainDepartmentId: this.orderSearchForm.mainDepartmentId //厂内责任主体部门 // 分页
}) pageChange(num) {
.then(res => { this.current = num;
this.loading = false; this.tableTata(this.selectName);
this.total = res.result.totalCount; },
res.result.items.forEach(u => { pageSizeChange(limit) {
if (u.orderQuotationStatus === 0) { //console.log(limit)
u._disabled = false; this.pageSize = limit;
} else { this.tableTata(this.selectName);
u._disabled = true; },
} //详情
}); infoDetail(row) {
this.dataTable = res.result.items; //判断报价单类型是金属还是光敏
this.materialId = res.result.items[0].materialId; if (row.quotationType == "AlSi10Mg") {
}); this.$refs.metalDetail.modalShow = true;
}
if (this.selectName == "record") {
this.recordColumn = [
{
type: "index",
width: 65,
title: "序号",
align: "center"
},
{
title: "报价单编号",
key: "code",
align: "center",
render: (h, params) =>
h("div", [
h(
"a",
{
on: {
click: () => {
this.infoDetail(params.row);
}
}
},
params.row.code
)
])
},
{
title: "报价时间",
key: "creationTime",
align: "center"
},
{
title: "制单人",
key: "maker",
align: "center"
},
{
title: "发往单位",
key: "postCompany",
align: "center"
},
{
title: "联系人",
key: "contactUser",
align: "center"
},
{
title: "电话",
key: "contactTel",
align: "center"
},
{
title: "报价状态",
key: "status",
align: "center",
width: 120,
filters: this.getArry(
this.$store.getters.dictionaryByKey(
"plan.quotation.orderQuotationStatusName"
)
),
filterMethod(value, row) {
let statusChar = row.status + "";
return statusChar.indexOf(value) > -1;
},
render: (h, params) => {
return h(
"a",
{
// on: {
// click: () => {
// this.statusData(params.row)
// }
// }
},
[
h("state", {
props: {
code: "plan.quotation.orderQuotationStatusName",
type: "text",
value: params.row.status + ""
}
})
]
);
} }
}, if (row.quotationType == "光敏树脂") {
{ this.$refs.photosensitiveDetail.modalShow = true;
title: "备注",
key: "remark",
align: "center"
},
{
title: "操作",
key: "action",
width: 150,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
params.row.status === 3 || params.row.status === 4
? "op"
: params.row.status === 1
? "op"
: "",
{
attrs: {
oprate: "detail"
},
on: {
click: () => {
if (params.row.status === 1) {
this.resetGeneration(params.row);
} else {
this.requote(params.row);
}
}
}
},
(params.row.status === 3 || params.row.status === 4) &&
!params.row.upCode
? "重新报价"
: params.row.status === 1 && this.status == 0
? "送审"
: ""
)
]);
} }
} this.$http.quotation
]; .orderList({
this.$http.quotation id: row.id
.quotationRecordList({ })
pageSize: this.pageSize, .then(res => {
current: this.current, console.log(res);
mesCode: this.mesCodeT this.resultDetils = res.result;
}) console.log(this.resultDetils);
.then(res => { })
console.log(res); .catch(error => {
this.loading = false; this.$Message.error("请求失败");
this.recordTable = res.result.items; });
this.total = res.result.totalCount; },
// recordTable //重新送审
}) resetGeneration(row) {
.catch(error => {}); //判断报价单类型是金属还是光敏 当前除了ALSi10Mg的类型以外,其他的都是光敏树脂型
} if (row.quotationType == "AlSi10Mg") {
}, this.$refs.metalQuotationExamine.modalShow = true;
updateColumn(checkShowColumn) { }
this.newColumn = checkShowColumn; if (row.quotationType == "光敏树脂") {
}, this.$refs.photosensitiveExamine.modalShow = true;
//订单报价按钮 }
orderQuotation() { this.$http.quotation
// 通过甲方客户判断定价报单的类型(类型分为三种情况:铺粉、光敏、外协) .orderList({
this.newJsData = []; id: row.id
if (this.Party === true) { })
this.bjData.forEach(data => { .then(res => {
let obj = { this.zPhotosensitive.result = res.result;
mesCode: data.mesCode, })
orderId: data.id, .catch(error => {
productName: data.productName, this.$Message.error("请求失败");
num: data.quantity, });
sizeCheckPrice: "" },
}; //得到数据字典对应的label和value,用于table排序
this.newJsData.push(obj); getArry(arryList) {
this.materialId = data.materialId; let arry = [];
}); arryList.forEach(data => {
//用料id判断订单报价为铺粉还是光敏 var that = this;
if (this.materialId == 2) { let arryObj = {};
//光敏 arryObj["label"] = data.name;
this.$refs.photosensitive.modalShow = true; arryObj["value"] = data.code;
this.$refs.photosensitive.formItem = {}; arry.push(arryObj);
this.$refs.photosensitive.formItem.quotationType = "光敏树脂"; });
} else { return arry;
//铺粉
this.$refs.metalQuotation.modalShow = true;
this.$refs.metalQuotation.formItem = {};
this.$refs.metalQuotation.formItem.quotationType = "AlSi10Mg";
}
} else {
this.$Message.info("请选择至少一个订单,并为同一个甲方客户");
}
},
//报价状态
statusData(row) {
this.userId = this.$store.state.userInfo.userId;
if (row.status === 2) {
if (row.auditUser == this.userId) {
//待审核
this.modalDai = true;
this.rows = {};
this.rows = row;
} else {
this.$Message.error("您不是当前数据处理的指定人员");
}
} else if (row.status === 1) {
if (row.creatorUserId == this.userId) {
//待送审
this.modalSong = true;
this.rows = {};
this.rows = row;
} else {
this.$Message.error("您不是当前数据的创建人员,不能进行送审");
} }
}
},
dal() {
var data = {
id: this.rows.id,
status: this.formItem.animal,
auditIdea: this.formItem.auditIdea,
orderIds: this.rows.orderIds.join(",")
};
this.$http.quotation
.submitCensorship(data)
.then(res => {
this.modalDai = false;
this.tableTata(this.selectName);
})
.then(error => {
this.$Message.error(error.result.message);
});
},
dalSong() {
var data = {
auditUser: parseInt(this.model1),
id: this.rows.id,
status: this.rows.status + 1,
orderIds: this.rows.orderIds.join(",")
};
this.$http.quotation.submitCensorship(data).then(res => {
this.modalSong = false;
this.tableTata(this.selectName);
});
},
//高级搜索
advancedSearch() {
this.$refs.searchBox.modalShow = true;
},
gSearch(data) {
this.orderSearchForm = data;
this.$refs.searchBox.modalShow = false;
this.tableTata(this.selectName);
},
//搜索查询
easySearch(val) {
this.mesCode = val;
this.simpleSearch = "SimpleSearch";
this.tableTata(this.selectName);
},
//报价记录搜索
jlSearch(val) {
console.log(val);
this.mesCodeT = val;
// this.simpleSearch = 'SimpleSearch'
this.tableTata(this.selectName);
},
//重新报价
requote(row) {
this.newJsData = [];
if (row.quotationType == "AlSi10Mg") {
//铺粉
this.$refs.metalQuotation.modalShow = true;
} else if (row.quotationType == "光敏树脂") {
this.$refs.photosensitive.modalShow = true;
}
this.$http.quotation
.orderList({
id: row.id
})
.then(res => {
this.loading = false;
this.newJsData = res.result;
this.cxResult = res.result;
this.newJsData.forEach(el => {
return (el.id = null);
});
this.$refs.metalQuotation.formItem.quotationId = row.id;
this.$refs.metalQuotation.formItem.postCompany = this.cxResult[0].postCompany;
this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].contactUser;
this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].contactTel;
this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].quotationType;
this.$refs.metalQuotation.formItem.contactUser = this.cxResult[0].remark;
this.$refs.photosensitive.formItem.postCompany = this.cxResult[0].postCompany;
this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].contactUser;
this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].contactTel;
this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].quotationType;
this.$refs.photosensitive.formItem.contactUser = this.cxResult[0].remark;
this.$refs.metalQuotation.formItem.quotationId = row.id;
})
.catch(error => {
this.$Message.error("请求失败");
});
},
// 分页
pageChange(num) {
this.current = num;
this.tableTata(this.selectName);
},
pageSizeChange(limit) {
//console.log(limit)
this.pageSize = limit;
this.tableTata(this.selectName);
},
//详情
infoDetail(row) {
//判断报价单类型是金属还是光敏
if (row.quotationType == "AlSi10Mg") {
this.$refs.metalDetail.modalShow = true;
}
if (row.quotationType == "光敏树脂") {
this.$refs.photosensitiveDetail.modalShow = true;
}
this.$http.quotation
.orderList({
id: row.id
})
.then(res => {
console.log(res);
this.resultDetils = res.result;
console.log(this.resultDetils);
})
.catch(error => {
this.$Message.error("请求失败");
});
},
//重新送审
resetGeneration(row) {
//判断报价单类型是金属还是光敏 当前除了ALSi10Mg的类型以外,其他的都是光敏树脂型
if (row.quotationType == "AlSi10Mg") {
this.$refs.metalQuotationExamine.modalShow = true;
}
if (row.quotationType == "光敏树脂") {
this.$refs.photosensitiveExamine.modalShow = true;
}
this.$http.quotation
.orderList({
id: row.id
})
.then(res => {
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
});
},
//得到数据字典对应的label和value,用于table排序
getArry(arryList) {
let arry = [];
arryList.forEach(data => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
} }
}
}; };
</script> </script>
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