This commit is contained in:
liushuai
2019-04-13 14:50:15 +08:00
25 changed files with 1489 additions and 429 deletions

View File

@@ -7,8 +7,8 @@ const os = require('os')
const networkInterfaces = os.networkInterfaces()
const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address
// const ip = networkInterfaces['WLAN'][1] ? networkInterfaces['WLAN'][1].address : networkInterfaces['WLAN'][0].address
const ip = '127.0.0.1'
module.exports = {
dev: {
// Paths

View File

@@ -216,8 +216,8 @@ export function SelectMarketingManager(code) {
method: 'post',
data: {
type: '1',
name: '客户关系管理系统_按地区查询_营销经理',
param: '省份流水号=' + code
name: '客户关系管理系统_按姓名查询_营销经理',
param: '姓名=' + code
}
})
}

View File

@@ -195,8 +195,8 @@ export function SelectMarketingManager(code) {
method: 'post',
data: {
type: '1',
name: '客户关系管理系统_按地区查询_营销经理',
param: '省份流水号=' + code
name: '客户关系管理系统_按姓名查询_营销经理',
param: '姓名=' + code
}
})
}

View File

@@ -0,0 +1,101 @@
import request from '@/utils/request'
export function initProject() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_项目名称_制造部_查询'
}
})
}
export function searchTable1(pageCurrent, pageSize, num1, num3, num5, num6, num7, num8, num9, num10) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '合同信息管理_合同信息_制造部_查询',
param: '合同ID=' + num1 + '=int&项目流水号_check=' + num3 + '=int&开始日期_check=' + num5 + '=int&结束日期_check=' + num6 + '=int&开始日期=' + num7 + '=date&结束日期=' + num8 + '=date&机床型号_check=' + num9 + '=int&机床型号=' + num10 + '=string',
Pagination: pageCurrent + '&' + pageSize
}
})
}
export function selectMachine(code) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: 'PDM_机床名称_查询数据_通过项目流水号',
param: '项目流水号=' + code
}
})
}
export function addList() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '基础表_合同信息表_制造部_增加数据',
param: '项目名称=' + arguments[0] + '&备注=' + arguments[1] + '&合同签订日期=' + arguments[2]
}
})
}
export function editchar() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_合同信息_制造部_编辑',
param: '项目名称=' + arguments[0] + '&合同信息备注=' + arguments[1] + '&项目流水号=' + arguments[2] + '&合同签订日期=' + arguments[3]
}
})
}
export function delList(num) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '合同信息管理_合同信息_删除',
param: '合同ID=' + num + '=int'
}
})
}
export function submitMachine() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '创建合同_机床名称_增加数据',
param: '项目流水号=' + arguments[0] + '&机床图号=' + arguments[1] + '&机床名称=' + arguments[2] + '&机床数量=' + arguments[3]
}
})
}
export function editMachine() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '创建合同_机床名称_修改数据',
param: '机床流水号=' + arguments[0] + '&机床图号=' + arguments[1] + '&机床名称=' + arguments[2] + '&机床数量=' + arguments[3]
}
})
}
export function delMachine() {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: 'PDM_机床名称_删除数据',
param: '机床流水号=' + arguments[0]
}
})
}

View File

@@ -60,8 +60,8 @@ export function SelectMarketingManager(code) {
method: 'post',
data: {
type: '1',
name: '客户关系管理系统_按地区查询_营销经理',
param: '省份流水号=' + code
name: '客户关系管理系统_按姓名查询_营销经理',
param: '姓名=' + code
}
})
}

View File

@@ -1,27 +1,27 @@
import request from '@/utils/request'
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, person) {
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&人员编号=${person}`,
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 查询分配后的基本件
export function searchPart(pageCurrent, pageSize, num1, person) {
export function searchPart(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_基本件_分配后',
param: `物料状态编号=${num1}&人员编号=${person}`,
param: `物料状态编号=${num1}&零件图号_check=${check1}&零件图号=${val1}&零件名称_check=${check2}&零件名称=${val2}&零件规格_check=${check3}&零件规格=${val3}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})

View File

@@ -1,14 +1,14 @@
import request from '@/utils/request'
// 查询库存数
export function searchInventoryNum(pageCurrent, pageSize, check1, name, check2, state1, state2) {
export function searchInventoryNum(pageCurrent, pageSize, check1, val1, check2, val2, check3, val3, check4, state1, state2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_物料余量_查询数据',
param: `物料名称_check=${check1}&物料名称=${name}&库存状态_check=${check2}&库存状态=${state1}&采购状态=${state2}`,
param: `物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&库存状态_check=${check4}&库存状态=${state1}&采购状态=${state2}`,
Pagination: pageCurrent + '&' + pageSize
}
})
@@ -158,3 +158,40 @@ export function setSafeValue(...params) {
}
})
}
// 查询分配后的标准件和外购件
export function searchMaterial(pageCurrent, pageSize, num1, check1, val1, check2, val2, check3, val3, person) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_采购部采购_查询物料_分配后',
param: `物料状态编号=${num1}&物料名称_check=${check1}&物料名称=${val1}&物料规格_check=${check2}&物料规格=${val2}&物料型号_check=${check3}&物料型号=${val3}&人员编号=${person}`,
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 初始化离线合同
export function initOfflineContract() {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '采购管理_离线合同_查询数据',
param: `未全部到货=1`
}
})
}
// 提交绑定
export function submitBind(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购管理_离线合同_物料绑定',
param: `组件零件流水号组=${params[0]}&离线合同流水号=${params[1]}`
}
})
}

View File

