This commit is contained in:
caoxinyu
2018-12-22 09:57:27 +08:00
26 changed files with 3022 additions and 818 deletions

View File

@@ -250,7 +250,8 @@ export default {
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -292,7 +293,7 @@ export default {
},
searchPeopleData() { // 查询人员
this.People = []
searchPeople().then(response => {
searchPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,

View File

@@ -37,7 +37,9 @@
size="mini"
border
style="width: 100%;"
height="400">
height="400"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column
label="序号"
align="center"
@@ -48,11 +50,21 @@
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格型号" align="center" min-width="80">
<el-table-column label="物料规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
@@ -63,43 +75,428 @@
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币价" align="center" min-width="80">
<el-table-column label="本币价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="车间采购" name="second">
<el-card>
<span>采购合同编号:</span>
<el-select v-model="ShopContractValue" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in ShopContract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span class="demonstration">入库日期</span>
<el-date-picker
v-model="InboundDate"
type="date"
size="small"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
placeholder="选择日期"/>
<span>仓库:</span>
<el-select v-model="InventoryValue" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchShopinfo()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData2"
size="mini"
border
style="width: 100%;"
height="400"
@selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="存货名称" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.单价 * scope.row.实际到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="120">
<template slot-scope="scope" align="center">
<el-button size="small" type="warning" icon="el-icon-sort-up" style="margin: 0 0 0 0px" @click="selecting(scope.row)">选入</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
</el-tab-pane>
<el-tab-pane label="车间采购" name="second">配置管理</el-tab-pane>
</el-tabs>
<el-card>
<span style="margin: 5px">入库单编号</span>
<el-input v-model="inboundCardNumber" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="searchInboundCard1()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="addCard()">创建</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="InboundCardDetail()">选入</el-button>
<el-button size="small" type="primary" icon="el-icon-plus" style="margin: 0 0 0 10px" @click="downLoadCjn()">导出</el-button>
<el-table
v-loading="listLoading3"
:data="tableData3"
border
style="width: 100%;"
size="mini"
height="200"
@row-click = "searchDetail">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="入库单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.入库单号 }}
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" min-width="100" >
<template slot-scope="scope" value-format="yyyy-MM-dd">
{{ scope.row.入库日期 }}
</template>
</el-table-column>
<el-table-column label="仓库" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.仓库名称 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="到货单号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货单号 }}
</template>
</el-table-column>
<el-table-column label="业务号" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.业务号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="业务员" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="业务类型" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.业务类型 }}
</template>
</el-table-column>
<el-table-column label="采购类型" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.采购类型 }}
</template>
</el-table-column>
<el-table-column label="入库类别" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.入库类别 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200px">
<template slot-scope="scope" align="center">
<el-button size="small" type="primary" icon="el-icon-edit" style="margin: 0 0 0 10px" @click="chooseListinfor(scope.row)">编辑</el-button>
<el-button size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 0 10px" @click="dropListinfor(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent3"
:page-sizes="[10, 20, 30, 40]"
:page-size="10"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table
v-loading="listLoading4"
:data="tableData4"
border
style="width: 100%;"
size="mini"
height="200">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column label="名称" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.名称 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.型号 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="本币单价" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 }}
</template>
</el-table-column>
<el-table-column label="本币金额" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.本币单价 * scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="200">
<template slot-scope="scope">
<el-button :disabled="scope.row.是否出库" size="small" type="danger" icon="el-icon-delete" style="margin: 0 0 10px 10px" @click="dropCarddetail(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="增加采购入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="合同名称" prop="合同名称">
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="仓库名称" prop="仓库名称">
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="入库日期" prop="入库日期">
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到货单号" prop="到货单号">
<el-input v-model="form.arrive" placeholder="到货单号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务号" prop="业务号">
<el-input v-model="form.affair" placeholder="业务号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务员" prop="业务员">
<el-select v-model="form.affairPeople" filterable clearable size="small" placeholder="业务员" style="width: 200px">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="到货日期" prop="到货日期">
<el-date-picker v-model="form.arriveDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="业务类型" prop="业务类型">
<el-input v-model="form.affirType" placeholder="业务类型" size="small" clearable/>
</el-form-item>
<el-form-item label="采购类型" prop="采购类型">
<el-input v-model="form.purchaseType" placeholder="采购类型" size="small" clearable/>
</el-form-item>
<el-form-item label="备注" prop="备注">
<el-input v-model="form.note" placeholder="备注" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1=false">取消</el-button>
<el-button type="primary" size="small" @click="submitCard">确定</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" title="修改采购入库单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
<el-form-item label="合同名称" prop="合同名称">
<el-select v-model="form.contract" filterable clearable size="small" placeholder="采购合同" style="width: 200px">
<el-option
v-for="item in Contract"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="仓库名称" prop="仓库名称">
<el-select v-model="form.house" filterable clearable size="small" placeholder="仓库" style="width: 200px">
<el-option
v-for="item in Inventory"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="入库日期" prop="入库日期">
<el-date-picker v-model="form.inboundDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到货单号" prop="到货单号">
<el-input v-model="form.arrive" placeholder="到货单号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务号" prop="业务号">
<el-input v-model="form.affair" placeholder="业务号" size="small" clearable/>
</el-form-item>
<el-form-item label="业务员" prop="业务员">
<el-select v-model="form.affairPeople" filterable clearable size="small" placeholder="业务员" style="width: 200px">
<el-option
v-for="item in People"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
<el-form-item label="到货日期" prop="到货日期">
<el-date-picker v-model="form.arriveDay" value-format="yyyy-MM-dd" format="yyyy-MM-dd" size="small" type="date" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="业务类型" prop="业务类型">
<el-input v-model="form.affirType" placeholder="业务类型" size="small" clearable/>
</el-form-item>
<el-form-item label="采购类型" prop="采购类型">
<el-input v-model="form.purchaseType" placeholder="采购类型" size="small" clearable/>
</el-form-item>
<el-form-item label="备注" prop="备注">
<el-input v-model="form.note" placeholder="备注" size="small" clearable/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
<el-button type="primary" size="small" @click="editCard">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchContract, searchInventory, searchInbound } from '@/api/Inventory/InboundCard'
import { searchContract, searchInventory, searchInbound, searchShopInbound, searchInboundCard, addInboundCard, searchAffairPeople, addInboundCardDetail, searchInboundCardDetail, deleteInboundCardDetail, searchShopContract } from '@/api/Inventory/InboundCard'
import { mapGetters } from 'vuex'
export default {
data() {
return {
Contract: [],
Contract: [], // 采购合同
ShopContract: [], // 车间采购合同
ContractValue: '',
ShopContractValue: '', // 车间采购合同流水号
Inventory: [],
InventoryValue: '',
InboundDate: '',
listLoading: '',
tableData: [],
activeName: 'first'
activeName: 'first',
listLoading2: '',
tableData2: [],
listLoading3: '',
inboundCardNumber: '',
inboundCardNumber_check: '',
tableData3: [],
listLoading4: '',
tableData4: [],
dialogVisible1: false,
dialogVisible2: false,
People: [],
form: {
contract: '',
house: '',
inboundDay: '',
arrive: '',
affair: '',
affairPeople: '',
arriveDay: '',
affirType: '',
purchaseType: '',
inboundType: '',
note: ''
},
rules: { // 表单验证规则
contract: [{ required: true, message: '请选择合同', trigger: 'blur' }],
house: [{ required: true, message: '请选择仓库', trigger: 'blur' }],
inboundDay: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
arrive: [{ required: true, message: '请输入到货单号', trigger: 'blur' }],
affair: [{ required: true, message: '请输入业务号', trigger: 'blur' }],
affairPeople: [{ required: true, message: '请选择业务员', trigger: 'blur' }],
affirType: [{ required: true, message: '请输入入库日期', trigger: 'blur' }],
purchaseType: [{ required: true, message: '请输入业务类型', trigger: 'blur' }],
inboundType: [{ required: true, message: '请输入入库类别', trigger: 'blur' }],
note: [{ required: true, message: '请输入备注', trigger: 'blur' }]
},
nameGroup: [],
modelGroup: [],
specificationGroup: [],
paintGroup: [],
numberGroup: [],
priceGroup: [],
DetailNumber: '',
CardDetailNumber: '' // 入库单明细流水号
}
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -116,6 +513,24 @@ export default {
})
}
})
// 查询车间合同
searchContract().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.ShopContract.push({
label: response.data[i].采购合同编号,
value: response.data[i].采购合同流水号
})
}
})
searchShopContract
searchAffairPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchInventoryData() { // 查询仓库
searchInventory().then(response => {
@@ -131,10 +546,131 @@ export default {
this.tableData = []
this.listLoading = true
searchInbound(this.ContractValue, this.InboundDate, this.InventoryValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].组件零件流水号 !== 0) {
response.data[i].物料名称 = response.data[i].零件名称
}
}
this.tableData = response.data
this.total = response.data.total
this.listLoading = false
})
},
searchShopinfo() {
this.tableData2 = []
this.listLoading2 = true
searchShopInbound(this.ShopContractValue, this.InboundDate, this.InventoryValue).then(response => {
this.tableData2 = response.data
this.total = response.data.total
this.listLoading2 = false
})
},
searchInboundCard1() {
if (this.inboundCardNumber === '') {
this.inboundCardNumber_check = 0
} else {
this.inboundCardNumber_check = 1
}
this.tableData3 = []
this.listLoading3 = true
searchInboundCard(this.inboundCardNumber_check, this.inboundCardNumber).then(response => {
this.tableData3 = response.data
this.listLoading3 = false
})
},
addCard() {
this.dialogVisible1 = true
},
submitCard() { // 提交设置
this.$refs['form'].validate((valid) => {
if (valid) {
addInboundCard(this.form.inboundDay, this.form.house, this.form.contract, this.form.arrive, this.form.affairPeople, this.form.affair, this.form.arriveDay, this.form.affirType, this.form.purchaseType, this.form.inboundType, this.form.note).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
} else {
this.$message.error('增加失败')
}
})
}
})
},
handleSelectionChange(val) {
this.nameGroup = []
this.modelGroup = []
this.specificationGroup = []
this.paintGroup = []
this.numberGroup = []
this.priceGroup = []
for (let i = 0; i < val.length; i++) {
this.nameGroup.push(val[i].物料名称)
this.modelGroup.push(val[i].物料规格)
this.specificationGroup.push(val[i].物料型号)
this.paintGroup.push(val[i].零件图号)
this.numberGroup.push(val[i].实际到货数量)
this.priceGroup.push(val[i].单价)
}
},
handleSelectionChange2(val) {
this.nameGroup = []
this.modelGroup = []
this.specificationGroup = []
this.paintGroup = []
this.numberGroup = []
this.priceGroup = []
for (let i = 0; i < val.length; i++) {
this.nameGroup.push(val[i].物料名称)
this.modelGroup.push(val[i].物料规格)
this.specificationGroup.push(val[i].物料型号)
this.paintGroup.push(val[i].零件图号)
this.numberGroup.push(val[i].实际到货数量)
this.priceGroup.push(val[i].单价)
}
},
InboundCardDetail() {
addInboundCardDetail(this.DetailNumber, this.nameGroup, this.modelGroup, this.specificationGroup, this.paintGroup, this.numberGroup, this.priceGroup).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
} else {
this.$message.error('增加失败')
}
})
},
// 查询采购入库单明细
searchDetail(row) {
this.DetailNumber = row.采购入库单流水号
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
},
// 删除领料单明细
dropCarddetail(row) {
this.CardDetailNumber = row.采购入库单明细流水号
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteInboundCardDetail(this.CardDetailNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
searchInboundCardDetail(this.DetailNumber).then(response => {
this.tableData4 = response.data
})
} else {
this.$message.error('数据占用')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
}
}

