添加营销系统模块
This commit is contained in:
338
src/views/Outsourcing/InterBudgetaryBudgets/index.vue
Normal file
338
src/views/Outsourcing/InterBudgetaryBudgets/index.vue
Normal file
@@ -0,0 +1,338 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-radio-group v-model="radio" style="margin: 10px;" @change="radioChange">
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date01"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择开始日期"/>
|
||||
|
||||
<span>结束时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date02"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择结束日期"/>
|
||||
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize2=10; pageCurrent2=1;searchPartNum()">查询</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="种类" align="center" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投产数量" align="center" width="180px">
|
||||
<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="面积" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.面积 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料费" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料费 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="edit(scope.$index, scope.row, 'form')">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" :summary-method="getSummaries" border style="width: 100%;max-height: 390px;" height="340px" stripe show-summary>
|
||||
<el-table-column label="序号" width="80" align="center" type="index"/>
|
||||
<el-table-column label="工艺名称" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].工艺名称" size="mini" placeholder="工艺名称" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].工艺要求" size="mini" readonly type="textarea"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单件" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].单件定额工时_系数" size="mini" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准结" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].准结定额工时" size="mini" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协预算价格" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].外协预算价格_系数" size="mini" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button size="small" type="primary" style="float:right;margin: 10px" @click="saveRowPrice">保存</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="编辑" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="面积" prop="面积" style="margin-left: 200px">
|
||||
<el-input v-model="form.面积" placeholder="面积" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="重量" prop="重量" style="margin-left: 200px">
|
||||
<el-input v-model="form.重量" placeholder="重量" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="材料费" prop="材料费" style="margin-left: 200px">
|
||||
<el-input v-model="form.材料费" placeholder="材料费" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPartNum1, searchPartNum2, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/InterBudgetaryBudgets'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lingjianhao: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
面积: '',
|
||||
重量: '',
|
||||
材料费: ''
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
cailiaofei: '',
|
||||
result: [],
|
||||
result2: [],
|
||||
radio: 1,
|
||||
partName: '', // 零件名称
|
||||
date01: '', // 开始时间
|
||||
date02: '', // 结束时间
|
||||
loading0: false,
|
||||
tableData: [],
|
||||
loading2: false,
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange() {
|
||||
this.tableData2 = []
|
||||
},
|
||||
// 查零件号
|
||||
searchPartNum() {
|
||||
if (this.partName === null) {
|
||||
this.partName = ''
|
||||
}
|
||||
if (this.date01 === '') {
|
||||
this.date01 = null
|
||||
}
|
||||
if (this.date02 === '') {
|
||||
this.date02 = null
|
||||
}
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.tableData = []
|
||||
if (this.radio === 1) {
|
||||
searchPartNum1(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
} else {
|
||||
searchPartNum2(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
}
|
||||
},
|
||||
// 合计
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = ['', '', '', '', '', 0]
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) {
|
||||
sums[1] = '统计总价:'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[5] += parseFloat(data[i].外协预算价格_系数)
|
||||
}
|
||||
sums[5] = parseInt(sums[5] * 100) / 100
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
searchTable(row) {
|
||||
this.loading0 = true
|
||||
this.tableData = []
|
||||
searchTable(row.工艺计划流水号, 1).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].外协预算价格_系数 !== 0) {
|
||||
response.data[i].外协预算价格_系数 = response.data[i].外协预算价格_系数.toFixed(2)
|
||||
}
|
||||
}
|
||||
this.cailiaofei = row.材料费
|
||||
this.tableData = response.data
|
||||
this.loading0 = false
|
||||
})
|
||||
},
|
||||
// 打开编辑
|
||||
edit(index, row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.面积 = row.面积
|
||||
this.form.重量 = row.重量
|
||||
this.form.材料费 = row.材料费
|
||||
this.lingjianhao = row.工艺计划流水号
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 编辑确定
|
||||
submit(formName) {
|
||||
this.WithdrawingEdit()
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 编辑
|
||||
WithdrawingEdit() {
|
||||
if ((this.form.重量 === '' || this.form.重量 === null) && (this.form.面积 === '' || this.form.面积 === null)) {
|
||||
this.form.重量 = null
|
||||
this.form.面积 = null
|
||||
}
|
||||
saveWeightArea(this.lingjianhao, this.form.重量, this.form.面积).then(response => {
|
||||
this.WithdrawingEdit2()
|
||||
})
|
||||
},
|
||||
WithdrawingEdit2() {
|
||||
if (this.form.材料费 === '' || this.form.材料费 === null) {
|
||||
this.form.材料费 = 0
|
||||
}
|
||||
saveMaterialPrice(this.lingjianhao, this.form.材料费).then(response => {
|
||||
this.$message.success('保存成功')
|
||||
this.searchPartNum()
|
||||
})
|
||||
},
|
||||
// 关闭扣款编辑
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 保存行价格
|
||||
saveRowPrice() {
|
||||
if (this.tableData.length === 0) {
|
||||
this.$message.error('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_系数), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
|
||||
})
|
||||
}
|
||||
this.$message.success('保存成功')
|
||||
this.searchPartNum()
|
||||
}
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.searchPartNum()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchPartNum()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
461
src/views/Outsourcing/OutFactoryMaintenance/index.vue
Normal file
461
src/views/Outsourcing/OutFactoryMaintenance/index.vue
Normal file
@@ -0,0 +1,461 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>厂家名称:</span>
|
||||
<el-input v-model="ManufacturerName" clearable size="small" style="width:200px;margin:10px;"/>
|
||||
<span>电话:</span>
|
||||
<el-input v-model="phNumber" size="small" clearable style="width:200px;margin:10px;"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;searchTable()">查询</el-button>
|
||||
<el-button type="primary" class="el-icon-circle-plus-outline" size="small" @click="editType1('form');param = 0">新增</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" height="650" style="width: 100%;" border>
|
||||
<el-table-column
|
||||
label=" "
|
||||
align="center"
|
||||
type="index"
|
||||
width="50"/>
|
||||
<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="110px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家简称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电话" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.设备情况 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="类别" align="center" width="110px">-->
|
||||
<!--<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="150px">
|
||||
<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="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading0"
|
||||
: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="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂家名称" prop="ManufacturerName" >
|
||||
<el-input v-model="form.ManufacturerName" placeholder="厂家名称" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="厂家简称" prop="ManufacturerAbbreviation">
|
||||
<el-input v-model="form.ManufacturerAbbreviation" placeholder="厂家简称" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="地址" clearable size="small" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人" prop="roleName">
|
||||
<el-input v-model="form.roleName" placeholder="联系人" clearable size="small"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话" prop="phNumber">
|
||||
<el-input v-model="form.phNumber" placeholder="电话" clearable size="small"/>
|
||||
</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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="类别" prop="category">-->
|
||||
<!--<el-input v-model="form.category" placeholder="类别" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="关注" prop="attention">-->
|
||||
<!--<el-input v-model="form.attention" placeholder="关注" clearable size="small" ></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--</el-row>-->
|
||||
<el-row>
|
||||
<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>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!--<el-row>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--<el-form-item label="厂家序号" prop="ManufacturerNumber">-->
|
||||
<!--<el-input v-model="form.ManufacturerNumber" placeholder="厂家序号" clearable size="small"></el-input>-->
|
||||
<!--</el-form-item>-->
|
||||
<!--</el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!--</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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchtable, edittype, handlechange, handledelete } from '@/api/Outsourcing/OutFactoryMaintenance'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
count1: 0,
|
||||
count2: 0, // 清表单验证计数器
|
||||
ManufacturerNumber: '', // 厂家序号
|
||||
num1: '',
|
||||
ManufacturerName: '', // 厂家名称
|
||||
num2: '',
|
||||
address: '', // 地址
|
||||
num3: '',
|
||||
roleName: '', // 联系人
|
||||
num4: '',
|
||||
phNumber: '', // 电话
|
||||
num5: '',
|
||||
Fax: '', // 传真
|
||||
num6: '',
|
||||
Remarks: '', // 备注
|
||||
num7: '',
|
||||
category: '', // 类别
|
||||
num8: '',
|
||||
EquipmentCondition: '', // 设备情况
|
||||
num9: '',
|
||||
ManufacturerAbbreviation: '', // 厂家简称
|
||||
num10: '',
|
||||
attention: '', // 关注
|
||||
num11: '',
|
||||
tableData: [], // 表格数据
|
||||
pageSize: 10,
|
||||
pageCurrent: 1,
|
||||
total: 0,
|
||||
CoManufacturerFlowNumber: '', // 外协厂家流水号
|
||||
CoManufacturerFlowNumber1: '',
|
||||
dialogFormVisible: false,
|
||||
title1: '',
|
||||
form: {
|
||||
ManufacturerNumber: '', // 厂家序号
|
||||
ManufacturerName: '', // 厂家名称
|
||||
address: '', // 地址
|
||||
roleName: '', // 联系人
|
||||
phNumber: '', // 电话
|
||||
Fax: '', // 传真
|
||||
Remarks: '', // 备注
|
||||
category: '', // 类别
|
||||
EquipmentCondition: '', // 设备情况
|
||||
ManufacturerAbbreviation: '', // 厂家简称
|
||||
attention: '' // 关注
|
||||
},
|
||||
rules: {
|
||||
ManufacturerName: [{ required: true, message: '请输入厂家名称', trigger: 'blur' }],
|
||||
ManufacturerAbbreviation: [{ required: true, message: '请输入厂家简称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.searchTable()
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
if (this.ManufacturerNumber !== '' && this.ManufacturerNumber !== null) {
|
||||
this.num1 = 1
|
||||
} else {
|
||||
this.num1 = 0
|
||||
this.ManufacturerNumber = ''
|
||||
}
|
||||
if (this.ManufacturerName !== '' && this.ManufacturerName !== null) {
|
||||
this.num2 = 1
|
||||
} else {
|
||||
this.num2 = 0
|
||||
this.ManufacturerName = ''
|
||||
}
|
||||
if (this.ManufacturerAbbreviation !== '' && this.ManufacturerAbbreviation !== null) {
|
||||
this.num10 = 1
|
||||
} else {
|
||||
this.num10 = 0
|
||||
this.ManufacturerAbbreviation = ''
|
||||
}
|
||||
if (this.address !== '' && this.address !== null) {
|
||||
this.num3 = 1
|
||||
} else {
|
||||
this.num3 = 0
|
||||
this.address = ''
|
||||
}
|
||||
if (this.roleName !== '' && this.roleName !== null) {
|
||||
this.num4 = 1
|
||||
} else {
|
||||
this.num4 = 0
|
||||
this.roleName = ''
|
||||
}
|
||||
if (this.phNumber !== '' && this.phNumber !== null) {
|
||||
this.num5 = 1
|
||||
} else {
|
||||
this.num5 = 0
|
||||
this.phNumber = ''
|
||||
}
|
||||
if (this.Fax !== '' && this.Fax !== null) {
|
||||
this.num6 = 1
|
||||
} else {
|
||||
this.num6 = 0
|
||||
this.Fax = ''
|
||||
}
|
||||
if (this.Remarks !== '' && this.Remarks !== null) {
|
||||
this.num7 = 1
|
||||
} else {
|
||||
this.num7 = 0
|
||||
this.Remarks = ''
|
||||
}
|
||||
if (this.category !== '' && this.category !== null) {
|
||||
this.num8 = 1
|
||||
} else {
|
||||
this.num8 = 0
|
||||
this.category = ''
|
||||
}
|
||||
if (this.attention !== '' && this.attention !== null) {
|
||||
this.num11 = 1
|
||||
} else {
|
||||
this.num11 = 0
|
||||
this.attention = ''
|
||||
}
|
||||
if (this.EquipmentCondition !== '' && this.EquipmentCondition !== null) {
|
||||
this.num9 = 1
|
||||
} else {
|
||||
this.num9 = 0
|
||||
this.EquipmentCondition = ''
|
||||
}
|
||||
searchtable(this.pageCurrent, this.pageSize, this.num1, this.ManufacturerNumber, this.num2, this.ManufacturerName, this.num10, this.ManufacturerAbbreviation, this.num3, this.address, this.num4, this.roleName, this.num5, this.phNumber, this.num6, this.Fax, this.num7, this.Remarks, this.num8, this.category, this.num11, this.attention, this.num9, this.EquipmentCondition).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading0 = false
|
||||
})
|
||||
},
|
||||
// 点击增加
|
||||
editType1(formName) {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.form.ManufacturerName = ''
|
||||
this.form.ManufacturerNumber = ''
|
||||
this.form.address = ''
|
||||
this.form.roleName = ''
|
||||
this.form.phNumber = ''
|
||||
this.form.Fax = ''
|
||||
this.form.Remarks = ''
|
||||
this.form.category = ''
|
||||
this.form.EquipmentCondition = ''
|
||||
this.form.ManufacturerAbbreviation = ''
|
||||
this.form.attention = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 增加确定
|
||||
editType() {
|
||||
edittype(this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息增加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = 10
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息增加失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 编辑打开
|
||||
handleChange1(index, row, formName) {
|
||||
this.count2 = this.count2 + 1
|
||||
if (this.count2 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.form.ManufacturerNumber = row.序号
|
||||
this.form.ManufacturerName = row.外协厂家名称
|
||||
this.form.address = row.地址
|
||||
this.form.roleName = row.联系人
|
||||
this.form.phNumber = row.电话
|
||||
this.form.Fax = row.传真
|
||||
this.form.Remarks = row.备注
|
||||
this.form.category = row.类别
|
||||
this.form.EquipmentCondition = row.设备情况
|
||||
this.form.ManufacturerAbbreviation = row.外协厂家简称
|
||||
this.form.attention = row.关注
|
||||
this.dialogFormVisible = true
|
||||
this.title1 = '编辑'
|
||||
this.CoManufacturerFlowNumber1 = row.外协厂家流水号
|
||||
},
|
||||
// 编辑确定
|
||||
handleChange() {
|
||||
handlechange(this.CoManufacturerFlowNumber1, this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.param === 0) {
|
||||
this.editType()
|
||||
} else {
|
||||
this.handleChange()
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handledelete(row.外协厂家流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('信息删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-input{
|
||||
width: 210px;
|
||||
}
|
||||
</style>
|
||||
388
src/views/Outsourcing/OutsourcingDataMaintenance/index.vue
Normal file
388
src/views/Outsourcing/OutsourcingDataMaintenance/index.vue
Normal file
@@ -0,0 +1,388 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>工艺名称:</span>
|
||||
<el-input v-model="Code" placeholder="工艺名称" clearable size="small" style="width: 15%;top: 1px;"/>
|
||||
<span style="margin-left: 10px">工艺分类:</span>
|
||||
<el-select v-model="processClassificationValue" size="small" filterable clearable placeholder="工艺分类">
|
||||
<el-option
|
||||
v-for="item in processClassification"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" class="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize=10;pageList=1;getTableData()">查询</el-button>
|
||||
<el-button v-if="false" type="primary" class="el-icon-circle-plus-outline" size="small" @click="addData('form1')">新增</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card class="box-card">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData3"
|
||||
border
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%;"
|
||||
height="650">
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="序号"
|
||||
type="index"
|
||||
width="55"/>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="工艺名称"
|
||||
width="300">
|
||||
<template slot-scope="scope">{{ scope.row.工艺名称 }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="工艺名称简称"
|
||||
width="280">
|
||||
<template slot-scope="scope">{{ scope.row.工艺名称简称 }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="工时价格(元/分)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode1[scope.$index]">
|
||||
<h4>{{ scope.row.外协价格1 }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="重量价格(元/kg)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode2[scope.$index]">
|
||||
<h4>{{ scope.row.重量价格1 }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="面积价格(元/m2)">
|
||||
<template slot-scope="scope">
|
||||
<div :class="colorCode3[scope.$index]">
|
||||
<h4>{{ scope.row.面积价格1 }}</h4>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="130px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">编辑</el-button>
|
||||
<el-button
|
||||
v-if="false"
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="currentPage"
|
||||
: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 :visible.sync="dialogFormVisible1" title="外协价格计算系数维护" center width="20%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm" label-width="100px" style="width: 90%;margin: auto">
|
||||
<el-row style="margin: 2px 0 30px 30px;">
|
||||
<el-radio-group v-model="radio">
|
||||
<el-radio :label="1">工时</el-radio>
|
||||
<el-radio :label="2">重量</el-radio>
|
||||
<el-radio :label="3">面积</el-radio>
|
||||
</el-radio-group>
|
||||
</el-row>
|
||||
|
||||
<el-form-item v-if="radio === 1" label="工时(元/分)" prop="Price">
|
||||
<el-input v-model="form.Price" size="small" placeholder="请输入工时价格"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="radio === 2" label="重量(元/kg)" prop="weightPrice">
|
||||
<el-input v-model="form.weightPrice" size="small" placeholder="请输入重量价格"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="radio === 3" label="面积(元/m2)" prop="areaPrice">
|
||||
<el-input v-model="form.areaPrice" size="small" placeholder="请输入面积价格"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="14"/>
|
||||
<el-form-item >
|
||||
<el-button size="small" @click="callOff('form')">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submit('form')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="新增工艺" center width="28%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="工艺名称" prop="Name">
|
||||
<el-input v-model="form1.Name" size="small" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工艺名称简称" prop="ShortName">
|
||||
<el-input v-model="form1.ShortName" size="small" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff1('form1')">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submit1('form1')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getType, getTable, delList, Add, editList } from '@/api/Outsourcing/OutsourcingDataMaintenance'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
colorCode1: [],
|
||||
colorCode2: [],
|
||||
colorCode3: [],
|
||||
radio: 1,
|
||||
processClassificationValue: '',
|
||||
processClassification: [],
|
||||
form: { // 添加修改表单
|
||||
Price: '', // 外协价格
|
||||
weightPrice: '', // 重量价格
|
||||
areaPrice: '' // 面积价格
|
||||
},
|
||||
count1: 0,
|
||||
count2: 0,
|
||||
form1: {
|
||||
Name: '',
|
||||
ShortName: ''
|
||||
},
|
||||
EditCode: '',
|
||||
loading: false,
|
||||
Code_Check: false,
|
||||
Code_Check1: false,
|
||||
Code: '', // 工艺计划流水号
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false, // 新增编辑弹框
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageList: 1, // 后台获取页
|
||||
currentPage: 1, // 显示当前页
|
||||
tableData3: [], // 表格数据
|
||||
rules: { // 表单验证规则
|
||||
Price: [{ required: true, message: '请输入工时价格', trigger: 'change' }],
|
||||
weightPrice: [{ required: true, message: '请输入重量价格', trigger: 'change' }],
|
||||
areaPrice: [{ required: true, message: '请输入面积价格', trigger: 'change' }],
|
||||
Name: [{ required: true, message: '请输入工艺名称', trigger: 'change' }],
|
||||
ShortName: [{ required: true, message: '请输入工艺名称简称', trigger: 'change' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
// 初始化获取工艺分类
|
||||
fetchData() {
|
||||
this.processClassificationValue = ''
|
||||
this.processClassification = []
|
||||
getType().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.processClassification.push({
|
||||
label: response.data[i].工艺分类名称,
|
||||
value: response.data[i].工艺分类流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 按条件查询
|
||||
getTableData() {
|
||||
this.loading = true
|
||||
this.tableData3 = []
|
||||
this.colorCode1 = []
|
||||
this.colorCode2 = []
|
||||
this.colorCode3 = []
|
||||
if (this.Code === '' || this.Code === null) {
|
||||
this.Code_Check = false
|
||||
} else {
|
||||
this.Code_Check = true
|
||||
}
|
||||
if (this.processClassificationValue === '' || this.processClassificationValue === null) {
|
||||
this.Code_Check1 = false
|
||||
} else {
|
||||
this.Code_Check1 = true
|
||||
}
|
||||
getTable(this.Code_Check, this.Code, this.Code_Check1, this.processClassificationValue, this.pageList, this.pageSize).then(response => {
|
||||
this.total = parseInt(response.data.total)
|
||||
if (response.data.rows.length !== 0) {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].外协价格计算标准流水号 === '1') {
|
||||
this.colorCode1.push('mianji')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('')
|
||||
} else if (response.data.rows[i].外协价格计算标准流水号 === '2') {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('mianji')
|
||||
this.colorCode3.push('')
|
||||
} else {
|
||||
this.colorCode1.push('')
|
||||
this.colorCode2.push('')
|
||||
this.colorCode3.push('mianji')
|
||||
}
|
||||
}
|
||||
this.tableData3 = response.data.rows
|
||||
}
|
||||
})
|
||||
this.loading = false
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delList(row.工艺编号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.getTableData()
|
||||
this.$message({
|
||||
message: '已被成功删除',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 打开添加
|
||||
addData(formName) {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.form1.Name = ''
|
||||
this.form1.ShortName = ''
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 添加
|
||||
submitAdd() {
|
||||
Add(this.form1.Name, this.form1.ShortName).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '添加成功!'
|
||||
})
|
||||
this.pageList = 1
|
||||
this.pageSize = 10
|
||||
this.getTableData()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
this.dialogFormVisible2 = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打开编辑
|
||||
handleEdit(index, row, formName) {
|
||||
this.count2 = this.count2 + 1
|
||||
if (this.count2 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.radio = parseInt(row.外协价格计算标准流水号)
|
||||
this.form.Price = row.外协价格1
|
||||
this.EditCode = row.工艺编号
|
||||
this.form.weightPrice = row.重量价格1
|
||||
this.form.areaPrice = row.面积价格1
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
// 提交编辑
|
||||
submitEdit() {
|
||||
if (this.form.Price === '0') {
|
||||
this.form.Price = ''
|
||||
}
|
||||
if (this.form.weightPrice === '0') {
|
||||
this.form.weightPrice = ''
|
||||
}
|
||||
if (this.form.areaPrice === '0') {
|
||||
this.form.areaPrice = ''
|
||||
}
|
||||
editList(this.EditCode, this.form.Price, this.form.weightPrice, this.form.areaPrice, this.radio).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '信息更新成功!'
|
||||
})
|
||||
this.getTableData()
|
||||
} else {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitEdit()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
submit1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitAdd()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
callOff1(formName) {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageList = 1
|
||||
this.pageSize = val
|
||||
this.getTableData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageList = val
|
||||
this.getTableData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.mianji{
|
||||
background-color: #7EE3FC;
|
||||
border: 1px solid #1f2d3d;
|
||||
}
|
||||
</style>
|
||||
344
src/views/Outsourcing/OutsourcingInspectionEntry/index.vue
Normal file
344
src/views/Outsourcing/OutsourcingInspectionEntry/index.vue
Normal file
@@ -0,0 +1,344 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" clearable style="width:200px"/>
|
||||
<span>外协厂家:</span>
|
||||
<el-select v-model="outHelpValue" size="small" filterable remote clearable placeholder="外协厂家">
|
||||
<el-option
|
||||
v-for="item in outHelp"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNum" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="PageCurrent=1;PageSize=10;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" border style="width: 100%;" height="650" stripe>
|
||||
<el-table-column label="合同号" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="厂家" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家简称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件号" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="保存" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" icon="el-icon-cjn-09" type="primary" @click="saveRow(scope.row)">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="废品" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].废品数量" size="mini" disabled/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="1检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:readonly="readonly1[scope.$index]"
|
||||
v-model="tableData[scope.$index].交检日期1"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量1" :readonly="readonly1[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled2[scope.$index]"
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].检查日期1"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量1" :disabled="disabled2[scope.$index]" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="2检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled3[scope.$index]"
|
||||
:readonly="readonly2[scope.$index]"
|
||||
v-model="tableData[scope.$index].交检日期2"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量2" :disabled="disabled3[scope.$index]" :readonly="readonly2[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled4[scope.$index]"
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].检查日期2"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量2" :disabled="disabled4[scope.$index]" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="3检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled5[scope.$index]"
|
||||
v-model="tableData[scope.$index].交检日期3"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量3" :disabled="disabled5[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled6[scope.$index]"
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].检查日期3"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量3" :disabled="disabled6[scope.$index]" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-if="!loading0"
|
||||
: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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initOutHelp, searchTable, saveRow } from '@/api/Outsourcing/OutsourcingInspectionEntry'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
contractNum: '',
|
||||
outHelpValue: '',
|
||||
outHelp: [],
|
||||
partNum: '',
|
||||
tableData: [],
|
||||
readonly1: [],
|
||||
readonly2: [],
|
||||
readonly3: [],
|
||||
disabled2: [],
|
||||
disabled3: [],
|
||||
disabled4: [],
|
||||
disabled5: [],
|
||||
disabled6: [],
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.outHelp = []
|
||||
initOutHelp().then(response => { // 初始化外协厂家;*这里模糊查询省一个存储过程
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.outHelp.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
this.tableData = []
|
||||
if (this.contractNum === '') {
|
||||
this.check1 = 0
|
||||
} else { this.check1 = 1 }
|
||||
if (this.outHelpValue === '') {
|
||||
this.check2 = 0
|
||||
} else { this.check2 = 1 }
|
||||
if (this.partNum === '') {
|
||||
this.check3 = 0
|
||||
} else { this.check3 = 1 }
|
||||
searchTable(this.PageCurrent, this.PageSize, this.check2, this.outHelpValue, this.check1, this.contractNum, this.check3, this.partNum).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.judge()
|
||||
this.loading0 = false
|
||||
})
|
||||
},
|
||||
// 判断进度
|
||||
judge() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].合格数量1 === null || this.tableData[i].合格数量1 === '') {
|
||||
this.readonly1[i] = false
|
||||
} else {
|
||||
this.readonly1[i] = true
|
||||
}
|
||||
if (this.tableData[i].合格数量2 === null || this.tableData[i].合格数量2 === '') {
|
||||
this.readonly2[i] = false
|
||||
} else {
|
||||
this.readonly2[i] = true
|
||||
}
|
||||
if (this.tableData[i].合格数量3 === null || this.tableData[i].合格数量3 === '') {
|
||||
this.readonly3[i] = false
|
||||
} else {
|
||||
this.readonly3[i] = true
|
||||
}
|
||||
if (this.tableData[i].交检数量1 === null || this.tableData[i].交检数量1 === '') {
|
||||
this.disabled2[i] = true
|
||||
} else {
|
||||
this.disabled2[i] = false
|
||||
}
|
||||
if (this.tableData[i].合格数量1 === null || this.tableData[i].合格数量1 === '') {
|
||||
this.disabled3[i] = true
|
||||
} else {
|
||||
this.disabled3[i] = false
|
||||
}
|
||||
if (this.tableData[i].交检数量2 === null || this.tableData[i].交检数量2 === '') {
|
||||
this.disabled4[i] = true
|
||||
} else {
|
||||
this.disabled4[i] = false
|
||||
}
|
||||
if (this.tableData[i].合格数量2 === null || this.tableData[i].合格数量2 === '') {
|
||||
this.disabled5[i] = true
|
||||
} else {
|
||||
this.disabled5[i] = false
|
||||
}
|
||||
if (this.tableData[i].交检数量3 === null || this.tableData[i].交检数量3 === '') {
|
||||
this.disabled6[i] = true
|
||||
} else {
|
||||
this.disabled6[i] = false
|
||||
}
|
||||
}
|
||||
},
|
||||
saveRow(row) {
|
||||
if (parseInt(row.交检数量1) > row.批次数量 || parseInt(row.交检数量1) + parseInt(row.交检数量2) > row.批次数量 || parseInt(row.交检数量1) + parseInt(row.交检数量2) + parseInt(row.交检数量3) > row.批次数量) {
|
||||
this.$message.error('超出零件数量范围')
|
||||
} else {
|
||||
if (row.交检日期1 === null) { row.交检日期1 = '' }
|
||||
if (row.交检数量1 === null) { row.交检数量1 = '' }
|
||||
if (row.检查日期1 === null) { row.检查日期1 = '' }
|
||||
if (row.合格数量1 === null) { row.合格数量1 = '' }
|
||||
if (row.交检日期2 === null) { row.交检日期2 = '' }
|
||||
if (row.交检数量2 === null) { row.交检数量2 = '' }
|
||||
if (row.检查日期2 === null) { row.检查日期2 = '' }
|
||||
if (row.合格数量2 === null) { row.合格数量2 = '' }
|
||||
if (row.交检日期3 === null) { row.交检日期3 = '' }
|
||||
if (row.交检数量3 === null) { row.交检数量3 = '' }
|
||||
if (row.检查日期3 === null) { row.检查日期3 = '' }
|
||||
if (row.合格数量3 === null) { row.合格数量3 = '' }
|
||||
saveRow(row.外协加工任务单明细流水号, row.交检日期1, row.交检数量1, row.检查日期1, row.合格数量1, row.交检日期2, row.交检数量2, row.检查日期2, row.合格数量2, row.交检日期3, row.交检数量3, row.检查日期3, row.合格数量3, row.废品数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
// this.PageCurrent = 1
|
||||
// this.PageSize = 10
|
||||
// this.searchTable()
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.doing-row4{
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:130px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
405
src/views/Outsourcing/OutsourcingInspectionEntry2/index.vue
Normal file
405
src/views/Outsourcing/OutsourcingInspectionEntry2/index.vue
Normal file
@@ -0,0 +1,405 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" clearable style="width:200px"/>
|
||||
<span>外协厂家:</span>
|
||||
<el-select v-model="outHelpValue" size="small" filterable remote clearable placeholder="外协厂家">
|
||||
<el-option
|
||||
v-for="item in outHelp"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNum" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="PageCurrent=1;PageSize=10;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" border style="width: 100%;" height="650" stripe>
|
||||
<el-table-column label="合同号" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="厂家" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家简称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件号" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="保存" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" icon="el-icon-cjn-09" type="primary" @click="saveRow(scope.row)">保存</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="废品" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].废品数量" :disabled="disabled_feipin[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="1检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].交检日期1"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量1" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled2[scope.$index]"
|
||||
v-model="tableData[scope.$index].检查日期1"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量1" :disabled="disabled2[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="2检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled3[scope.$index]"
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].交检日期2"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量2" :disabled="disabled3[scope.$index]" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled4[scope.$index]"
|
||||
v-model="tableData[scope.$index].检查日期2"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量2" :disabled="disabled4[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="3检" align="center">
|
||||
<el-table-column label="交检日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled5[scope.$index]"
|
||||
:readonly="true"
|
||||
v-model="tableData[scope.$index].交检日期3"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="外协科长填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交检数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].交检数量3" :disabled="disabled5[scope.$index]" :readonly="true" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查日期" width="160" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker
|
||||
:disabled="disabled6[scope.$index]"
|
||||
v-model="tableData[scope.$index].检查日期3"
|
||||
size="mini"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="检查员填选"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].合格数量3" :disabled="disabled6[scope.$index]" size="mini"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-if="!loading0"
|
||||
: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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initOutHelp, searchTable, saveRow } from '@/api/Outsourcing/OutsourcingInspectionEntry'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
contractNum: '',
|
||||
outHelpValue: '',
|
||||
outHelp: [],
|
||||
partNum: '',
|
||||
tableData: [],
|
||||
disabled_feipin: [],
|
||||
disabled2: [],
|
||||
disabled3: [],
|
||||
disabled4: [],
|
||||
disabled5: [],
|
||||
disabled6: [],
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.outHelp = []
|
||||
initOutHelp().then(response => { // 初始化外协厂家;*这里模糊查询省一个存储过程
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.outHelp.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
this.tableData = []
|
||||
if (this.contractNum === '') {
|
||||
this.check1 = 0
|
||||
} else { this.check1 = 1 }
|
||||
if (this.outHelpValue === '') {
|
||||
this.check2 = 0
|
||||
} else { this.check2 = 1 }
|
||||
if (this.partNum === '') {
|
||||
this.check3 = 0
|
||||
} else { this.check3 = 1 }
|
||||
searchTable(this.PageCurrent, this.PageSize, this.check2, this.outHelpValue, this.check1, this.contractNum, this.check3, this.partNum).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading0 = false
|
||||
this.judge()
|
||||
})
|
||||
},
|
||||
// 判断进度
|
||||
judge() {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
if (this.tableData[i].交检数量1 === null || this.tableData[i].交检数量1 === '') {
|
||||
this.disabled2[i] = true
|
||||
this.disabled_feipin[i] = true
|
||||
} else {
|
||||
this.disabled2[i] = false
|
||||
this.disabled_feipin[i] = false
|
||||
}
|
||||
if (this.tableData[i].合格数量1 === null || this.tableData[i].合格数量1 === '') {
|
||||
this.disabled3[i] = true
|
||||
} else {
|
||||
this.disabled3[i] = false
|
||||
}
|
||||
if (this.tableData[i].交检数量2 === null || this.tableData[i].交检数量2 === '') {
|
||||
this.disabled4[i] = true
|
||||
} else {
|
||||
this.disabled4[i] = false
|
||||
}
|
||||
if (this.tableData[i].合格数量2 === null || this.tableData[i].合格数量2 === '') {
|
||||
this.disabled5[i] = true
|
||||
} else {
|
||||
this.disabled5[i] = false
|
||||
}
|
||||
if (this.tableData[i].交检数量3 === null || this.tableData[i].交检数量3 === '') {
|
||||
this.disabled6[i] = true
|
||||
} else {
|
||||
this.disabled6[i] = false
|
||||
}
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
saveRow(row) {
|
||||
// if (parseInt(row.废品数量) > row.批次数量 || parseInt(row.合格数量1) + parseInt(row.废品数量) > row.批次数量 || parseInt(row.合格数量2) + parseInt(row.废品数量) > row.批次数量 || parseInt(row.合格数量3) + parseInt(row.废品数量) > row.批次数量 || parseInt(row.合格数量1) + parseInt(row.合格数量2) + parseInt(row.废品数量) > row.批次数量 || parseInt(row.合格数量3) + parseInt(row.合格数量2) + parseInt(row.合格数量1) + parseInt(row.废品数量) > row.批次数量) {
|
||||
if (row.合格数量1 !== '' && row.合格数量2 === '' && row.合格数量3 === '') {
|
||||
if (parseInt(row.合格数量1) + parseInt(row.废品数量) > row.交检数量1) {
|
||||
this.$message.error('超出零件数量范围')
|
||||
} else {
|
||||
if (row.交检日期1 === null) { row.交检日期1 = '' }
|
||||
if (row.交检数量1 === null) { row.交检数量1 = '' }
|
||||
if (row.检查日期1 === null) { row.检查日期1 = '' }
|
||||
if (row.合格数量1 === null) { row.合格数量1 = '' }
|
||||
if (row.交检日期2 === null) { row.交检日期2 = '' }
|
||||
if (row.交检数量2 === null) { row.交检数量2 = '' }
|
||||
if (row.检查日期2 === null) { row.检查日期2 = '' }
|
||||
if (row.合格数量2 === null) { row.合格数量2 = '' }
|
||||
if (row.交检日期3 === null) { row.交检日期3 = '' }
|
||||
if (row.交检数量3 === null) { row.交检数量3 = '' }
|
||||
if (row.检查日期3 === null) { row.检查日期3 = '' }
|
||||
if (row.合格数量3 === null) { row.合格数量3 = '' }
|
||||
saveRow(row.外协加工任务单明细流水号, row.交检日期1, row.交检数量1, row.检查日期1, row.合格数量1, row.交检日期2, row.交检数量2, row.检查日期2, row.合格数量2, row.交检日期3, row.交检数量3, row.检查日期3, row.合格数量3, row.废品数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = 10
|
||||
this.searchTable()
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
} else if (row.合格数量1 !== '' && row.合格数量2 !== '' && row.合格数量3 === '') {
|
||||
if (parseInt(row.合格数量1) + parseInt(row.合格数量2) + parseInt(row.废品数量) > row.交检数量1 + row.交检数量2) {
|
||||
this.$message.error('超出零件数量范围')
|
||||
} else {
|
||||
if (row.交检日期1 === null) { row.交检日期1 = '' }
|
||||
if (row.交检数量1 === null) { row.交检数量1 = '' }
|
||||
if (row.检查日期1 === null) { row.检查日期1 = '' }
|
||||
if (row.合格数量1 === null) { row.合格数量1 = '' }
|
||||
if (row.交检日期2 === null) { row.交检日期2 = '' }
|
||||
if (row.交检数量2 === null) { row.交检数量2 = '' }
|
||||
if (row.检查日期2 === null) { row.检查日期2 = '' }
|
||||
if (row.合格数量2 === null) { row.合格数量2 = '' }
|
||||
if (row.交检日期3 === null) { row.交检日期3 = '' }
|
||||
if (row.交检数量3 === null) { row.交检数量3 = '' }
|
||||
if (row.检查日期3 === null) { row.检查日期3 = '' }
|
||||
if (row.合格数量3 === null) { row.合格数量3 = '' }
|
||||
saveRow(row.外协加工任务单明细流水号, row.交检日期1, row.交检数量1, row.检查日期1, row.合格数量1, row.交检日期2, row.交检数量2, row.检查日期2, row.合格数量2, row.交检日期3, row.交检数量3, row.检查日期3, row.合格数量3, row.废品数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = 10
|
||||
this.searchTable()
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
} else if (row.合格数量1 !== '' && row.合格数量2 !== '' && row.合格数量3 !== '') {
|
||||
if (parseInt(row.合格数量1) + parseInt(row.合格数量2) + parseInt(row.合格数量3) + parseInt(row.废品数量) > row.交检数量1 + row.交检数量2 + row.交检数量3) {
|
||||
this.$message.error('超出零件数量范围')
|
||||
} else {
|
||||
if (row.交检日期1 === null) { row.交检日期1 = '' }
|
||||
if (row.交检数量1 === null) { row.交检数量1 = '' }
|
||||
if (row.检查日期1 === null) { row.检查日期1 = '' }
|
||||
if (row.合格数量1 === null) { row.合格数量1 = '' }
|
||||
if (row.交检日期2 === null) { row.交检日期2 = '' }
|
||||
if (row.交检数量2 === null) { row.交检数量2 = '' }
|
||||
if (row.检查日期2 === null) { row.检查日期2 = '' }
|
||||
if (row.合格数量2 === null) { row.合格数量2 = '' }
|
||||
if (row.交检日期3 === null) { row.交检日期3 = '' }
|
||||
if (row.交检数量3 === null) { row.交检数量3 = '' }
|
||||
if (row.检查日期3 === null) { row.检查日期3 = '' }
|
||||
if (row.合格数量3 === null) { row.合格数量3 = '' }
|
||||
saveRow(row.外协加工任务单明细流水号, row.交检日期1, row.交检数量1, row.检查日期1, row.合格数量1, row.交检日期2, row.交检数量2, row.检查日期2, row.合格数量2, row.交检日期3, row.交检数量3, row.检查日期3, row.合格数量3, row.废品数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('保存成功')
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = 10
|
||||
this.searchTable()
|
||||
} else { this.$message.error('保存失败') }
|
||||
})
|
||||
}
|
||||
}
|
||||
// if (parseInt(row.合格数量1) + parseInt(row.废品数量) > row.交检数量1 || parseInt(row.合格数量1) + parseInt(row.合格数量2) + parseInt(row.废品数量) > row.交检数量1 + row.交检数量2 || parseInt(row.合格数量1) + parseInt(row.合格数量2) + parseInt(row.合格数量3) + parseInt(row.废品数量) > row.交检数量1 + row.交检数量2 + row.交检数量3) {
|
||||
// this.$message.error('超出零件数量范围')
|
||||
// } else {
|
||||
// if (row.交检日期1 === null) { row.交检日期1 = '' }
|
||||
// if (row.交检数量1 === null) { row.交检数量1 = '' }
|
||||
// if (row.检查日期1 === null) { row.检查日期1 = '' }
|
||||
// if (row.合格数量1 === null) { row.合格数量1 = '' }
|
||||
// if (row.交检日期2 === null) { row.交检日期2 = '' }
|
||||
// if (row.交检数量2 === null) { row.交检数量2 = '' }
|
||||
// if (row.检查日期2 === null) { row.检查日期2 = '' }
|
||||
// if (row.合格数量2 === null) { row.合格数量2 = '' }
|
||||
// if (row.交检日期3 === null) { row.交检日期3 = '' }
|
||||
// if (row.交检数量3 === null) { row.交检数量3 = '' }
|
||||
// if (row.检查日期3 === null) { row.检查日期3 = '' }
|
||||
// if (row.合格数量3 === null) { row.合格数量3 = '' }
|
||||
// saveRow(row.外协加工任务单明细流水号, row.交检日期1, row.交检数量1, row.检查日期1, row.合格数量1, row.交检日期2, row.交检数量2, row.检查日期2, row.合格数量2, row.交检日期3, row.交检数量3, row.检查日期3, row.合格数量3, row.废品数量).then(response => {
|
||||
// if (response.data[0].result === '1') {
|
||||
// this.$message.success('保存成功')
|
||||
// this.PageCurrent = 1
|
||||
// this.PageSize = 10
|
||||
// this.searchTable()
|
||||
// } else { this.$message.error('保存失败') }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.doing-row4{
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:130px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
488
src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
Normal file
488
src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue
Normal file
@@ -0,0 +1,488 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>表单号:</span>
|
||||
<el-input v-model="FormNumber" placeholder="表单号" clearable size="small" style="width:190px;margin:10px;"/>
|
||||
<span>任务下达时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="date1"
|
||||
style="width:190px;margin:10px;"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>~</span>
|
||||
<el-date-picker
|
||||
v-model="date2"
|
||||
style="width:190px;margin:10px;"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<span>厂家名:</span>
|
||||
<el-select v-model="ManufacturerNameValue" placeholder="选择外协厂家" filterable clearable size="small" style="width:190px;margin:10px;">
|
||||
<el-option
|
||||
v-for="item in ManufacturerName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>实际付款时间段:</span>
|
||||
<el-date-picker
|
||||
v-model="date3"
|
||||
style="width:190px;margin:10px;"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<span>~</span>
|
||||
<el-date-picker
|
||||
v-model="date4"
|
||||
style="width:190px;margin:10px;"
|
||||
size="small"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="yyyy-MM-dd"
|
||||
placeholder="选择日期"/>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;total=null;pageCurrent2=1;pageSize2=10;total2=null;searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" :row-class-name="tableRowClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<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="280px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协员姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="加工价格" align="center">
|
||||
<el-table-column label="预算总价" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工价格_预算_总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成交总价" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.加工价格_成交_总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料费" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料价格_价格_总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="运费" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.运费 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他费用" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.其他价格_总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总价" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="扣款" align="center">
|
||||
<el-table-column label="质量" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_质量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_计划 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_其他 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="应付金额" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.应付总额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款日期" align="center" width="240px">
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{scope.row.实际付款时间}}-->
|
||||
<!--</template>-->
|
||||
<el-table-column label="入库" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.入库时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.计划付款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实际" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.实际付款时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="扣款说明" align="center" width="240px">
|
||||
<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
|
||||
:disabled="scope.row.实际付款时间!==''"
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="Withdrawing(scope.$index, scope.row, 'form')">扣款</el-button>
|
||||
<el-button
|
||||
:disabled="scope.row.实际付款时间!==''"
|
||||
size="mini"
|
||||
type="success"
|
||||
class="el-icon-check"
|
||||
@click="payment(scope.$index, scope.row)">付款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
: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-card v-if="false">
|
||||
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" align="center" width="220px">
|
||||
<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="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="扣款" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
<el-form-item label="质量" style="margin-left: 200px">
|
||||
<el-input v-model="form2.质量" placeholder="质量" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划" style="margin-left: 200px">
|
||||
<el-input v-model="form2.计划" placeholder="计划" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="其他" style="margin-left: 200px">
|
||||
<el-input v-model="form2.其他" placeholder="其他" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="扣款说明" prop="扣款说明" style="margin-left: 200px">
|
||||
<el-input v-model="form2.扣款说明" placeholder="扣款说明" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="callOff2('form2')">取消</el-button>
|
||||
<el-button type="primary" @click="submit2('form2')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
实际付款时间: '',
|
||||
loading: false,
|
||||
loading2: false,
|
||||
zhongjianbianliang: '',
|
||||
dialogFormVisible2: false,
|
||||
form2: {
|
||||
质量: '',
|
||||
计划: '',
|
||||
其他: '',
|
||||
扣款说明: ''
|
||||
},
|
||||
rules: {
|
||||
扣款说明: [{ required: true, message: '请输入扣款说明', trigger: 'blur' }]
|
||||
},
|
||||
date1: '',
|
||||
date2: '',
|
||||
date3: '',
|
||||
date4: '',
|
||||
FormNumber: '',
|
||||
ManufacturerNameValue: '',
|
||||
ManufacturerName: [], // 厂家名称
|
||||
FormNumber_check: false,
|
||||
ManufacturerNameValue_check: false,
|
||||
date1_check: false,
|
||||
date3_check: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
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].外协厂家流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询表格数据
|
||||
searchTable() {
|
||||
this.loading = true
|
||||
if (this.FormNumber === '' || this.FormNumber === null) {
|
||||
this.FormNumber_check = false
|
||||
} else {
|
||||
this.FormNumber_check = true
|
||||
}
|
||||
if (this.ManufacturerNameValue === '' || this.ManufacturerNameValue === null) {
|
||||
this.ManufacturerNameValue_check = false
|
||||
} else {
|
||||
this.ManufacturerNameValue_check = true
|
||||
}
|
||||
if (this.date1 === '' || this.date1 === null) {
|
||||
this.date1_check = false
|
||||
} else {
|
||||
this.date1_check = true
|
||||
}
|
||||
if (this.date3 === '' || this.date3 === null) {
|
||||
this.date3_check = false
|
||||
} else {
|
||||
this.date3_check = true
|
||||
}
|
||||
this.tableData = []
|
||||
this.tableData2 = []
|
||||
searchtable(this.FormNumber_check, this.FormNumber, this.ManufacturerNameValue_check, this.ManufacturerNameValue, this.date1_check, this.date1, this.date2, this.date3_check, this.date3, this.date4, this.pageCurrent, this.pageSize).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substring(0, response.data.rows[i].任务下达日期.indexOf(' '))
|
||||
response.data.rows[i].实际付款时间 = response.data.rows[i].实际付款时间.substring(0, response.data.rows[i].实际付款时间.indexOf(' '))
|
||||
}
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
}).then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 付款
|
||||
payment(index, row) {
|
||||
this.$confirm('请仔细核对信息,确定后不可更改, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'success'
|
||||
}).then(() => {
|
||||
var time = new Date()
|
||||
var month = time.getMonth() + 1
|
||||
var day = time.getDate()
|
||||
if (month >= 1 && month <= 9) {
|
||||
month = '0' + month
|
||||
}
|
||||
if (day >= 1 && day <= 9) {
|
||||
day = '0' + day
|
||||
}
|
||||
this.实际付款时间 = time.getFullYear() + '/' + month + '/' + day
|
||||
// payment(row.外协加工任务单流水号).then(response => {
|
||||
// }).then(() => {
|
||||
payTime(row.外协加工任务单流水号, this.实际付款时间).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('付款成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('付款失败')
|
||||
}
|
||||
})
|
||||
// })
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消付款'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 打开扣款编辑
|
||||
Withdrawing(index, row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.form2.质量 = row.扣款_质量
|
||||
this.form2.计划 = row.扣款_计划
|
||||
this.form2.其他 = row.扣款_其他
|
||||
this.form2.扣款说明 = row.扣款说明
|
||||
this.liushuihao = row.外协加工任务单流水号
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 扣款编辑确定
|
||||
submit2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.WithdrawingEdit()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 扣款编辑
|
||||
WithdrawingEdit() {
|
||||
WithdrawingEdit(this.liushuihao, this.form2.质量, this.form2.计划, this.form2.其他, this.form2.扣款说明).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('修改失败')
|
||||
}
|
||||
this.dialogFormVisible2 = false
|
||||
})
|
||||
},
|
||||
// 关闭扣款编辑
|
||||
callOff2(formName) {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.实际付款时间 !== '') {
|
||||
return 'fukuan'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts(row) {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.zhongjianbianliang = row.外协加工任务单流水号
|
||||
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.tableData2 = []
|
||||
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.tableData2 = []
|
||||
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .fukuan {
|
||||
background: #AEF199;
|
||||
}
|
||||
</style>
|
||||
351
src/views/Outsourcing/OutsourcingPriceBudget/index.vue
Normal file
351
src/views/Outsourcing/OutsourcingPriceBudget/index.vue
Normal file
@@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<el-card>
|
||||
<el-row>
|
||||
<el-radio-group v-model="radio" style="margin: 10px;" @change="radioChange">
|
||||
<el-radio :label="1">未编制</el-radio>
|
||||
<el-radio :label="2">已编制</el-radio>
|
||||
</el-radio-group>
|
||||
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件名称" size="small" clearable style="width:200px"/>
|
||||
|
||||
<span>开始时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date01"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择开始日期"/>
|
||||
|
||||
<span>结束时间:</span>
|
||||
<el-date-picker
|
||||
v-model="date02"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
size="small"
|
||||
placeholder="选择结束日期"/>
|
||||
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize2=10; pageCurrent2=1;searchPartNum()">查询</el-button>
|
||||
</el-row>
|
||||
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="种类" align="center" width="180px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件类型名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投产数量" align="center" width="180px">
|
||||
<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="面积" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.面积 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="重量" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.重量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料费" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料费 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="edit(scope.$index, scope.row, 'form')">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange2"
|
||||
@current-change="handleCurrentChange2"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" :summary-method="getSummaries" border style="width: 100%;max-height: 390px;" height="340px" stripe show-summary>
|
||||
<el-table-column label="序号" width="80" align="center" type="index"/>
|
||||
<el-table-column label="工艺名称" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].工艺名称" size="mini" placeholder="工艺名称" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺要求" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].工艺要求" size="mini" readonly type="textarea"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单件" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].单件定额工时_系数" size="mini" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="准结" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].准结定额工时" size="mini" readonly/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协预算价格" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="tableData[scope.$index].外协预算价格_系数" size="mini" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button size="small" type="primary" style="float:right;margin: 10px" @click="saveRowPrice">保存</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="编辑" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
|
||||
|
||||
<el-form-item label="面积" prop="面积" style="margin-left: 200px">
|
||||
<el-input v-model="form.面积" placeholder="面积" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="重量" prop="重量" style="margin-left: 200px">
|
||||
<el-input v-model="form.重量" placeholder="重量" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="材料费" prop="材料费" style="margin-left: 200px">
|
||||
<el-input v-model="form.材料费" placeholder="材料费" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
|
||||
</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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchPartNum1, searchPartNum2, searchTable, saveWeightArea, saveMaterialPrice, saveRowPrice } from '@/api/Outsourcing/OutsourcingPriceBudget'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
lingjianhao: '',
|
||||
dialogFormVisible: false,
|
||||
form: {
|
||||
面积: '',
|
||||
重量: '',
|
||||
材料费: ''
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
cailiaofei: '',
|
||||
result: [],
|
||||
result2: [],
|
||||
radio: 1,
|
||||
partName: '', // 零件名称
|
||||
date01: '', // 开始时间
|
||||
date02: '', // 结束时间
|
||||
loading0: false,
|
||||
tableData: [],
|
||||
loading2: false,
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
radioChange() {
|
||||
this.tableData2 = []
|
||||
},
|
||||
// 查零件号
|
||||
searchPartNum() {
|
||||
if (this.partName === null) {
|
||||
this.partName = ''
|
||||
}
|
||||
if (this.date01 === '') {
|
||||
this.date01 = null
|
||||
}
|
||||
if (this.date02 === '') {
|
||||
this.date02 = null
|
||||
}
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.tableData = []
|
||||
if (this.radio === 1) {
|
||||
searchPartNum1(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
} else {
|
||||
searchPartNum2(this.partName, this.date01, this.date02, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
}
|
||||
},
|
||||
// 合计
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = ['', '', '', '', '', 0]
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) {
|
||||
sums[1] = '统计总价:'
|
||||
return
|
||||
} else if (index === 5) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
sums[5] += parseFloat(data[i].外协预算价格_系数)
|
||||
}
|
||||
sums[5] = parseInt(sums[5] * 100) / 100
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
searchTable(row) {
|
||||
this.loading0 = true
|
||||
this.tableData = []
|
||||
searchTable(row.工艺计划流水号, 2).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].外协预算价格_系数 !== 0) {
|
||||
response.data[i].外协预算价格_系数 = response.data[i].外协预算价格_系数.toFixed(2)
|
||||
}
|
||||
}
|
||||
this.cailiaofei = row.材料费
|
||||
this.tableData = response.data
|
||||
this.loading0 = false
|
||||
})
|
||||
},
|
||||
// 打开编辑
|
||||
edit(index, row) {
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.form.面积 = row.面积
|
||||
this.form.重量 = row.重量
|
||||
this.form.材料费 = row.材料费
|
||||
this.lingjianhao = row.工艺计划流水号
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 编辑确定
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.WithdrawingEdit()
|
||||
this.dialogFormVisible = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 编辑
|
||||
WithdrawingEdit() {
|
||||
if ((this.form.重量 === '' || this.form.重量 === null) && (this.form.面积 === '' || this.form.面积 === null)) {
|
||||
this.form.重量 = null
|
||||
this.form.面积 = null
|
||||
saveWeightArea(this.lingjianhao, this.form.重量, this.form.面积).then(() => {
|
||||
this.WithdrawingEdit2()
|
||||
})
|
||||
} else {
|
||||
saveWeightArea(this.lingjianhao, this.form.重量, this.form.面积).then(() => {
|
||||
this.WithdrawingEdit2()
|
||||
})
|
||||
}
|
||||
},
|
||||
WithdrawingEdit2() {
|
||||
if (this.form.材料费 === '' || this.form.材料费 === null) {
|
||||
this.form.材料费 = 0
|
||||
saveMaterialPrice(this.lingjianhao, this.form.材料费).then(response => {
|
||||
this.$message.success('保存成功')
|
||||
this.searchPartNum()
|
||||
})
|
||||
} else {
|
||||
saveMaterialPrice(this.lingjianhao, this.form.材料费).then(response => {
|
||||
this.$message.success('保存成功')
|
||||
this.searchPartNum()
|
||||
})
|
||||
}
|
||||
},
|
||||
// 关闭扣款编辑
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 保存行价格
|
||||
saveRowPrice() {
|
||||
if (this.tableData.length === 0) {
|
||||
this.$message.error('请选择零件')
|
||||
} else {
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
saveRowPrice(this.tableData[i].工序流水号, parseFloat(this.tableData[i].外协预算价格_系数), this.tableData[i].工艺计划流水号, this.cailiaofei).then(response => {
|
||||
})
|
||||
}
|
||||
this.$message.success('保存成功')
|
||||
this.searchPartNum()
|
||||
}
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.searchPartNum()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.searchPartNum()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:150px
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
127
src/views/Outsourcing/OutsourcingStatus/index.vue
Normal file
127
src/views/Outsourcing/OutsourcingStatus/index.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNum" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px;" @click="PageCurrent=1;PageSize=10;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading0" :data="tableData" border style="width: 100%;" height="650" stripe>
|
||||
<el-table-column label="机床图号" width="180px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="组号" width="100px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" width="250px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" width="100px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" width="100px" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!--<el-table-column label="已入库数量" width="100px" align="center">-->
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ scope.row.入库数量 }}-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
|
||||
<el-table-column label="零件状态" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-steps :active="active[scope.$index]" finish-status="success" simple process-status="finish">
|
||||
<el-step title="未协"/>
|
||||
<el-step title="已协"/>
|
||||
<el-step title="交检"/>
|
||||
<el-step title="入库"/>
|
||||
</el-steps>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-if="!loading0"
|
||||
:current-page="PageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="10"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchOutHelpState } from '@/api/Outsourcing/OutsourcingStatus'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
loading0: false,
|
||||
partNum: '', // 零件图号
|
||||
check: '',
|
||||
tableData: [],
|
||||
active: [],
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
this.total = 0
|
||||
this.tableData = []
|
||||
this.active = []
|
||||
if (this.partNum !== '') {
|
||||
this.check = 1
|
||||
} else { this.check = 0 }
|
||||
searchOutHelpState(this.PageCurrent, this.PageSize, this.check, this.partNum).then(response => {
|
||||
if (response.data.rows.length !== 0) {
|
||||
this.total = response.data.total
|
||||
this.tableData = response.data.rows
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
this.active.push(parseInt(response.data.rows[i].外协零件状态) + 1)
|
||||
}
|
||||
} else {
|
||||
this.loading0 = false
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading0 = false
|
||||
})
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
1601
src/views/Outsourcing/OutsourcingTaskExecution/index.vue
Normal file
1601
src/views/Outsourcing/OutsourcingTaskExecution/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
280
src/views/Outsourcing/PreorderAssociation/index.vue
Normal file
280
src/views/Outsourcing/PreorderAssociation/index.vue
Normal file
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>零件图号:</span>
|
||||
<el-input v-model="partName" placeholder="零件图号" size="small" clearable style="width:200px"/>
|
||||
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize1=10; pageCurrent1=1;searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading1" :data="tableData1" highlight-current-row height="350" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable2">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件图号" align="center" width="380px">
|
||||
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" align="center" width="320px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="280px">
|
||||
<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>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading1"
|
||||
:current-page="pageCurrent1"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize1"
|
||||
:total="total1"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange1"
|
||||
@current-change="handleCurrentChange1"/>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableRowClassName" height="350" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
|
||||
<el-table-column label="序间外协" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="checkBox[scope.$index]" @change="edit(scope.$index, scope.row)">选择</el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="工艺名称" align="center" width="220px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工艺要求" align="center" width="580px">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.工艺要求" :autosize="{ minRows: 1, maxRows: 1}" size="mini" readonly type="textarea"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机加工开始日期" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机加工开始时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="机加工结束日期" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机加工结束时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序计划" align="center" width="150px">
|
||||
<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>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count: 0, // 计数器 (表二是否有外协工序)
|
||||
InOut: 1, // 工序间是否外协变量 1自家 2外协
|
||||
num1: '',
|
||||
checkBox: [],
|
||||
loading1: false,
|
||||
loading2: false,
|
||||
check_partName: false,
|
||||
partName: '', // 零件名称
|
||||
tableData1: [], // 表格数据
|
||||
tableData2: [],
|
||||
total1: null, // 总条数
|
||||
pageSize1: 10, // 每页显示条数
|
||||
pageCurrent1: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
searchTable() {
|
||||
this.loading1 = true
|
||||
this.tableData1 = []
|
||||
this.tableData2 = []
|
||||
if (this.partName !== null && this.partName !== '') {
|
||||
this.check_partName = true
|
||||
} else {
|
||||
this.check_partName = false
|
||||
}
|
||||
searchTable(this.check_partName, this.partName, this.pageCurrent1, this.pageSize1).then(response => {
|
||||
this.tableData1 = response.data.rows
|
||||
this.total1 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading1 = false
|
||||
})
|
||||
},
|
||||
searchTable2(row) {
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(row.工艺计划流水号).then(response => {
|
||||
this.num1 = row.工艺计划流水号
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
// 修改外协状态
|
||||
edit(index, row) {
|
||||
for (let i = 0; i < this.tableData2.length; i++) {
|
||||
if (this.checkBox[i] === false) {
|
||||
this.count = this.count + 1
|
||||
}
|
||||
}
|
||||
if (this.count === this.tableData2.length) {
|
||||
edit2(row.工序流水号, row.工艺计划流水号, 0).then(response => {
|
||||
})
|
||||
}
|
||||
if (this.checkBox[index] === true) {
|
||||
this.InOut = 2
|
||||
edit(row.工序流水号, this.InOut).then(response => {
|
||||
edit2(row.工序流水号, row.工艺计划流水号, 1).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
})
|
||||
}).then(() => {
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.InOut = 1
|
||||
edit(row.工序流水号, this.InOut).then(response => {
|
||||
this.$message.success('工序外协状态更改成功')
|
||||
}).then(() => {
|
||||
this.loading2 = true
|
||||
this.checkBox = []
|
||||
this.tableData2 = []
|
||||
searchTable2(this.num1).then(response => {
|
||||
if (response.data.length === 0) {
|
||||
this.loading0 = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].工序间是否外协 === 1) {
|
||||
this.checkBox.push(false)
|
||||
} else {
|
||||
this.checkBox.push(true)
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].机加工开始时间 = response.data[i].机加工开始时间.split(' ')[0]
|
||||
response.data[i].机加工结束时间 = response.data[i].机加工结束时间.split(' ')[0]
|
||||
response.data[i].计划日期 = response.data[i].计划日期.split(' ')[0]
|
||||
}
|
||||
this.tableData2 = response.data
|
||||
}
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.pageCurrent1 = 1
|
||||
this.pageSize1 = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.pageCurrent1 = val
|
||||
this.searchTable()
|
||||
},
|
||||
// 表格颜色
|
||||
tableRowClassName({ row }) {
|
||||
if (row.工序间是否外协 === 2) {
|
||||
return 'waixie'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.el-table .waixie {
|
||||
background: #AEF199;
|
||||
}
|
||||
</style>
|
||||
297
src/views/Outsourcing/UnqualifiedTreatment/index.vue
Normal file
297
src/views/Outsourcing/UnqualifiedTreatment/index.vue
Normal file
@@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<span>零件号:</span>
|
||||
<el-input v-model="partNum" placeholder="零件号" size="small" clearable style="width:200px"/>
|
||||
|
||||
<span>任务下达时间:</span>
|
||||
<el-date-picker
|
||||
v-model="timeSlot"
|
||||
size="small"
|
||||
clearable
|
||||
style="width:200px"
|
||||
type="month"
|
||||
value-format="yyyy-MM"
|
||||
placeholder="任务下达时间"/>
|
||||
|
||||
<span>合同号:</span>
|
||||
<el-input v-model="contractNum" placeholder="合同号" size="small" clearable style="width:200px"/>
|
||||
<span>外协厂家:</span>
|
||||
<el-select v-model="outHelpValue" size="small" filterable remote clearable placeholder="外协厂家">
|
||||
<el-option
|
||||
v-for="item in outHelp"
|
||||
: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="PageCurrent=1;PageSize=10;searchTable()">查询</el-button>
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
|
||||
<el-table v-loading="loading0" :data="tableData" border style="width: 100%;" height="650" stripe>
|
||||
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
align="center"
|
||||
width="50"/>
|
||||
<el-table-column label="零件号" width="250" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协厂家" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家简称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同号" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="材料" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目名称" width="200" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.项目名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次数量" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="废品数量" width="140" 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="操作" width="130px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<el-pagination
|
||||
v-if="!loading0"
|
||||
: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 :visible.sync="dialogFormVisible1" title="外协价格计算系数维护" center width="20%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" class="demo-ruleForm" label-width="100px" style="width: 90%;margin: auto">
|
||||
|
||||
<el-form-item label="废品数量" prop="wasteQuantity">
|
||||
<el-input v-model="form.wasteQuantity" size="small" clearable placeholder="请输入废品数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理方式" prop="processingMethod">
|
||||
<el-input v-model="form.processingMethod" size="small" clearable placeholder="请输入处理方式"/>
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="14"/>
|
||||
<el-form-item >
|
||||
<el-button size="small" @click="callOff('form')">取消</el-button>
|
||||
<el-button size="small" type="primary" @click="submit('form')">确 定</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
<dialog :visible="true"/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initOutHelp, searchTable, editList } from '@/api/Outsourcing/UnqualifiedTreatment'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
count2: 0,
|
||||
form: {
|
||||
wasteQuantity: '', // 废品数量
|
||||
processingMethod: '' // 处理方式
|
||||
},
|
||||
dialogFormVisible1: false,
|
||||
timeSlot: '',
|
||||
years: '',
|
||||
months: '',
|
||||
loading0: false,
|
||||
contractNum: '',
|
||||
outHelpValue: '',
|
||||
outHelp: [],
|
||||
partNum: '',
|
||||
tableData: [],
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
rules: { // 表单验证规则
|
||||
wasteQuantity: [{ required: true, message: '请输入废品数量', trigger: 'blur' }],
|
||||
processingMethod: [{ required: true, message: '请输入处理方式', trigger: 'blur' }]
|
||||
},
|
||||
number: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
this.outHelp = []
|
||||
initOutHelp().then(response => { // 初始化外协厂家;*这里模糊查询省一个存储过程
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.outHelp.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTable() {
|
||||
this.loading0 = true
|
||||
this.tableData = []
|
||||
if (this.contractNum === '' || this.contractNum === null) {
|
||||
this.check1 = 0
|
||||
} else { this.check1 = 1 }
|
||||
if (this.outHelpValue === '' || this.outHelpValue === null) {
|
||||
this.check2 = 0
|
||||
} else { this.check2 = 1 }
|
||||
if (this.partNum === '' || this.partNum === null) {
|
||||
this.check3 = 0
|
||||
} else { this.check3 = 1 }
|
||||
if (this.timeSlot === '' || this.timeSlot === null) {
|
||||
this.check4 = 0
|
||||
this.check5 = 0
|
||||
} else {
|
||||
this.check4 = 1
|
||||
this.check5 = 1
|
||||
this.years = this.timeSlot.substring(0, this.timeSlot.indexOf('-'))
|
||||
this.months = this.timeSlot.substring(5, 7)
|
||||
}
|
||||
searchTable(this.PageCurrent, this.PageSize, this.check2, this.outHelpValue, this.check1, this.contractNum, this.check3, this.partNum, this.check4, this.years, this.check5, this.months).then(response => {
|
||||
if (response.data.rows === 0) {
|
||||
this.loading0 = false
|
||||
this.total = response.data.total
|
||||
} else {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading0 = false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 打开编辑
|
||||
handleEdit(index, row, formName) {
|
||||
this.count2 = this.count2 + 1
|
||||
if (this.count2 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.number = row.外协加工任务单明细流水号
|
||||
this.form.wasteQuantity = row.废品数量
|
||||
this.form.processingMethod = row.不合格处理方式
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
// 提交编辑
|
||||
submitEdit() {
|
||||
editList(this.number, this.form.wasteQuantity, this.form.processingMethod).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '信息更新成功!'
|
||||
})
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交添加或者修改
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitEdit()
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff(formName) {
|
||||
this.dialogFormVisible1 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.searchTable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.searchTable()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.doing-row4{
|
||||
background: #f0f9eb;
|
||||
}
|
||||
.el-card{
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:130px
|
||||
}
|
||||
span{
|
||||
margin: 10px 0 10px 10px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.mark{
|
||||
position:fixed;
|
||||
left:0;
|
||||
top:0;
|
||||
opacity:.5;
|
||||
width:100%;
|
||||
height:100%;
|
||||
background:#000;
|
||||
z-index:998;
|
||||
}
|
||||
.content{
|
||||
position:absolute;
|
||||
z-index:999;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user