@@ -0,0 +1,91 @@
<template>
<div :style="{height:height+'px',zIndex:zIndex}">
<div
:class="className"
:style="{top:(isSticky ? stickyTop +'px' : ''),zIndex:zIndex,position:position,width:width,height:height+'px'}"
>
<slot>
<div>sticky</div>
</slot>
</div>
</div>
</template>
<script>
export default {
name: 'Sticky',
props: {
stickyTop: {
type: Number,
default: 0
},
zIndex: {
type: Number,
default: 1
},
className: {
type: String,
default: ''
}
},
data() {
return {
active: false,
position: '',
width: undefined,
height: undefined,
isSticky: false
}
},
mounted() {
this.height = this.$el.getBoundingClientRect().height
window.addEventListener('scroll', this.handleScroll)
window.addEventListener('resize', this.handleReize)
},
activated() {
this.handleScroll()
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
window.removeEventListener('resize', this.handleReize)
},
methods: {
sticky() {
if (this.active) {
return
}
this.position = 'fixed'
this.active = true
this.width = this.width + 'px'
this.isSticky = true
},
handleReset() {
if (!this.active) {
return
}
this.reset()
},
reset() {
this.position = ''
this.width = 'auto'
this.active = false
this.isSticky = false
},
handleScroll() {
const width = this.$el.getBoundingClientRect().width
this.width = width || 'auto'
const offsetTop = this.$el.getBoundingClientRect().top
if (offsetTop < this.stickyTop) {
this.sticky()
return
}
this.handleReset()
},
handleReize() {
if (this.isSticky) {
this.width = this.$el.getBoundingClientRect().width + 'px'
}
}
}
}
</script>

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554970691504" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1187" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M997.76 494.72l-133.12-76.8 128-72.32a32 32 0 0 0 0-55.68L704 123.52a32 32 0 0 0-32 0L512 213.76 346.88 118.4a32 32 0 0 0-32 0L26.24 284.8a32 32 0 0 0 0 55.68l133.76 76.8-128 72.32a32 32 0 0 0 0 55.68L192 635.52v114.56a32 32 0 0 0 16 27.52l288 166.4a32 32 0 0 0 32 0l288-166.4a32 32 0 1 0-32-55.68L512 880l-256-147.84v-59.52l64 39.04a32 32 0 0 0 32 0L512 620.8l166.4 96a32 32 0 0 0 32 0l106.24-64 181.12-105.6a32 32 0 0 0 0-55.68zM512 288l224 128L512 547.2l-224-128L384 362.88z m172.8-99.84l224 128-108.8 64L576 250.88z m-353.92-5.12L448 250.88l-91.52 53.12L224 380.16 106.24 312.32zM114.56 517.12l108.8-64L320 512l128 71.68-108.8 64z m579.2 135.04L576 583.68 700.16 512l99.84-57.6 117.12 67.84z" fill="#ffffff" p-id="1188"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1554970892523" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1369" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M896.48 619.75a391.84 391.84 0 0 0 3.87-54.85 385 385 0 0 0-75.11-229.47A388.78 388.78 0 0 0 658 205.23c-6-74.94-68.91-134.08-145.37-134.08S373.4 130.18 367.29 205a388.09 388.09 0 0 0-242.85 359.9 391.53 391.53 0 0 0 4.08 56.38 145.82 145.82 0 0 0-64.66 121.1c0 80.42 65.43 145.84 145.84 145.84a145 145 0 0 0 66.1-15.86q10.39 8 21.27 15.29a388.14 388.14 0 0 0 439.38-6q7.08-5 14-10.38A145 145 0 0 0 814.3 886c80.42 0 145.84-65.43 145.84-145.84a145.8 145.8 0 0 0-63.66-120.41zM512.64 141.86A75.13 75.13 0 1 1 437.5 217a75.22 75.22 0 0 1 75.14-75.14zM134.57 742.38a75.13 75.13 0 1 1 75.13 75.13 75.22 75.22 0 0 1-75.13-75.13z m201.79 86.48c-2.1-1.4-4.18-2.84-6.24-4.3a145 145 0 0 0 25.43-82.19c0-80.42-65.43-145.84-145.84-145.84-4.36 0-8.67 0.2-12.93 0.58a321.4 321.4 0 0 1-1.62-32.22 316.29 316.29 0 0 1 184.41-288.23 145.83 145.83 0 0 0 266 0.2 316.69 316.69 0 0 1 184 288c0 10.06-0.5 20.11-1.44 30.09-4.57-0.43-9.21-0.67-13.89-0.67-80.42 0-145.84 65.43-145.84 145.84a145 145 0 0 0 26.72 84.05 317.42 317.42 0 0 1-358.81 4.64zM814.3 815.3a75.13 75.13 0 1 1 75.13-75.13 75.22 75.22 0 0 1-75.13 75.13z" p-id="1370" fill="#ffffff"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,8 +1,8 @@
<template>
<div>
<div class="app-container bold-font">
<el-card>
<el-row>
<span>项目名称:</span>
<h3 style="display: inline-block;margin: 0">项目名称:</h3>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="项目名称" @change="typeChange()">
<el-option
v-for="item in project"
@@ -10,7 +10,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床名称:</span>
<h3 style="display: inline-block;margin: 0 0 0 20px">机床名称:</h3>
<el-select v-model="toolNumValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="机床名称">
<el-option
v-for="item in toolNum"
@@ -18,23 +18,24 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>客户名称:</span>
<h3 style="display: inline-block;margin: 0 0 0 20px">客户名称:</h3>
<el-input v-model="CustomerNameValue" placeholder="客户名称" size="small" clearable style="width:200px"/>
</el-row>
<el-row>
<span>签订日期:</span>
<el-date-picker v-model="time_SignStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>~
<h3 style="display: inline-block;margin: 0">签订日期:</h3>
<el-date-picker v-model="time_SignStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/> ~
<el-date-picker v-model="time_SignFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>
<span>交货期:</span>
<el-date-picker v-model="time_deliveryStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>~
<h3 style="display: inline-block;margin: 0 0 0 20px">交货期:</h3>
<el-date-picker v-model="time_deliveryStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/> ~
<el-date-picker v-model="time_deliveryFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" size="mini" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="项目编号" align="center" width="140px">
<h2 style="display: inline-block;margin: 0 0 10px 0">总计划:</h2>
<el-table v-loading="loading" :data="tableData" height="750" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="项目编号" align="center" width="140px" fixed="left">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.项目编号" size="mini"/>
@@ -44,45 +45,45 @@
</template>
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" width="200px">
<el-table-column label="项目名称" align="center" width="120px" fixed="left">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" width="150px">
<el-table-column label="机床图号" align="center" width="140px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" width="200px">
<el-table-column label="机床名称" align="center" width="280px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="70px">
<el-table-column label="机床数量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="签订日期" align="center" width="150px">
<el-table-column label="签订日期" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center" width="150px">
<el-table-column label="交货期" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" width="250px">
<el-table-column label="客户名称" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" width="100px">
<el-table-column label="设计者" align="center" width="90px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.机床设计者" size="mini"/>
<el-input v-model="scope.row.机床设计者" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.机床设计者 }}
@@ -92,50 +93,50 @@
<el-table-column label="发图" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床设计完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床设计完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 1;openDialog(scope.row)">{{ scope.row.机床设计完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 1;openDialog(scope.row)">{{ scope.row.机床设计完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="采购" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.采购完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.采购完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 2;openDialog(scope.row)">{{ scope.row.采购完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 2;openDialog(scope.row)">{{ scope.row.采购完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="备料" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.备料完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.备料完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 3;openDialog(scope.row)">{{ scope.row.备料完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 3;openDialog(scope.row)">{{ scope.row.备料完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="制造" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床生产完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床生产完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 4;openDialog(scope.row)">{{ scope.row.机床生产完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 4;openDialog(scope.row)">{{ scope.row.机床生产完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="装配" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床装配完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床装配完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 5;openDialog(scope.row)">{{ scope.row.机床装配完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 5;openDialog(scope.row)">{{ scope.row.机床装配完成时间 }}</el-button>
</template>
</template>
</el-table-column>
@@ -149,7 +150,7 @@
<!--</template>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="更新" align="center" width="200px">
<el-table-column label="更新" align="center" width="90px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.更新" size="mini"/>
@@ -159,7 +160,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
@@ -167,7 +168,7 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<div class="block" style="margin-top: 15px;">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
@@ -179,84 +180,85 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<!--<span>{{ title }}</span>-->
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="margin-left: 10px" @click="addTable()">增加</el-button>
<el-table v-loading="loading2" :data="tableData2" size="mini" style="margin-top: 10px;width: 100%;" border element-loading-text="拼命加载中">
<el-table-column min-width="300px" label="组号" align="center" width="240px">
<h2 style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划{{ machineNum }}</h2>
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
<el-table v-loading="loading2" :data="tableData2" style="margin-top: 10px;width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column min-width="100px" label="组号" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.组号" size="mini"/>
<el-input v-model="scope.row.组号" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.组号 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="任务名称" align="center" width="240px">
<el-table-column min-width="200px" label="任务名称" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini"/>
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.任务名称 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="负责人" align="center" width="240px">
<el-table-column min-width="100px" label="负责人" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.负责人" size="mini"/>
<el-input v-model="scope.row.负责人" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.负责人 }}
</template>
</template>
</el-table-column>
<el-table-column label="接收任务时间" align="center" width="250px">
<el-table-column label="接收任务时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.接收任务时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.接收任务时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.接收任务时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="任务开始时间" align="center" width="250px">
<el-table-column label="任务开始时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.任务开始时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.任务开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.任务开始时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center" width="250px">
<el-table-column label="计划完成时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.计划完成时间 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="货期" align="center" width="240px">
<el-table-column min-width="100px" label="货期" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.货期" size="mini"/>
<el-input v-model="scope.row.货期" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.货期 }}
</template>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" width="250px">
<el-table-column label="实际完成时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.实际完成时间 }}
@@ -266,14 +268,14 @@
<el-table-column min-width="300px" label="备注" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.备注" size="mini"/>
<el-input v-model="scope.row.备注" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.备注 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<el-table-column label="操作" width="180px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit2(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
@@ -291,6 +293,7 @@ import { getProject, getCustomerName, getToolNum, searchtable, editTable, search
export default {
data() {
return {
machineNum: '',
jichuang: '',
title: '',
tableData2: [],
@@ -442,6 +445,7 @@ export default {
},
// 查询表格2数据
openDialog(row) {
this.machineNum = row.机床图号
this.loading2 = true
this.tableData2 = []
if (this.code === 1) {
@@ -627,6 +631,38 @@ export default {
<style scoped>
.el-card {
margin-bottom: 15px;
border-color: rgb(0, 12, 57);
color: white;
margin-bottom: 5px;
background-color: rgb(0, 12, 57);
}
span{
margin: 10px 0 10px 10px;
}
.el-pagination{
background-color: white;
}
</style>
<style>
.bold-font .el-table{
font: bold 18px arial!important;
margin: 0 0 10px 0;
color: white;
}
.bold-font .el-table td{
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table th{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table div{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font{
color: ghostwhite;
font: bold 22px arial!important;
padding: 5px;
}
</style>

View File

@@ -50,72 +50,76 @@
<!--style="width: 160px"-->
<!--type="date"-->
<!--placeholder="选择日期"/>-->
<!--<span>提前</span>-->
<!--<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>-->
<!--<span>天预警</span>-->
<span>提前</span>
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
<span>天预警</span>
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button>
</div>
<el-table v-loading="loading" :data="tableData" border element-loading-text="拼命加载中">
<el-table-column label="项目名称" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床型号" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" min-width="220px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" min-width="220px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</template>
</el-table-column>
<el-table-column label="发图" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床设计完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="采购" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.采购完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="备料" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.备料完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床生产完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间.split(' ')[0] }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">设计</h1>
<sticky :z-index="10" style="height: 180px">
<div>
<h1 class="word" style="margin: 0">总计划</h1>
<el-table v-loading="loading" :data="tableData" height="120px" border element-loading-text="拼命加载中">
<el-table-column label="项目名称" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床型号" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" min-width="220px">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" min-width="220px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.合同签订日期)">{{ scope.row.合同签订日期 }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 }}</span>
</template>
</el-table-column>
<el-table-column label="发图" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床设计完成时间)">{{ scope.row.机床设计完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="采购" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.采购完成时间)">{{ scope.row.采购完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="备料" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.备料完成时间)">{{ scope.row.备料完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床生产完成时间)">{{ scope.row.机床生产完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床装配完成时间)">{{ scope.row.机床装配完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</sticky>
<sticky :z-index="10" :sticky-top="180">
<h1 class="word">设计</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData1" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
@@ -134,7 +138,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -153,9 +157,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">采购</h1>
<sticky :z-index="11" :sticky-top="180">
<h1 class="word">采购</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData2" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
@@ -174,7 +178,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -193,9 +197,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">备料</h1>
<sticky :z-index="12" :sticky-top="180">
<h1 class="word">备料</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData3" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
@@ -214,7 +218,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -233,9 +237,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">制造</h1>
<sticky :z-index="13" :sticky-top="180">
<h1 class="word">制造</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData4" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
@@ -254,7 +258,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -273,9 +277,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">装配调试</h1>
<sticky :z-index="14" :sticky-top="180">
<h1 class="word">装配调试</h1>
</sticky>
<el-table v-loading="loading1" :data="tableData5" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope">
@@ -294,7 +298,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -317,9 +321,11 @@
</div>
</template>
<script>import { initProject, initMachine, searchtable, searchtable2 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
<script>
import { initProject, initMachine, searchtable, searchtable2 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
import Sticky from '@/components/Sticky'
export default {
components: { Sticky },
data() {
return {
projectValue: '',
@@ -352,6 +358,16 @@ export default {
this.fetchData()
},
methods: {
colorJudge(time1) {
console.log(new Date(time1) - this.now)
if ((new Date(time1) - this.now) > 0 && (new Date(time1) - this.now) < (86400000 * this.warningValue)) {
return 'orange'
} else if ((new Date(time1) - this.now) < 0) {
return 'red'
} else {
return 'black'
}
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
@@ -525,20 +541,55 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 10px;
.el-pagination{
background-color: white;
}
.el-card {
border-color: rgb(0, 12, 57);
color: white;
margin-bottom: 5px;
background-color: rgb(0, 12, 57);
}
.word{
/*font-size: 20px;*/
/*margin-bottom: 20px;*/
border: 1px solid #ebeef5;
margin-top: 0;
line-height: 60px;
/*height: 50px;*/
background-color: rgb(0, 12, 57);
}
span{
margin: 10px 0 10px 10px;
}
.orange{
color: orange;
}
.red{
color: red;
}
.black{
color: white;
}
</style>
<style>
.bold-font .el-table{
font: bold 18px arial!important;
margin: 0 0 10px 0;
color: white;
}
.bold-font .el-table td{
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table th{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table div{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font{
color: ghostwhite;
font: bold 22px arial!important;
padding: 5px;
}
</style>

View File

@@ -23,6 +23,51 @@
<!--</el-select>-->
<el-button type="success" icon="el-icon-search" class="move" size="small" @click="selectCustomerOfName">查询</el-button>
</el-card>
<el-card>
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click="addMarketingManager();flag = 1">添加销售经理</el-button>
<span style="float: right">销售经理</span>
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border>
<!--<el-table-column label="责权省份" align="center" min-width="80">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.省份 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="姓名" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.联系电话 }}
</template>
</el-table-column>
<el-table-column label="生日" align="center">
<template slot-scope="scope">
{{ scope.row.出生日期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEditMarketingManager(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDeleteMarketingManager(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-row>
<el-col :span="6">
<el-card>
@@ -49,55 +94,10 @@
</el-card>
</el-col>
<el-col :span="18">
<el-card>
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click="addMarketingManager();flag = 1">添加销售经理</el-button>
<span style="float: right">销售经理</span>
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border>
<el-table-column label="责权省份" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.省份 }}
</template>
</el-table-column>
<el-table-column label="姓名" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.联系电话 }}
</template>
</el-table-column>
<el-table-column label="生日" align="center">
<template slot-scope="scope">
{{ scope.row.出生日期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
class="el-icon-edit"
@click="handleEditMarketingManager(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
class="el-icon-delete"
@click="handleDeleteMarketingManager(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click = "addCustomer();flag1 = 1">新增客户</el-button>
<span style="float: right">客户信息</span>
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border>
<el-table v-loading="loading2" :data="tableData2" height="670" style="width: 100%;margin-top: 10px" border>
<el-table-column label="省份" align="center" min-width="80px">
<template slot-scope="scope">
{{ scope.row.省份 }}
@@ -403,13 +403,20 @@ export default {
this.dataPeople = tree(data, 0)
})
this.getSelect(initCustomer, ['客户名称', '客户流水号'], 'CustomerName')
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
},
getCurrentRow(row) {
this.CustomerNameValue = ''
this.AdressID = row
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
this.loading3 = true
selectMarketingManager(this.AdressID).then(response => {
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
@@ -450,7 +457,7 @@ export default {
return this.AdressID
}).then(data => {
this.loading3 = false
selectMarketingManager(data).then(response => {
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
@@ -482,7 +489,7 @@ export default {
},
handleDeleteMarketingManager(index, row) {
function a() {
selectMarketingManager(this.AdressID).then(response => {
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
@@ -493,13 +500,9 @@ export default {
this.deleteRow(deleteMarketingManager, row.营销经理地区流水号, a)
},
addMarketingManager() {
if (this.AdressID === '' || this.AdressID === null) {
this.$message.warning('请选择一个省份')
} else {
this.dialogFormVisible1 = true
this.title1 = '增加'
this.addForm('form1')
}
this.dialogFormVisible1 = true
this.title1 = '增加'
this.addForm('form1')
},
callOff1() {
this.dialogFormVisible1 = false
@@ -508,7 +511,7 @@ export default {
function a() {
this.dialogFormVisible1 = false
this.loading3 = true
selectMarketingManager(this.AdressID).then(response => {
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
@@ -517,7 +520,7 @@ export default {
})
}
if (this.flag === 1) {
this.addTable(addMarketingManager, [this.peopleid, this.AdressID], 'form1', a)
this.addTable(addMarketingManager, [this.peopleid, 1], 'form1', a)
} else {
this.editTable(editMarketingManager, [this.peopleid, this.a], 'form1', a)
}

View File

@@ -10,7 +10,7 @@
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="openName" @clear="clear()"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD('form2')">新增</el-button>
<el-badge :value="value" :max="99" class="item">
@@ -381,14 +381,17 @@
</el-dialog>
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="500px">
<span>责权省份</span>
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">
<el-option
v-for="item in Province"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>姓名</span>
<el-input v-model="name" clearable size="small" style="width: 200px"/>
<el-button size="small" type="success" @click="searchName">查询</el-button>
<!--<span>责权省份</span>-->
<!--<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">-->
<!--<el-option-->
<!--v-for="item in Province"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<div style="margin-top: 15px">
<el-table :data="dataPeople" border style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
@@ -521,6 +524,7 @@ export default {
}
}
return {
name: '',
plannedTime: [],
entryName2: [],
count1: 0,
@@ -639,6 +643,16 @@ export default {
this.init()
},
methods: {
searchName() { // 模糊查询姓名
SelectMarketingManager(this.name).then(response => {
this.dataPeople = response.data
})
},
openName() {
this.name = ''
this.dataPeople = []
this.dialogFormVisiblePeople = true
},
init() {
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
this.getSelect(searchProjectNumber, ['项目名称', '项目流水号'], 'entryName')

View File

@@ -389,14 +389,17 @@
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="500px">
<span>责权省份</span>
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">
<el-option
v-for="item in Province"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>姓名</span>
<el-input v-model="name" clearable size="small" style="width: 200px"/>
<el-button size="small" type="success" @click="searchName">查询</el-button>
<!--<span>责权省份</span>-->
<!--<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">-->
<!--<el-option-->
<!--v-for="item in Province"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<div style="margin-top: 15px">
<el-table :data="tableData3" border style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
@@ -549,6 +552,7 @@ export default {
},
data() {
return {
name: '',
a: 1,
b: 1,
c: 1,
@@ -674,6 +678,11 @@ export default {
this.fetchCustomerData()
},
methods: {
searchName() { // 模糊查询姓名
SelectMarketingManager(this.name).then(response => {
this.tableData3 = response.data
})
},
fetchData() {
getTree().then(response => { // 获取人员信息树
const data = response.data
@@ -686,6 +695,8 @@ export default {
this.getSelect(money, ['付款方式', '付款方式代码'], 'money')
},
openName() {
this.name = ''
this.tableData3 = []
this.dialogFormVisiblePeople = true
},
getRowKeys(row) {

View File

@@ -0,0 +1,405 @@
<template>
<div>
<el-card>
<div>
<span>项目名称</span>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="">机床型号</span>
<el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>
</div>
<div style="margin-top: 20px">
<span style="margin-top: 20px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 205px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 205px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
</div>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
style="width: 100%"
height="500"
border
size="mini"
@expand-change="selectMachine">
<el-table-column type="expand">
<template slot-scope="scope">
<el-table :data="tableData2" border style="width: 612px; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="editMachine(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="deleteMachine(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="合同编号">
<template slot-scope="scope">
<template>
<el-tag slot="reference">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目下达日期">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="200">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-plus"
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click.stop="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click.stop="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--新增合同信息对话框-->
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="140px" class="demo-ruleForm">
<el-row>
<el-col :span="24">
<el-form-item label="项目名称" prop="EntryName">
<el-input v-model="form.EntryName" size="small" placeholder="请输入项目名称" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目下达日期" prop="contractSigningDate">
<el-date-picker
v-model="form.contractSigningDate"
style="width: 200px"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择项目下达日期"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
style="width: 200px"
type="textarea"
autosize
placeholder="请输入项目介绍"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="450px">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
<el-form-item label="设备型号" prop="设备型号">
<el-input v-model="form1.设备型号" size="small" placeholder="请输入设备型号" style="width:200px"/>
</el-form-item>
<el-form-item label="设备名称" prop="设备名称">
<el-input v-model="form1.设备名称" size="small" placeholder="请输入设备名称" style="width:200px"/>
</el-form-item>
<el-form-item label="机床数量" prop="机床数量">
<el-input-number :min="1" v-model="form1.机床数量" controls-position="right" style="width:200px" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2('form1')">取消</el-button>
<el-button type="primary" @click="submitMachine('form1')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initProject, searchTable1, selectMachine, addList, editchar, delList, submitMachine, editMachine, delMachine } from '@/api/MarketingCenter/CreateProject'
export default {
components: {
elInput
},
data() {
return {
entryName: [],
entryNameValue: '',
machine: '',
startTime: '',
endTime: '',
PageCurrent: 1,
PageSize: 10,
total: null,
listLoading: false,
entryNameValue_check: 0,
startTime_check: 0,
endTime_check: 0,
machine_check: 0,
a: 1,
b: 1,
c: 1,
tableData1: [],
expands: [],
tableData2: [],
projectNum: '',
hetongID: '',
form: {
EntryName: '', // 项目名称
contractSigningDate: '',
remark: ''
},
dialogFormVisible1: false,
title: '',
rules: { // 表单验证规则
EntryName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
contractSigningDate: [{ required: true, message: '请选择项目下达日期', trigger: 'change' }]
},
dialogFormVisible2: false,
title1: '',
form1: {
设备型号: '',
设备名称: '',
机床数量: 1
},
rules1: { // 表单验证规则
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
},
temp: '',
flag: ''
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
},
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
if (this.machine === '' || this.machine === null) { this.machine_check = 0 } else { this.machine_check = 1 }
this.listLoading = true
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine], ['tableData1', 'total', 'listLoading'])
},
selectMachine(row) {
this.projectNum = row.项目流水号
if (this.a === 1) {
this.expands.push(row.项目流水号)
this.b = row.项目流水号
this.a = 0
} else {
if (this.b === row.项目流水号) {
this.expands = []
this.a = 1
} else {
this.expands = []
this.expands.push(row.项目流水号)
this.a = 0
this.b = row.项目流水号
}
}
selectMachine(row.项目流水号).then(response => {
this.tableData2 = response.data
})
},
getRowKeys(row) {
return row.项目流水号
},
ADD() {
this.addForm('form')
this.dialogFormVisible1 = true
this.temp = 1
this.title = '增加'
},
// 提交添加或者修改
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.temp === 1) {
this.addTableData1()
this.temp = null
} else if (this.temp === 2) {
this.chaEdit()
this.temp = null
}
}
})
},
addTableData1() {
addList(this.form.EntryName, this.form.remark, this.form.contractSigningDate).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.title = ''
this.fetchTableData1()
} else {
this.$message.error('添加失败')
}
})
},
callOff() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
},
handleEdit(row) {
this.editForm(row, 'form')
this.title = '编辑'
this.dialogFormVisible1 = true
this.form.contractSigningDate = row.合同签订日期
this.form.contractNumber = row.合同编号
this.form.EntryName = row.项目名称
this.hetongID = row.项目流水号
this.form.remark = row.合同信息备注
this.temp = 2
},
chaEdit() {
editchar(this.form.EntryName, this.form.remark, this.hetongID, this.form.contractSigningDate).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.fetchTableData1()
} else {
this.$message.error('信息更新失败')
}
})
},
handleDelete(row) {
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
},
addMachine(row) {
this.projectNum = row.项目流水号
this.dialogFormVisible2 = true
this.title1 = '新增'
this.addForm('form1')
},
submitMachine() {
function a() {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
this.dialogFormVisible2 = false
}
if (this.flag === 1) {
this.addTable(submitMachine, [this.projectNum, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
} else {
this.editTable(editMachine, [this.c, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
}
},
deleteMachine(row) {
function a() {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
}
this.deleteRow(delMachine, row.机床流水号, a)
},
editMachine(row) {
this.flag = 2
this.editForm(row, 'form1')
this.dialogFormVisible2 = true
this.title1 = '编辑'
this.c = row.机床流水号
this.form1.设备型号 = row.机床图号
this.form1.设备名称 = row.机床名称
},
callOff2() {
this.dialogFormVisible2 = false
}
}
}
</script>
<style scoped>
</style>

View File

@@ -11,7 +11,7 @@
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clearPeople()"/>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="openName" @clear="clearPeople()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
@@ -188,15 +188,18 @@
</el-card>
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="30%">
<span>责权省份</span>
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">
<el-option
v-for="item in Province"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="500px">
<span>姓名</span>
<el-input v-model="name" clearable size="small" style="width: 200px"/>
<el-button size="small" type="success" @click="searchName">查询</el-button>
<!--<span>责权省份</span>-->
<!--<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">-->
<!--<el-option-->
<!--v-for="item in Province"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<div style="margin-top: 15px">
<el-table :data="dataPeople" border style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
@@ -334,6 +337,7 @@ export default {
},
data() {
return {
name: '',
projectid: '', // 项目流水号
entryName: [], // 项目名称数组
entryNameValue_check: '', // 项目名称check
@@ -394,6 +398,16 @@ export default {
this.fetchTableData1()
},
methods: {
searchName() { // 模糊查询姓名
SelectMarketingManager(this.name).then(response => {
this.dataPeople = response.data
})
},
openName() {
this.name = ''
this.dataPeople = []
this.dialogFormVisiblePeople = true
},
// 初始化条件
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')

View File

@@ -7,6 +7,10 @@
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
<el-button
type="success"
size="small"
@@ -140,6 +144,12 @@
<el-row style="margin-bottom: 10px">
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select/>
<span>零件图号:</span>
<el-input v-model="partNum" placeholder="零件图号" size="small" clearable/>
<span>零件名称:</span>
<el-input v-model="partName" placeholder="零件名称" size="small" clearable/>
<span>零件规格:</span>
<el-input v-model="partSpec" placeholder="零件规格" size="small" clearable/>
<el-button
type="success"
size="small"
@@ -153,8 +163,8 @@
:data="tableData12"
:row-class-name="tableRowClassName"
border
style="width: 100%;max-height: 600px;"
height="600px"
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange2">
<el-table-column :selectable="selectable" align="center" width="35" type="selection"/>
@@ -242,31 +252,31 @@
</el-tabs>
<el-card style="margin-top: 15px">
<span>询价单号:</span>
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="createInquirySheet">创建单据</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addInquirySheet">追加物料</el-button>
</el-card>
<el-card>
<div slot="header">
<span>询价单号:</span>
<el-input v-model="inquirySheetNum" placeholder="询价单号" size="small" clearable/>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-plus"
style="margin-left: 10px"
@click="createInquirySheet">创建单据</el-button>
<el-button
type="primary"
size="small"
icon="el-icon-circle-plus-outline"
style="margin-left: 10px"
@click="addInquirySheet">追加物料</el-button>
</div>
<h3 style="margin-top: 0">询价单</h3>
<el-table v-loading="" :data="tableData2" border style="max-height: 300px;" height="300px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="询价单编号" align="center" min-width="150">
<template slot-scope="scope">
@@ -310,9 +320,10 @@
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
<el-button type="warning" size="mini" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
<el-button type="success" size="mini" style="float: right" @click="saveOrder()">保存</el-button>
</div>
<el-button :disabled="tableData3.length===0" type="warning" size="mini" style="margin-left:10px;float: right" @click="exportInquirySheet()">导出</el-button>
<el-button :disabled="tableData3.length===0" type="success" size="mini" style="float: right" @click="saveOrder()">保存</el-button>
</div><hr>
<h3 style="margin-top: 0">询价单明细</h3>
<el-table v-loading="" :data="tableData3" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="图号" align="center" min-width="100">
<template slot-scope="scope">
@@ -596,6 +607,9 @@ export default {
name: '', // 创建询价单
data() {
return {
partNum: '',
partName: '',
partSpec: '',
check3: 0, // 供应商
check4: 0, // 询价单号
materialStatusValue: [0], // 物料状态
@@ -620,6 +634,8 @@ export default {
}
], // 物料状态
materialName: '',
materialSpec: '',
materialModel: '',
tableData11: [], // 标准件和外购件列表
total11: 0,
pageCurrent11: 1,
@@ -772,9 +788,11 @@ export default {
return row['供货商'] === value
},
searchTable11() { // 查询标准件和外购件列表
let check1
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, this.id).then(response => {
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchMaterial(this.pageCurrent11, this.pageSize11, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
console.log(response.data.rows)
this.tableData11 = response.data.rows
this.total11 = response.data.total
@@ -790,7 +808,11 @@ export default {
this.searchTable11()
},
searchTable12() { // 查询基本件列表
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], this.id).then(response => {
let check1, check2, check3
this.partNum ? check1 = 1 : check1 = 0
this.partName ? check2 = 1 : check2 = 0
this.partSpec ? check3 = 1 : check3 = 0
searchPart(this.pageCurrent12, this.pageSize12, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.partNum, check2, this.partName, check3, this.partSpec, this.id).then(response => {
console.log(response.data.rows, 9999)
this.tableData12 = response.data.rows
this.total12 = response.data.total

View File

@@ -4,6 +4,126 @@
<div slot="header">
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
<span>物料状态:</span>
<el-cascader :options="materialStatus" v-model="materialStatusValue" size="small" change-on-select style="margin: 0"/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent00=1;pageSize00=10;total00=0;searchTable00()">查询</el-button>
<el-button
:disabled="tableData02.length===0"
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="bindOfflineContract">绑定离线合同</el-button>
</div>
<el-table
v-loading=""
:data="tableData00"
:row-class-name="tableRowClassName"
border
show-summary
style="width: 100%;max-height: 500px;"
height="500px"
size="mini"
@selection-change="handleSelectionChange1">
<el-table-column :selectable="selectable" align="center" width="50" type="selection"/>
<el-table-column label="物料状态" align="center" width="80">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.询价状态编号)===1" type="warning" size="small">未询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)===3&&parseInt(scope.row.采购状态编号)!==3" type="success" size="small">已询价</el-tag>
<el-tag v-if="parseInt(scope.row.询价状态编号)!==1&&parseInt(scope.row.采购状态编号)===3" type="info" size="small">已采购</el-tag>
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料类别" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column label="物料品种" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</template>
</el-table-column>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="待采购数量" align="center" min-width="80" prop="待采购数量">
<template slot-scope="scope">
{{ scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="计划到货时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin: 10px 0 0 0;">
<el-pagination
:current-page="pageCurrent00"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize00"
:total="total00"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange00"
@current-change="handleCurrentChange00"/>
</div>
</el-card>
<el-card>
<div slot="header">
<span>物料名称:</span>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/>
<span>物料规格:</span>
<el-input v-model="materialSpec" placeholder="物料规格" size="small" clearable/>
<span>物料型号:</span>
<el-input v-model="materialModel" placeholder="物料型号" size="small" clearable/>
<span>库存状态:</span>
<el-select v-model="inventoryStateValue" placeholder="库存状态" size="small" clearable>
<el-option
@@ -96,7 +216,7 @@
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
@@ -430,6 +550,44 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible0" title="绑定到离线合同" center style="min-height: 300px">
<el-table :data="tableData02" border show-summary height="300" size="mini">
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="分配数量" align="center" min-width="80" prop="零件数量">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
</el-table>
确认将以上物料绑定到离线合同
<el-select v-model="offlineContractsValue" placeholder="离线合同号" filterable size="small" style="margin: 10px">
<el-option
v-for="item in offlineContracts"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
上。
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible0=false">取消</el-button>
<el-button type="primary" size="small" @click="submitBind">确定</el-button>
</div>
</el-dialog>
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr>
@@ -473,7 +631,7 @@
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, saveOfflineContact, doneOfflineContact, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
addMateriel, deleteMateriel, saveOfflineContact, doneOfflineContact, setSafeValue, searchMaterial, initOfflineContract, submitBind } from '@/api/PurchasingCenter/OfflineContract'
import QRCode from 'qrcode'
import $ from 'jquery'
import { mapGetters } from 'vuex'
@@ -482,6 +640,36 @@ export default {
name: '', // 离线合同
data() {
return {
groupPartNumGroup: [], // 组件零件流水号组
offlineContractsValue: '',
offlineContracts: [],
tableData02: [],
dialogVisible0: false,
materialStatusValue: [0], // 物料状态
materialStatus: [
{
value: 0,
label: '全部'
},
{
value: 1,
label: '未询价'
}, {
value: 2,
label: '已询价',
children: [{
value: 3,
label: '未采购'
}, {
value: 4,
label: '已采购'
}]
}
], // 物料状态
total00: 0,
pageCurrent00: 1,
pageSize00: 10,
tableData00: [],
showMaterialTable: true,
loading1: false,
title2: '',
@@ -500,6 +688,8 @@ export default {
check3: 0,
check4: 0,
materialName: '',
materialSpec: '',
materialModel: '',
inventoryStateValue: '', // 库存状态
inventoryState: [
{
@@ -594,6 +784,7 @@ export default {
this.fetchData()
this.searchTable1()
this.searchTable2()
this.searchTable00()
},
methods: {
editing(row) {
@@ -622,9 +813,12 @@ export default {
fetchData() {},
searchTable1() { // 查询物料库物料
this.loading1 = true
let check2, check3
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
this.materialName ? this.check1 = 1 : this.check1 = 0
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'changeSafeValue', false)
@@ -1049,6 +1243,71 @@ export default {
message: '已取消操作'
})
})
},
tableRowClassName({ row, rowIndex }) {
if (parseInt(row.是否确认) === 0) {
return 'MistyRose'
}
return ''
},
handleSelectionChange1(val) { // 标准件和外购件多选
this.groupPartNumGroup = []
this.tableData02 = val
for (let i = 0; i < val.length; i++) {
this.groupPartNumGroup.push(val[i].组件零件流水号)
}
},
selectable(row, index) { // 控制某行是否可选
return (parseInt(row.询价状态编号) === 1 && parseInt(row.采购状态编号) === 1 && parseInt(row.是否确认) === 1) // 未询价&&未采购&&确认物料修改
},
searchTable00() { // 查询标准件和外购件列表
this.pageCurrent1 = 1
this.pageSize1 = 10
this.total1 = 0
this.searchTable1()
let check1, check2, check3
this.materialName ? check1 = 1 : check1 = 0
this.materialSpec ? check2 = 1 : check2 = 0
this.materialModel ? check3 = 1 : check3 = 0
searchMaterial(this.pageCurrent00, this.pageSize00, this.materialStatusValue[this.materialStatusValue.length - 1], check1, this.materialName, check2, this.materialSpec, check3, this.materialModel, this.id).then(response => {
this.tableData00 = response.data.rows
this.total00 = response.data.total
})
},
handleSizeChange00(val) { // 标准件和外购件列表分页
this.pageSize00 = val
this.pageCurrent00 = 1
this.searchTable00()
},
handleCurrentChange00(val) { // 标准件和外购件列表分页
this.pageCurrent00 = val
this.searchTable00()
},
// 绑定离线合同
bindOfflineContract() {
this.offlineContracts = []
initOfflineContract().then(res => {
for (let i = 0; i < res.data.length; i++) {
this.offlineContracts.push({
value: res.data[i].离线合同流水号,
label: res.data[i].离线合同编号
})
}
})
this.dialogVisible0 = true
},
submitBind() {
if (this.offlineContractsValue) {
submitBind(this.groupPartNumGroup, this.offlineContractsValue).then(res => {
if (res.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable00()
this.dialogVisible0 = false
} else { this.$message.error('操作失败') }
})
} else {
this.$message.warning('请选择需要绑定的离线合同')
}
}
}
}
@@ -1089,3 +1348,8 @@ export default {
top: 5px;
}
</style>
<style>
.el-table .MistyRose {
background: MistyRose!important;
}
</style>

View File

@@ -1,37 +1,37 @@
<template>
<div class="app-container">
<el-card>
<span>请款时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-card>
<el-card>
<div slot="header">
<span>请款时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</div>
<h3 style="margin-top: 0">请款表</h3>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">
@@ -123,6 +123,10 @@
<span v-show="supplierValue">累计欠款</span>
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>
</div>
</el-card>
<el-card>
<h3 style="margin-top: 0">离线合同明细</h3>
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" border style="margin-top:10px;max-height: 500px;" height="500px" size="mini" show-summary>
<el-table-column label="离线合同编号" align="center" min-width="150">
<template slot-scope="scope">

View File

@@ -1,23 +1,23 @@
<template>
<div class="app-container">
<el-card>
<span>时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:300px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable0()">查询</el-button>
</el-card>
<el-card>
<div slot="header">
<span>时间段:</span>
<el-date-picker
v-model="dateRange"
:picker-options="pickerOptions"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:300px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable0()">查询</el-button>
</div>
<h3 style="margin-top: 0">付款计划</h3>
<el-table :data="tableData0" size="mini" border style="max-height: 250px;" height="250px" highlight-current-row @row-click="searchContract">
<el-table-column label="计划状态" width="100" align="center">
<template slot-scope="scope">
@@ -59,24 +59,24 @@
</el-card>
<el-card>
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</el-card>
<el-card>
<div slot="header">
<span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button>
</div>
<h3 style="margin-top: 0">请款表</h3>
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini">
<el-table-column label="供应商" align="center" min-width="250">
<template slot-scope="scope">

View File

@@ -1,59 +1,58 @@
<template>
<div class="app-container">
<el-card>
<!--<span>时间段:</span>-->
<!--<el-date-picker-->
<!--v-model="startEndDate"-->
<!--style="width:250px"-->
<!--size="small"-->
<!--type="daterange"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--start-placeholder="开始日期"-->
<!--end-placeholder="结束日期"/>-->
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>审批情况:</span>
<el-select v-model="approvalValue" placeholder="审批情况" size="small" style="width: 100px">
<el-option
v-for="item in approval"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
@click="download()">导出</el-button>
</el-card>
<el-card>
<div slot="header">
<!--<span>时间段:</span>-->
<!--<el-date-picker-->
<!--v-model="startEndDate"-->
<!--style="width:250px"-->
<!--size="small"-->
<!--type="daterange"-->
<!--value-format="yyyy-MM-dd"-->
<!--format="yyyy-MM-dd"-->
<!--start-placeholder="开始日期"-->
<!--end-placeholder="结束日期"/>-->
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable style="width:180px"/>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>审批情况:</span>
<el-select v-model="approvalValue" placeholder="审批情况" size="small" style="width: 100px">
<el-option
v-for="item in approval"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
<el-button
type="warning"
size="small"
icon="el-icon-download"
@click="download()">导出</el-button>
</div>
<el-table
v-loading="loading1"
id="expandTable"

View File

@@ -54,7 +54,7 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="规格" min-width="150px">
<el-table-column align="center" label="规格" min-width="200px">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
@@ -64,24 +64,29 @@
{{ scope.row.零件数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购数量" width="100px">
<el-table-column align="center" label="合同采购数量" width="100px">
<template slot-scope="scope">
{{ scope.row.数量 || '—' }}
{{ scope.row.数量 || scope.row.离线采购数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="到货数量" width="100px">
<template slot-scope="scope">
{{ scope.row.已到货数量 || '—' }}
{{ scope.row.已到货数量 || scope.row.离线到货数量 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="100px">
<el-table-column align="center" label="供应商" min-width="150px">
<template slot-scope="scope">
{{ scope.row.供应商名称 || '—' }}
{{ scope.row.供应商名称 || scope.row.离线合同供应商名称 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购合同编号" min-width="100px">
<el-table-column align="center" label="合同编号" min-width="100px">
<template slot-scope="scope">
{{ scope.row.采购合同编号 || '—' }}
{{ scope.row.采购合同编号 || scope.row.离线合同编号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购员" width="100px">
<template slot-scope="scope">
{{ scope.row.姓名 || '—' }}
</template>
</el-table-column>
</el-table>
@@ -162,6 +167,11 @@
{{ scope.row.采购合同编号 || '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购员" width="100px">
<template slot-scope="scope">
{{ scope.row.姓名 || '—' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination

View File

@@ -1,28 +1,27 @@
<template>
<div class="app-container">
<el-card>
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</el-card>
<el-card>
<div slot="header">
<span>合同号:</span>
<el-select v-model="contractNumValue" placeholder="合同号" size="small" filterable clearable>
<el-option
v-for="item in contractNum"
:key="item.value"
:label="item.label"
:value="item.value">
<div style="float: left">{{ item.label }}</div>
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button
type="success"
size="small"
icon="el-icon-search"
style="margin-left:10px"
@click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
</div>
<el-table
v-loading=""
id="expandTable"

View File

@@ -145,10 +145,7 @@
<td colspan="1" align="center">单价</td>
<td colspan="1" align="center">总价</td>
</tr>
<!--</tbody>-->
<!--</table>-->
<!--<hr>-->
<!--<table id="2" cellspacing="0px" align="center" border width="100%" style="">-->
<!--</tbody>-->
<!--&lt;!&ndash;<tbody id="4">&ndash;&gt;-->
<!--&lt;!&ndash;<tr id="tableHead" style="height: 40px">&ndash;&gt;-->
<!--&lt;!&ndash;<td colspan="1" align="center">物料名称</td>&ndash;&gt;-->