View File

@@ -315,7 +315,6 @@ export default {
// 获取人员编号
getpeopleid() {
this.role = this.token
console.log(this.role, 321312)
this.searchPeopleData()
},
// 查询仓库

View File

@@ -183,7 +183,8 @@ export default {
},
computed: {
...mapGetters([
'id'
'id',
'token'
])
},
created() {
@@ -263,7 +264,7 @@ export default {
this.dialogFormVisible = false
},
searchPeopleData() { // 查询人员
searchPeople().then(response => {
searchPeople(this.token).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.People.push({
label: response.data[i].姓名,

View File

@@ -656,14 +656,19 @@ export default {
this.listLoading1 = true
this.listLoadingx = true
searchPurchasePart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
console.log(response)
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].组件零件基本件流水号 === '0') {
response.data.rows[i].零件类型 = response.data.rows[i].零件类型代码
response.data.rows[i].类型名称 = response.data.rows[i].外购件类型
}
}
this.tableDataPurchase = response.data.rows
console.log(this.tableDataPurchase, 124124)
this.listLoading = false
this.total1 = response.data.total
})
searchBasicPart(this.PageCurrent1, this.PageSize1, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue).then(response => {
const data = response.data.rows
console.log(data, 323423)
for (let i = 0; i < data.length; i++) {
data[i].可出库数量 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
}

View File

@@ -0,0 +1,122 @@
<template>
<div class="app-container">
<el-card>
<el-button type="success" class="el-icon-search" size="small">查询</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="150px">
<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>
</div>
</template>
<script>
import {} from '@/api/ManufacturingCenter/MachiningSequenceAdjustment'
export default {
data() {
return {
loading0: false,
tableData: [], // 表格数据
pageSize: 10,
pageCurrent: 1,
total: 0
}
},
created() {
},
methods: {
// 分页
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>

View File

@@ -27,6 +27,12 @@
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>
<el-badge :value="value1" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation1">外购件和标准件打回信息</el-button>
</el-badge>
<el-badge :value="value" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation">基本件打回信息</el-button>
</el-badge>
</el-row>
</el-card>
<el-card>
@@ -386,11 +392,147 @@
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible1"
:row-style="tableRowClassName"
title="基本件打回信息"
center
width="70%"
style="min-height: 400px">
<el-table
:data="tableData9"
size="mini"
style="width: 97%;max-height: 300px"
height="400"
highlight-current-row
border>
<el-table-column align="center" label="零件图号">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" width="70">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床编号">
<template slot-scope="scope">
{{ scope.row.机床编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="退回时间">
<template slot-scope="scope">
{{ scope.row.退回时间 }}
</template>
</el-table-column>
<el-table-column property="date" label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="success"
@click="submit(scope.row)">确认</el-button>
<el-button
size="mini"
type="danger"
@click="Delete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible2"
:row-style="tableRowClassName"
title="外购件和标准件打回信息"
center
width="70%"
style="min-height: 400px">
<el-table
:data="tableData10"
size="mini"
style="width: 97%;max-height: 300px"
height="400"
highlight-current-row
border>
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件数量" width="70">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目名称">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="机床编号">
<template slot-scope="scope">
{{ scope.row.机床编号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="退回时间">
<template slot-scope="scope">
{{ scope.row.退回时间 }}
</template>
</el-table-column>
<el-table-column property="date" label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="success"
@click="submit1(scope.row)">确认</el-button>
<el-button
size="mini"
type="danger"
@click="Delete1(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production } from '@/api/ManufacturingCenter/PartAssignment'
import { initProject, searchmachine, searchgroup, searchTable, searchPart, searchPart1, searchTable1, addData, editData, deleteData, searchDetailed, searchDetailed1, purchaseRequisition, purchaseRequisition1, purchaseRequisition2, MoveOut, MoveOut1, PurchasingDepartment, Production, PartCallbackInformation, PartCallbackInformation1, submit, submit1, Delete, Delete1 } from '@/api/ManufacturingCenter/PartAssignment'
import { mapGetters } from 'vuex'
export default {
inject: ['reload'],
@@ -446,7 +588,13 @@ export default {
pageSize: '',
pageCurrent: '',
total: '',
check: ''
check: '',
value: 0,
value1: 0,
tableData9: [],
tableData10: [],
dialogFormVisible1: false,
dialogFormVisible2: false
}
},
computed: {
@@ -463,6 +611,125 @@ export default {
methods: {
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value += 1
}
}
this.tableData9 = response.data
})
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value1 += 1
}
}
this.tableData10 = response.data
})
},
PartCallbackInformation() {
this.dialogFormVisible1 = true
},
PartCallbackInformation1() {
this.dialogFormVisible2 = true
},
submit(row) {
submit(row.基本件流水号).then(response => {
this.value = 0
if (response.data[0].result === '1') {
this.$message.success('确认成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value += 1
}
}
this.tableData9 = response.data
})
} else {
this.$message.error('确认失败')
}
})
},
submit1(row) {
submit1(row.标准件和外购件流水号).then(response => {
this.value1 = 0
if (response.data[0].result === '1') {
this.$message.success('确认成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value1 += 1
}
}
this.tableData10 = response.data
})
} else {
this.$message.error('确认失败')
}
})
},
Delete(row) {
Delete(row.基本件流水号).then(response => {
this.value = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value += 1
}
}
this.tableData9 = response.data
})
} else {
this.$message.error('删除失败')
}
})
},
Delete1(row) {
Delete1(row.标准件和外购件流水号).then(response => {
this.value1 = 0
if (response.data[0].result === '1') {
this.$message.success('删除成功')
PartCallbackInformation1().then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].退回时间 !== '') {
response.data[i].退回时间 = (response.data[i].退回时间).split(' ')[0]
}
if (response.data[i].是否确认 === '0') {
this.value1 += 1
}
}
this.tableData10 = response.data
})
} else {
this.$message.error('删除失败')
}
})
},
tableRowClassName({ row }) {
if (row.是否确认 === '0') {
return 'background: #ffff66'
} else {
return ''
}
},
projectChange() {
this.machineNumberValue = ''
@@ -805,14 +1072,6 @@ export default {
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
searchDetailed1(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData6 = response.data
})
} else {
this.$message.error('请购失败')
}
@@ -871,8 +1130,13 @@ export default {
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
searchDetailed(this.RequisitionList).then(response => {
this.tableData5 = response.data
searchDetailed1(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData6 = response.data
})
} else { this.$message.error('移出失败') }
})
@@ -884,6 +1148,11 @@ export default {
this.tableData2 = response.data
})
searchDetailed(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData5 = response.data
})
} else { this.$message.error('移出失败') }
@@ -896,14 +1165,16 @@ export default {
this.tableData3 = response.data
})
searchDetailed(this.RequisitionList).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].物料计划到货时间 !== '') {
response.data[i].物料计划到货时间 = (response.data[i].物料计划到货时间).split(' ')[0]
}
}
this.tableData5 = response.data
})
} else { this.$message.error('移出失败') }
})
}
searchDetailed(this.RequisitionList).then(response => {
this.tableData5 = response.data
})
}).catch(() => {
this.$message({
type: 'info',
@@ -921,4 +1192,9 @@ export default {
span{
margin: 10px 0px 10px 10px;
}
.item {
float: right;
margin-top: 10px;
margin-right: 40px;
}
</style>

View File

@@ -200,36 +200,41 @@
</div>
</el-card>
<el-card v-if="false">
<el-card>
<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">
<el-table-column label="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.零件图 }}
{{ scope.row.发票 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="230px">
<el-table-column label="开票金额" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" width="220px">
<el-table-column label="接收人" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
{{ scope.row.接收人 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center">
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="180px">
<el-table-column label="开票时间" align="center" width="180px">
<template slot-scope="scope">
{{ scope.row.组号 }}
{{ 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>
@@ -267,14 +272,74 @@
</div>
</el-dialog>
<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="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-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 { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts, edittype, handlechange, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
export default {
data() {
return {
title1: '',
dialogFormVisible: false,
count1: 0,
form: {},
实际付款时间: '',
loading: false,
loading2: false,
@@ -437,12 +502,123 @@ export default {
this.tableData2 = []
this.zhongjianbianliang = row.外协加工任务单流水号
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
console.log(response.data)
this.tableData2 = response.data.rows
this.total2 = response.data.total
}).then(() => {
this.loading2 = false
})
},
// 点击增加
editType1(formName) {
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[formName].resetFields()
}
this.title1 = '增加'
this.form.ManufacturerName = ''
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
@@ -478,9 +654,8 @@ export default {
.el-card{
margin-bottom: 15px;
}
</style>
<style>
.el-table .fukuan {
background: #AEF199;
}
</style>

View File

@@ -24,6 +24,37 @@
<el-card>
<el-table v-loading="" :data="tableData1" stripe border style="width: 100%;max-height: 500px;" height="500px" size="mini">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="采购合同号" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -44,26 +75,6 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="合同总额" align="center" min-width="70" fixed="right">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
@@ -189,4 +200,7 @@ export default {
.el-tag{
margin: 0
}
.el-form-item {
margin: 0;
}
</style>

View File

@@ -40,6 +40,37 @@
height="300px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="采购合同号" align="center" min-width="130">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
@@ -65,31 +96,6 @@
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="primary" size="mini" icon="el-icon-edit-outline" @click="Open(scope.row)">审批</el-button>
@@ -286,7 +292,7 @@ export default {
}
</style>
<style>
.tableData{
height: 30px;
#table .el-form-item {
margin: 0;
}
</style>

View File

@@ -59,10 +59,41 @@
:data="tableData1"
size="mini"
border
style="width: 100%;max-height: 300px;"
height="300px"
style="width: 100%;max-height: 350px;"
height="350px"
highlight-current-row
@row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-form-item label="交货日期">
{{ scope.row.交货日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付日期">
{{ scope.row.支付日期 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="支付方式">
{{ scope.row.支付方式 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票信息">
{{ scope.row.开票信息 }}
</el-form-item>
</el-row>
<el-row>
<el-form-item label="其他说明">
{{ scope.row.其他说明 }}
</el-form-item>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="审批情况" align="center" min-width="100">
<template slot-scope="scope">
<el-tag v-if="scope.row.审批情况内容==='未审批'" type="warning" size="small">未审批</el-tag>
@@ -95,31 +126,6 @@
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="交货日期" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.交货日期 }}
</template>
</el-table-column>
<el-table-column label="支付日期" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付日期 }}
</template>
</el-table-column>
<el-table-column label="支付方式" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.支付方式 }}
</template>
</el-table-column>
<el-table-column label="开票信息" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.开票信息 }}
</template>
</el-table-column>
<el-table-column label="其他说明" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.其他说明 }}
</template>
</el-table-column>
<el-table-column label="未通过原因" align="center" min-width="200">
<template slot-scope="scope">
{{ scope.row.未通过原因 }}
@@ -138,10 +144,6 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<div style="margin:5px;float: left">
<b>二维码</b><br>
<img id="img">
</div>
<div id="print" class="print" style="min-height:500px;margin: 0px auto;width:800px;border:1px solid black" v-html="returns"/>
<el-card v-show="searchView">
<!--将新一般处理页添加至通讯服务器-->
@@ -306,11 +308,13 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.useqrcode(row.采购合同流水号)
this.searchPic() // 显示图片
this.contractValue = parseInt(row.采购合同流水号)
searchTable2(this.contractValue).then(response => {
this.returns = response.data[0].合同内容
}).then(() => {
$('#contractName').next('td').html(`<img id="img">`)
this.useqrcode(row.采购合同流水号) // 显示二维码
})
}
}
@@ -341,13 +345,7 @@ export default {
}
</style>
<style>
.tableData{
height: 30px;
}
.el-table .adopt{
background: limegreen;
}
.el-table .NotThrough{
background: palevioletred;
.el-form-item {
margin: 0;
}
</style>

View File

@@ -37,7 +37,48 @@
<el-card>
<el-table v-loading="" :data="tableData1" show-summary size="mini" style="max-height: 400px" height="400px" stripe border highlight-current-row @row-click="searchPic">
<el-table-column align="center" label="供应商" min-width="150px">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form id="table" label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :span="8">
<el-form-item label="接收人">
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="接收时间">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="发票号">
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="开户行">
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="开票时间">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column align="center" label="交接状态" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
<el-tag v-else type="warning" size="small">未接收</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="供应商" min-width="200px">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -87,37 +128,6 @@
{{ scope.row.传送时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="交接状态" min-width="80px">
<template slot-scope="scope">
<el-tag v-if="scope.row.接收人" type="success" size="small">已接收</el-tag>
<el-tag v-else type="warning" size="small">未接收</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="接收人" min-width="80px">
<template slot-scope="scope">
{{ scope.row.接收人 ? scope.row.接收人 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="接收时间" min-width="135px">
<template slot-scope="scope">
{{ scope.row.接收时间 ? scope.row.接收时间 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="发票号" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发票号 ? scope.row.发票号 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" min-width="120px">
<template slot-scope="scope">
{{ scope.row.开户行 ? scope.row.开户行 : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" min-width="100px">
<template slot-scope="scope">
{{ scope.row.开票时间 ? scope.row.开票时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200px">
<template slot-scope="scope">
<el-button

View File

@@ -358,6 +358,11 @@ export default {
searchTable2() { // 查询请购单列表
this.PurchaseOrder ? this.check3 = 1 : this.check3 = 0
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.PurchaseOrder).then(response => {
for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].请购时间 !== '') {
response.data.rows[i].请购时间 = (response.data.rows[i].请购时间).split(' ')[0]
}
}
this.tableData2 = response.data.rows
this.total2 = response.data.total
})

View File

@@ -0,0 +1,506 @@
<template>
<div class="app-container">
<el-card>
<div style="margin-top: -10px;">
<el-radio-group v-model="radio" style="margin: 10px;" @change="clearDetail">
<el-radio :label="0">未编制</el-radio>
<el-radio :label="1">已编制</el-radio>
</el-radio-group>
<span style="margin: 10px">定额员:</span>
<el-select v-model="personValue" size="small" style="width: 100px" placeholder="定额员">
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>项目名称:</span>
<el-select
v-model="projectNameValue"
placeholder="项目名称"
size="small"
style="width:100px"
clearable
@change="searchMachine()">
<el-option
v-for="item in projectName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床编号:</span>
<el-select
v-model="machineValue"
placeholder="机床编号"
size="small"
style="width:100px"
clearable
@change="searchGroup()">
<el-option
v-for="item in Machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>组号:</span>
<el-select
v-model="groupNumberValue"
placeholder="组号"
size="small"
style="width:100px"
clearable
@change="changeGroup()">
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>图号/名称:</span>
<el-input
v-model="partNum"
clearable
style="width:120px"
placeholder="请双击选择"
size="small"
@change="clear()"
@dblclick.native="searchParts"/>
<el-button type="success" size="small" icon="el-icon-search" style="margin: 10px" @click="searchDetail()">查询</el-button>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">工艺调整
</el-button>
</div>
<div>
<span>种类:</span>
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
<span>名称/型号:</span>
<el-input v-model="partName" placeholder="名称" size="small" readonly style="width:115px"/>
<span>材质:</span>
<el-input v-model="materialName" placeholder="材质" size="small" style="width:120px" readonly/>
<span>规格:</span>
<el-input v-model="spec" style="width:100px" size="small" placeholder="规格" readonly/>
<span>投产总数量:</span>
<el-input v-model="batchNum" placeholder="总数量" readonly size="small" style="width:80px;margin-top:10px;"/>
</div>
</el-card>
<el-card>
<div>
<el-table v-loading="listLoading" :data="tableData" border style="width: 100%;" height="550px">
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="name" label="工艺名称" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺名称" style="width:150px" placeholder="工艺名称" readonly/>
</template>
</el-table-column>
<el-table-column prop="request" label="工艺要求" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.工艺要求" :rows="1" placeholder="工艺要求" type="textarea" readonly/>
</template>
</el-table-column>
<el-table-column prop="singleton" label="单件" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.单件定额工时" :disabled="disabled" style="width:150px" placeholder="单件" @change="update(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="Settlement" label="准结" width="180" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.准结定额工时" :disabled="disabled" style="width:150px" placeholder="准结" @change="update(scope.row)"/>
</template>
</el-table-column>
</el-table>
<el-button v-if="radio === 0" type="primary" icon="el-icon-cjn-09" size="small" style="float:right;margin: 10px" @click="saveApprove">保存</el-button>
</div>
</el-card>
<el-dialog
:visible.sync="dialogFormVisible4"
title="图号"
center
style="min-height: 300px">
<el-table
:data="tableData8"
size="mini"
style="width: 97%;max-height: 300px"
height="300"
highlight-current-row
border
@row-click="selectParts">
<el-table-column align="center" label="物料名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料规格">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column align="center" label="物料型号">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="1"
:page-sizes="[10, 20]"
:page-size="10"
:pager-count="5"
:total="total"
small
layout="sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit()">确认</el-button>
</div>
</el-dialog>
<el-dialog
:visible.sync="dialogFormVisible5"
title="图号"
center
style="min-height: 300px">
<el-table
:data="tableData9"
size="mini"
style="width: 97%;max-height: 300px"
height="300"
highlight-current-row
border
@row-click="selectParts1">
<el-table-column align="center" label="零件图号">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="材料">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="1"
:page-sizes="[10, 20]"
:page-size="10"
:pager-count="5"
:total="total"
small
layout="total, sizes, prev, pager, next"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submit()">确认</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getPerson, getPartnames1, getProject, getMachine, getGroup, update, getProcedure, returnEdit, saveApprove } from '@/api/WorkshopProcurement/OutsourcingQuotaSetting'
export default {
data() {
return {
projectNameValue: '',
projectName: [],
machineValue: '',
Machine: [],
groupNumberValue: '',
groupNumber: [],
groupNum: '',
groupType: '',
tableData8: [],
tableData9: [],
ProcessFlowNumber: '',
spec: '', // 规格
total: 0,
pageCurrent: 1,
pageSize: 10,
isShow2: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
listLoading: false,
personValue: '',
person: [],
radio: 0, // 第一组
partNum: '', // 零件号
typeValue: '', // 种类
partName: '', // 零件名称
batchNum: '', // 投产总数量
materialName: '', // 材质
tableData: [],
isShow: false // 2的可见性
}
},
created() {
this.fetchData()
},
methods: {
fetchData() { // 初始化未编制零件号
getPerson().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
getProject(0).then(response => { // 初始化项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
},
clear() {
this.typeValue = ''
this.partName = ''
this.partNum = ''
this.materialName = ''
this.spec = ''
this.batchNum = ''
},
clearDetail() {
if (this.radio === 1) {
this.isShow2 = true
} else {
this.isShow2 = false
}
this.checked = false
this.projectNameValue = ''
this.projectName = []
getProject(this.radio).then(response => { // 初始化项目
for (let i = 0; i < response.data.length; i++) {
this.projectName.push({
label: response.data[i].项目名称,
value: response.data[i].项目流水号
})
}
})
this.machineValue = ''
this.Machine = []
this.groupNumberValue = ''
this.groupNumber = []
this.partNum = ''
this.typeValue = ''
this.partName = ''
this.materialName = ''
this.spec = ''
this.batchNum = ''
this.tableData = []
},
searchDetail() { // 查主表的信息
if (this.partNum === '' || this.partNum === null) {
this.$message.error('请选择零件作为查询对象')
} else {
getProcedure(this.ProcessFlowNumber).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].工艺编号 === null) {
response.data[i].工艺编号 = 0
}
if (response.data[i].工艺要求 === null) {
response.data[i].工艺要求 = ''
}
}
this.tableData = response.data
})
}
},
returnEdit() { // 定额修改
if (this.partNum === '' || this.partNum === null) {
this.$message.error('请选择零件')
} else {
this.$confirm('此操作会将该零件打回至未编制状态, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
returnEdit(this.ProcessFlowNumber).then(response => {
if (response.data[0].result === '1') {
this.$message.success('打回成功')
this.ProcessFlowNumber = ''
this.partNum = ''
this.tableData = []
} else {
this.$message.error('打回失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
},
searchMachine() {
this.clear()
this.machineValue = ''
this.Machine = []
this.groupNumberValue = ''
this.groupNumber = []
getMachine(this.radio, this.projectNameValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.Machine.push({
label: response.data[i].机床图号,
value: response.data[i].机床流水号
})
}
})
},
searchGroup() {
this.clear()
this.groupNumberValue = ''
this.groupNumber = []
getGroup(this.radio, this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({
label: response.data[i].组号,
value: response.data[i].组件流水号
})
}
})
},
changeGroup() {
this.clear()
for (let i = 0; i < this.groupNumber.length; i++) {
if (this.groupNumber[i].value === this.groupNumberValue) {
this.groupNum = this.groupNumber[i].label
}
}
if (this.groupNum.indexOf('MX') !== -1) {
this.groupType = 0
} else {
this.groupType = 1
}
},
selectParts(row) {
this.ProcessFlowNumber = row.工艺流水号
if (row.零件类型 === '1') {
this.typeValue = '标准件'
} else if (row.零件类型 === '2') {
this.typeValue = '外购件'
}
this.partName = row.物料型号
this.spec = row.物料规格
this.batchNum = row.批次数量
this.partNum = row.物料名称
},
selectParts1(row) {
this.ProcessFlowNumber = row.工艺流水号
if (row.零件类型 === '3') {
this.typeValue = '基本件'
}
this.partName = row.物料名称
this.materialName = row.材料
this.batchNum = row.批次数量
this.partNum = row.零件图号
},
searchParts() { // 根据条件查零件号
if (this.groupNumberValue !== '') {
if (this.radio === 0) { // 未编制
this.disabled = false
this.isShow2 = false
} else { // 已编制
this.isShow = true
this.isShow2 = true
this.disabled = true
}
this.pageCurrent = 1
this.pageSize = 10
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
if (this.groupType === 0) {
this.dialogFormVisible5 = true
this.tableData9 = response.data.rows
console.log(response.data)
this.total = response.data.total
} else {
this.dialogFormVisible4 = true
this.tableData8 = response.data.rows
this.total = response.data.total
}
})
} else {
this.$message.warning('请先选择组号')
}
},
handleSizeChange(val) {
this.pageSize = val
this.pageCurrent = 1
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
if (this.groupType === 0) {
this.dialogFormVisible5 = true
this.tableData9 = response.data.rows
this.total = response.data.total
} else {
this.dialogFormVisible4 = true
this.tableData8 = response.data.rows
this.total = response.data.total
}
})
},
handleCurrentChange(val) {
this.pageCurrent = val
getPartnames1(this.radio, this.groupNumberValue, this.groupType, this.pageCurrent, this.pageSize).then(response => {
if (this.groupType === 0) {
this.dialogFormVisible5 = true
this.tableData9 = response.data.rows
this.total = response.data.total
} else {
this.dialogFormVisible4 = true
this.tableData8 = response.data.rows
this.total = response.data.total
}
})
},
update(row) {
update(row.外购件工序流水号, row.单件定额工时, row.准结定额工时).then(response => {
})
},
submit() {
this.dialogFormVisible4 = false
this.dialogFormVisible5 = false
},
saveApprove() { // 保存
saveApprove(this.ProcessFlowNumber, this.personValue).then(response => {
if (response.data.length === 1) {
this.partNum = ''
this.typeValue = ''
this.partName = ''
this.batchNum = ''
this.materialName = ''
this.spec = ''
this.tableData = []
this.$message.success('保存成功')
} else {
this.$message.error('保存失败')
}
})
}
}
}
</script>
<style scoped>
.doing-row4{
background: #f0f9eb;
}
.el-card{
margin-bottom: 15px;
}
</style>