This commit is contained in:
liushuai
2020-03-09 09:28:04 +08:00
parent 6714e10d90
commit 28177e7cd4
23 changed files with 1145 additions and 983 deletions

View File

@@ -4,7 +4,7 @@
<el-input v-model="ManufacturerName" clearable placeholder="外协厂家名称" size="small" style="width:200px;margin: 10px 0 3px 0;" @keyup.enter.native="pageCurrent=1;pageSize=50;searchTable()" @clear="pageCurrent=1;pageSize=50;searchTable()"/>
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left:20px" plain @click="getList()">查询</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="新增外协厂家" placement="top">
<el-button type="distribution" icon="el-icon-circle-plus-outline" style="margin-left: 10px" size="small" @click="editType1('form');param = 0">新增</el-button>
<el-button type="distribution" icon="el-icon-circle-plus-outline" style="margin-left: 10px" size="small" @click="editType1('form');param = 0">外协厂家</el-button>
</el-tooltip>
<el-table v-loading="loading0" :data="tableData" height="550" style="width: 100%;" border>
<el-table-column label="序号" align="center" type="index" width="50"/>
@@ -33,11 +33,6 @@
{{ 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">
<template slot-scope="scope">
{{ scope.row.备注 }}
@@ -94,20 +89,20 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行" prop="Fax">
<el-input v-model="form.Fax" placeholder="银行" clearable size="small"/>
<el-form-item label="备注" prop="Remarks">
<el-input v-model="form.Remarks" placeholder="备注" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-row v-show="FALSE">
<el-col :span="12">
<el-form-item label="设备情况" prop="EquipmentCondition">
<el-input v-model="form.EquipmentCondition" placeholder="设备情况" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="Remarks">
<el-input v-model="form.Remarks" placeholder="备注" clearable size="small" />
<el-form-item label="银行" prop="Fax">
<el-input v-model="form.Fax" placeholder="银行" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>

View File

@@ -2,8 +2,8 @@
<div class="app-container">
<el-card>
<div style="margin-top: 7px; margin-bottom: 7px">
<el-input v-model="supplierNameValue" size="small" placeholder="外协厂家零件图号" style="width: 180px" clearable/>
<el-date-picker v-model="timer" type="daterange" value-format="yyyy-MM-dd" size="small" range-separator="" start-placeholder="开始日期" end-placeholder="结束日期"/>
<el-input v-model="supplierNameValue" size="small" placeholder="外协厂家零件图号表单号项目名称" style="width: 220px" clearable/>
<el-date-picker v-model="timer" type="daterange" value-format="yyyy-MM-dd" size="small" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"/>
<el-select v-model="MaterialsValue" placeholder="外协状态" filterable size="small" style="width: 120px" clearable>
<el-option
v-for="item in Materials"
@@ -138,7 +138,7 @@ export default {
searchTable(check, this.supplierNameValue, check1, this.MaterialsValue, check2, this.timer[0], this.timer[1], 100000000, this.pageCurrent).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
this.tableData1.push({
到货状态: response.data.rows[i].到货状态,
到货状态: response.data.rows[i].到货状态 === '0' ? '未到' : '已到',
项目名称: response.data.rows[i].项目名称,
零件图号: response.data.rows[i].零件图号,
零件名称: response.data.rows[i].零件名称,
@@ -147,7 +147,7 @@ export default {
表单号: response.data.rows[i].表单号,
工艺计划流水号: response.data.rows[i].工艺计划流水号,
单件是否外协: response.data.rows[i].单件是否外协,
任务下达日期: response.data.rows[i].任务下达日期,
任务下达日期: response.data.rows[i].任务下达日期 ? response.data.rows[i].任务下达日期.split(' ')[0] : '',
外协工序: ''
})
}

View File

@@ -4,6 +4,17 @@
<el-row style="width: 1020px">
<el-row>
<el-input v-model="ManufacturerName" size="small" placeholder="外协厂家" clearable style="width:200px"/>
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 5px;margin-top: 10px;margin-bottom: 10px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" class="el-icon-search" style="margin-left: 20px" size="small" plain @click="pageCurrent=1;pageSize=50;getParts()">查询</el-button>
</el-row>
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row height="300" style="width: 690px;" border element-loading-text="拼命加载中" @row-click="rowClick">
@@ -45,18 +56,18 @@
@current-change="handleCurrentChange"/>
</div>
</el-row>
<el-col style="width: 600px">
<el-col style="width: 520px">
<el-row>
<span style="margin-top: 10px">开票明细:</span>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd1('form1')">新增</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd1('form1')">开票</el-button>
</el-row>
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe height="400" style="width: 100%" border element-loading-text="拼命加载中">
<el-table-column label="发票号" prop="发票号" align="center" width="180px">
<el-table-column label="发票号" prop="发票号" align="center" width="160px">
<template slot-scope="scope">
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column label="票金额(元)" prop="票金额" align="center" width="110px">
<el-table-column label="票金额(元)" prop="票金额" align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
@@ -66,7 +77,7 @@
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<el-table-column align="center" label="操作" fixed="right" width="130px">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit" @click="ChangeOpen1(scope.row)">编辑</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" @click="handleDelete1(scope.row)">删除</el-button>
@@ -85,10 +96,10 @@
@current-change="handleCurrentChange2"/>
</div>
</el-col>
<el-col style="width: 420px">
<el-col style="width: 350px">
<el-row>
<span style="margin-top: 10px">付款明细:</span>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd2('form2')">新增</el-button>
<el-button type="distribution" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd2('form2')">付款</el-button>
</el-row>
<el-table v-loading="loading3" :data="tableData3" size="mini" stripe height="400" style="width: 100%" border element-loading-text="拼命加载中">
<el-table-column label="付款金额(元)" prop="付款金额" align="center" width="110px">
@@ -101,7 +112,7 @@
{{ scope.row.付款日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<el-table-column align="center" label="操作" fixed="right" width="130px">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-edit" @click="ChangeOpen2(scope.row)">编辑</el-button>
<el-button type="text" size="mini" icon="el-icon-delete" @click="handleDelete2(scope.row)">删除</el-button>
@@ -209,6 +220,7 @@ export default {
id_edit1: '',
param1: 0,
title1: '',
startTime: '',
dialogFormVisible1: false,
form1: {
发票号: '',
@@ -242,9 +254,10 @@ export default {
this.loading = true
this.tableData = []
var check
var check2 = 0
var check2
this.startTime ? check2 = 1 : (check2 = 0, this.startTime = '')
this.ManufacturerName ? check = 1 : check = 0
searchtable(check, this.ManufacturerName, check2, '', '', this.pageCurrent, this.pageSize).then(response => {
searchtable(check, this.ManufacturerName, check2, this.startTime[0], this.startTime[1], this.pageCurrent, this.pageSize).then(response => {
this.loading = false
if (response.data.rows.length !== 0) {
this.tableData = response.data.rows
@@ -259,14 +272,16 @@ export default {
this.tableData2 = []
this.loading3 = true
this.tableData3 = []
getInvoice(row.外协厂家流水号, this.pageCurrent2, this.pageSize2).then(response => {
var check2
this.startTime ? check2 = 1 : (check2 = 0, this.startTime = '')
getInvoice(row.外协厂家流水号, check2, this.startTime[0], this.startTime[1], this.pageCurrent2, this.pageSize2).then(response => {
this.loading2 = false
if (response.data.rows.length !== 0) {
this.tableData2 = response.data.rows
this.total2 = response.data.total
}
})
getPayment(row.外协厂家流水号, this.pageCurrent2, this.pageSize2).then(response => {
getPayment(row.外协厂家流水号, check2, this.startTime[0], this.startTime[1], this.pageCurrent2, this.pageSize2).then(response => {
this.loading3 = false
if (response.data.rows.length !== 0) {
this.tableData3 = response.data.rows

View File

@@ -35,11 +35,11 @@
</el-card>
<el-card>
<el-col :span="8">
<el-input v-model="manufacturers" size="small" placeholder="外协厂家" style="width:160px" clearable @keyup.enter.native="pageSize=20;pageList=1;fetchData()" @clear="pageSize=20;pageList=1;fetchData()"/>
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px" plain @click="pageSize=20;pageList=1;fetchData()">查询</el-button>
<el-input v-model="manufacturers" size="small" placeholder="外协厂家或表单号" style="width:160px" clearable @keyup.enter.native="fetchData()"/>
<el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px" plain @click="fetchData()">查询</el-button>
<el-checkbox v-model="isChecked" size="small" label="历史"/>
<el-button type="primary" size="mini" icon="el-icon-circle-plus-outline" style="margin-left:1px" @click="handleAdd()">新增</el-button>
<el-table v-loading="loading2" :data="List" highlight-current-row height="450" size="mini" border @row-click="searchProcess" >
<el-button type="distribution" size="mini" plain icon="el-icon-circle-plus-outline" style="margin-left:1px" @click="handleAdd()">新增</el-button>
<el-table v-loading="loading2" :data="List" highlight-current-row height="550" size="mini" border @row-click="searchProcess" >
<el-table-column label="表单号" prop="表单号" align="center" min-width="155px">
<template slot-scope="scope">
{{ scope.row.表单号 }}
@@ -57,27 +57,16 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
v-show="!loading2"
:current-page="currentPage"
:page-sizes="[20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-col>
<el-col :span="16">
<div>
<el-button type="warning" size="mini" icon="el-icon-arrow-down" style="margin-top:3px" plain @click="getSpareParts">选入零件</el-button>
<el-button type="primary" size="mini" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;float: right" plain @click="exportTable('RWD')">导出任务单</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="成交" placement="top">
<el-button type="success" size="mini" icon="el-icon-success" style="margin-left:10px;margin-top: 3px;float: right" plain @click="Deal">提交</el-button>
<el-button type="success" size="mini" icon="el-icon-upload2" style="margin-left:10px;margin-top: 3px;float: right" plain @click="Deal">提交</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="核对价格信息后确定" placement="top">
<el-button type="success" size="mini" icon="el-icon-edit" style="margin-left:10px;margin-top: 3px;float: right" plain @click="confirmPrice">保存</el-button>
<el-button type="success" size="mini" icon="el-icon-tickets" style="margin-left:10px;margin-top: 3px;float: right" plain @click="confirmPrice">保存</el-button>
</el-tooltip>
</div>
<el-table v-loading="loading" :data="List3" :summary-method="getSummaries" height="488" size="mini" show-summary border>
@@ -103,7 +92,7 @@
</el-table-column>
<el-table-column label="外协价格" align="center" width="130px">
<template slot-scope="scope">
<el-input v-model="scope.row.加工价格_成交" size="small"/>
<el-input v-positive="'float'" v-model="scope.row.加工价格_成交" type="float" size="small"/>
</template>
</el-table-column>
<el-table-column label="机加工开始时间" align="center" width="150px">
@@ -284,29 +273,18 @@ export default {
])
},
created() {
this.fetchData()
this.getList()
},
methods: {
// 初始化查询
fetchData() {
this.ManufacturerName = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
this.loading2 = true
this.List = []
this.List3 = []
this.Number = ''
this.manufacturers ? this.num1 = 1 : this.num1 = 0
getTable(this.num1, this.manufacturers, this.isChecked, this.currentPage, this.pageSize).then(response => {
this.total = parseInt(response.data.total)
this.List = response.data.rows
getTable(this.num1, this.manufacturers, this.isChecked).then(response => {
this.List = response.data
})
this.loading2 = false
},
@@ -326,6 +304,15 @@ export default {
},
// 查询未选入零件
getList() {
this.ManufacturerName = []
initOutHelp().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ManufacturerName.push({
label: response.data[i].外协厂家名称,
value: response.data[i].外协厂家流水号
})
}
})
this.partNumber ? this.check = 1 : this.check = 0
this.loading1 = true
this.List1 = []
@@ -349,7 +336,19 @@ export default {
this.Number = row.外协加工任务单流水号
this.ManufactorNumber = row.外协厂家流水号
getParts(row.外协加工任务单流水号).then(response => {
this.List3 = response.data
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.List3.push({
外协加工任务单明细流水号: response.data[i].外协加工任务单明细流水号,
加工价格_成交: response.data[i].加工价格_成交.toFixed(2),
机加工开始时间: response.data[i].机加工开始时间,
零件图号: response.data[i].零件图号,
零件名称: response.data[i].零件名称,
批次数量: response.data[i].批次数量,
外协工序: response.data[i].外协工序
})
}
}
this.loading = false
})
},
@@ -429,9 +428,11 @@ export default {
message: '信息添加成功',
type: 'success'
})
this.dialogFormVisible = false
this.title = ''
this.manufacturers = this.form.表单号
console.log(this.manufacturers, 111111)
this.fetchData()
this.dialogFormVisible = false
} else {
this.$message.error('信息添加失败')
}
@@ -451,7 +452,7 @@ export default {
},
// 删除任务单
handleDelete(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
this.$confirm('该表单外协任务将释放', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -499,6 +500,7 @@ export default {
this.List3 = []
getParts(this.Number).then(response => {
this.List3 = response.data
this.getList()
this.loading = false
})
})
@@ -574,7 +576,7 @@ export default {
},
// 移除
handleDelete1(row) {
this.$confirm('此操作将移除该行, 是否继续?', '提示', {
this.$confirm('确定取消该条外协任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'