This commit is contained in:
zhangdingyu
2019-11-29 10:01:28 +08:00
9 changed files with 707 additions and 596 deletions

View File

@@ -19,7 +19,7 @@ export function initSupplier11(num) {
type: '3', type: '3',
name: ` SELECT distinct 供应商流水号,供应商名称 name: ` SELECT distinct 供应商流水号,供应商名称
FROM 采购管理_询价单_视图 FROM 采购管理_询价单_视图
where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and 是否未通过 is null and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}` where not EXISTS (select * from 采购管理_采购合同_采购部 where 是否启用 = 1 and (是否未通过 is null or 是否未通过 <> 1) and 询价单编号 = 采购合同编号) and 采购员流水号 = ${num}`
} }
}) })
} }

View File

@@ -38,38 +38,38 @@ export function searchLxPurchaseOrder(pageCurrent, pageSize, check1, num, check2
}) })
} }
// 查询采购计划明细 // 查询采购计划明细
export function searchMateriel(num, check, num1) { export function searchMateriel(num) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '备料管理_采购计划明细_查询数据_未选入', name: '备料管理_采购计划明细_查询数据_未选入',
param: `采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}` param: `供应商=${num}`
} }
}) })
} }
// 查询离线采购计划明细 // 查询离线采购计划明细
export function searchLxMateriel(num, check, num1) { export function searchLxMateriel(num) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '备料管理_离线采购计划明细_查询数据_未选入', name: '备料管理_离线采购计划明细_查询数据_未选入',
param: `离线采购计划流水号=${num}&零件图号_check=${check}&零件图号=${num1}` param: `供应商流水号=${num}`
} }
}) })
} }
// 查询到货单 // 查询到货单
export function searchArriveOrder(num8, num9, num2, num3, num5, num6, num7, pageCurrent, pageSize) { export function searchArriveOrder(num8, num9, num6, num7, pageCurrent, pageSize) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '备料管理_到货单查询_新', name: '备料管理_到货单查询_新',
param: `供应商流水号_check=${num8}&供应商流水号=${num9}&开始日期_check=${num2}&开始日期=${num3}&结束日期=${num5}&是否关联_check=${num6}&是否关联=${num7}`, param: `供应商流水号_check=${num8}&供应商流水号=${num9}&是否关联_check=${num6}&是否关联=${num7}`,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
@@ -87,14 +87,14 @@ export function addPurchaseOrder(num5, num6, num7) {
}) })
} }
// 编辑采购单 // 编辑采购单
export function editPurchaseOrder(num5, num6, num7, num8) { export function editPurchaseOrder(num5, num6, num8) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_编辑到货单', name: '备料管理_编辑到货单',
param: `备注=${num5}&到货单流水号=${num6}&供应商流水号=${num7}}&日期=${num8}` param: `备注=${num5}&到货单流水号=${num6}&日期=${num8}`
} }
}) })
} }
@@ -144,14 +144,14 @@ export function EditArrivalOrderMX(num, num2, num3, num4, num5) {
} }
}) })
} }
export function AddArrivalOrderMX(num, num1, num2, num3, num4, num5) { export function AddArrivalOrderMX(num, num1, num2, num3, num4, num5, num6, num7, num8, num9, num10, num11, id) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_新增到货单明细', name: '备料管理_新增到货单明细',
param: `到货单流水号=${num}&材料=${num1}&数量=${num2}&单位=${num3}&单价=${num4}&金额=${num5}` param: `到货单流水号=${num}&材料=${num1}&数量=${num2}&单位=${num3}&单价=${num4}&金额=${num5}&工艺计划流水号组=${num6}&采购计划明细流水号组=${num7}&本次到货数量组=${num8}&离线采购计划明细流水号组=${num9}&到货重量组=${num10}&到货金额组=${num11}&考勤编号=${id}`
} }
}) })
} }
@@ -168,14 +168,14 @@ export function deleteMateriel(num1, num2, num3) {
}) })
} }
// 关联材料 // 关联材料
export function addMateriel(num1, num2, num3, num4, num5, id) { export function addMateriel(num1, num2, num3, num4, num5, num6, num7, id) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_到货单明细关联', name: '备料管理_到货单明细关联',
param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}&离线采购计划明细流水号组=${num5}&考勤编号=${id}` param: `到货单明细流水号=${num1}&工艺计划流水号组=${num2}&采购计划明细流水号组=${num3}&本次到货数量组=${num4}&离线采购计划明细流水号组=${num5}&到货重量组=${num6}&到货金额组=${num7}&考勤编号=${id}`
} }
}) })
} }

View File

@@ -26,14 +26,14 @@ export function searchInvoiceDetail(num) {
}) })
} }
// 发票增加 // 发票增加
export function addInvoice(time1, money, send, remark, num3) { export function addInvoice(time1, money, send, remark, num3, num4) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '备料管理_发票_增加数据', name: '备料管理_发票_增加数据',
param: `开票时间=${time1}&开票金额=${money}&发票号=${send}&备注=${remark}&供应商=${num3}` param: `开票时间=${time1}&开票金额=${money}&发票号=${send}&备注=${remark}&供应商=${num3}&到货单流水号组=${num4}`
} }
}) })
} }

View File

@@ -67,22 +67,22 @@
</el-table-column> </el-table-column>
<el-table-column label="签订日期" align="center" width="120px"> <el-table-column label="签订日期" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合同签订日期 !== '1900-01-01' ? scope.row.合同签订日期 : '-' }} {{ scope.row.合同签订日期 !== '1900-01-01' ? scope.row.合同签订日期 : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交货期" align="center" width="120px"> <el-table-column label="交货期" align="center" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.发货节点 !== '1900-01-01' ? scope.row.发货节点 : '-' }} {{ scope.row.发货节点 !== '1900-01-01' ? scope.row.发货节点 : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备预验节点" align="center" width="150px"> <el-table-column label="设备预验节点" align="center" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.设备预验收节点 !== '1900-01-01' ? scope.row.设备预验收节点 : '-' }} {{ scope.row.设备预验收节点 !== '1900/1/1' ? scope.row.设备预验收节点 : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="安装调试节点" align="center" width="150px"> <el-table-column label="安装调试节点" align="center" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.安装调试节点 !== '1900-01-01' ? scope.row.安装调试节点 : '-' }} {{ scope.row.安装调试节点 !== '1900/1/1' ? scope.row.安装调试节点 : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设计者" align="center" width="90px"> <el-table-column label="设计者" align="center" width="90px">
@@ -101,7 +101,7 @@
<el-date-picker v-model="scope.row.审图计划开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/> <el-date-picker v-model="scope.row.审图计划开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template> </template>
<template v-else> <template v-else>
{{ scope.row.审图计划开始时间 !== '1900-01-01' ? scope.row.审图计划开始时间 : '-' }} {{ scope.row.审图计划开始时间 !== '1900/1/1' ? scope.row.审图计划开始时间 : '' }}
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
@@ -111,7 +111,7 @@
<el-date-picker v-model="scope.row.审图计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/> <el-date-picker v-model="scope.row.审图计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template> </template>
<template v-else> <template v-else>
{{ scope.row.审图计划完成时间 !== '1900-01-01' ? scope.row.审图计划完成时间 : '-' }} {{ scope.row.审图计划完成时间 !== '1900/1/1' ? scope.row.审图计划完成时间 : '' }}
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
@@ -121,7 +121,7 @@
<el-date-picker v-model="scope.row.审图实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/> <el-date-picker v-model="scope.row.审图实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template> </template>
<template v-else> <template v-else>
{{ scope.row.审图实际完成时间 !== '1900-01-01' ? scope.row.审图实际完成时间 : '-' }} {{ scope.row.审图实际完成时间 !== '1900/1/1' ? scope.row.审图实际完成时间 : '' }}
</template> </template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -2,17 +2,24 @@
<div class="app-container"> <div class="app-container">
<el-card class="searchContract"> <el-card class="searchContract">
<el-row> <el-row>
<el-select v-model="contractNumValue" placeholder="请购单号/合同编号" size="small" @change="searchData"> <el-select v-model="contractNumValue" placeholder="请购单号/合同编号" size="small" style="width: 160px" @change="searchData">
<el-option <el-option
v-for="item in contractNum" v-for="item in contractNum"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<el-input v-model="contractName" placeholder="合同名称" size="small"/> <el-input v-model="contractName" placeholder="合同名称" style="width: 120px" size="small"/>
<el-input v-model="supplierName" size="small" placeholder="请双击选择供应商" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/> <!-- <el-input v-model="supplierName" size="small" placeholder="请双击选择供应商" readonly clearable @dblclick.native="dialogVisible1=true;submitDisable=true" @clear="emptySupplierDetail"/>-->
<el-input v-model="AdvanceCharge" size="small" placeholder="预付款"/> <el-select v-model="supplierValue" placeholder="选择供应商" filterable style="width: 220px" size="small" clearable>
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable> <el-option
v-for="item in supplierValues"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-input v-model="AdvanceCharge" size="small" style="width: 120px" placeholder="预付款"/>
<el-select v-model="currencyValue" placeholder="币种" style="width: 120px" size="small" clearable>
<el-option <el-option
v-for="item in currency" v-for="item in currency"
:key="item.value" :key="item.value"
@@ -26,25 +33,25 @@
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="规定到货时间"/> placeholder="规定到货时间"/>
<el-input v-model="name" placeholder="采购员" size="small" readonly/> <el-input v-model="name" placeholder="采购员" style="width: 120px" size="small" readonly/>
<el-input v-model="taxRate" placeholder="税率" size="small"/> <el-input v-model="taxRate" placeholder="税率" style="width: 120px" size="small"/>
<el-button v-show="contractNumType===0" type="success" size="small" @click="linkGroup">成组采购</el-button> <el-button v-show="contractNumType===0" type="success" size="small" @click="linkGroup">成组采购</el-button>
<el-button v-show="contractNumType===1" type="danger" size="small" @click="unLinkGroup">取消成组采购</el-button> <el-button v-show="contractNumType===1" type="danger" size="small" @click="unLinkGroup">取消成组采购</el-button>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card>
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 100%" height="100px" size="mini"> <el-table v-show="contractNumType===1" :data="tableData5" border style="width: 1200px" height="100px" size="mini">
<el-table-column label="组件名称" align="center" width="150"> <el-table-column label="组件名称" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组件名称 }} {{ scope.row.组件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组号" align="center" width="100"> <el-table-column label="组号" align="center" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center" width="120"> <el-table-column label="数量" align="center" width="90">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.数量" size="mini" style="width:100%" @change="update1(scope.row)"/> <el-input v-model="scope.row.数量" size="mini" style="width:100%" @change="update1(scope.row)"/>
</template> </template>
@@ -56,10 +63,10 @@
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center" width="150"> <el-table-column label="金额" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ parseInt(scope.row.数量) * parseFloat(scope.row.单价) }} {{ (parseInt(scope.row.数量) * parseFloat(scope.row.单价)).toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交货期" align="center" width="150"> <el-table-column label="交货期" align="center" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-date-picker <el-date-picker
v-model="scope.row.物料计划到货时间" v-model="scope.row.物料计划到货时间"
@@ -71,7 +78,7 @@
@change="update1(scope.row)"/> @change="update1(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" width="250"> <el-table-column label="备注" align="center" min-width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width:100%" @change="update1(scope.row)"/> <el-input v-model="scope.row.备注" size="mini" style="width:100%" @change="update1(scope.row)"/>
</template> </template>
@@ -79,35 +86,35 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<el-table v-show="contractNumType===0" :data="tableData4" border style="width: 100%;max-height: 400px;" height="300px" size="mini"> <el-table v-show="contractNumType===0" :data="tableData4" border style="width: 1200px;max-height: 420px;" height="320px" size="mini">
<el-table-column label="物料名称" align="center" min-width="100"> <el-table-column label="物料名称" align="center" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料名称 }} {{ scope.row.物料名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="图号或型号" align="center" min-width="100"> <el-table-column label="图号或型号" align="center" min-width="140">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.图号或型号 }} {{ scope.row.图号或型号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料或规格" align="center" width="200"> <el-table-column label="材料或规格" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.规格或材料 }} {{ scope.row.规格或材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="订货数量" align="center" width="100"> <el-table-column label="订货数量" align="center" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件数量 }} {{ scope.row.零件数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单价" align="center" width="150"> <el-table-column label="单价" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.单价" size="mini" style="width:70px"/> <el-input v-model="scope.row.单价" size="mini" style="width:100px" @change="calculateContractSum"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center" width="100"> <el-table-column label="金额" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.金额 }} {{ scope.row.金额.toFixed(2) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="交货期" align="center" width="150"> <el-table-column label="交货期" align="center" width="150">
@@ -122,7 +129,7 @@
@change="update(scope.row)"/> @change="update(scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" width="150"> <el-table-column label="备注" align="center" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.备注" size="mini" style="width: 120px" @change="update(scope.row)"/> <el-input v-model="scope.row.备注" size="mini" style="width: 120px" @change="update(scope.row)"/>
</template> </template>
@@ -337,6 +344,7 @@ export default {
contractNumValue: '', contractNumValue: '',
contractNumType: 0, contractNumType: 0,
RequisitionNumber: '', RequisitionNumber: '',
supplierNames: [],
contract: [{ contract: [{
label: '合同模板1', label: '合同模板1',
value: 1 value: 1
@@ -356,6 +364,7 @@ export default {
supplierName: '', // 供应商 supplierName: '', // 供应商
supplier: [], supplier: [],
supplierValue: '', // 供应商流水号 supplierValue: '', // 供应商流水号
supplierValues: [],
enterpriseNature: '', // 企业性质 enterpriseNature: '', // 企业性质
createDate: '', // 创立日期 createDate: '', // 创立日期
registeredCapital: '', // 注册资本 registeredCapital: '', // 注册资本
@@ -439,6 +448,7 @@ export default {
}, },
created() { created() {
this.fetchData() this.fetchData()
this.searchSupplier()
}, },
methods: { methods: {
linkGroup() { linkGroup() {
@@ -482,6 +492,8 @@ export default {
}) })
}, },
searchData() { searchData() {
this.contractSum = 0.00
this.contractSum2 = 0.00
for (let i = 0; i < this.contractNum.length; i++) { for (let i = 0; i < this.contractNum.length; i++) {
if (this.contractNum[i].value === this.contractNumValue) { if (this.contractNum[i].value === this.contractNumValue) {
this.contractNumType = this.contractNum[i].id this.contractNumType = this.contractNum[i].id
@@ -496,6 +508,7 @@ export default {
console.log(this.tableData5) console.log(this.tableData5)
}) })
searchData2(this.contractNumValue).then(response => { searchData2(this.contractNumValue).then(response => {
console.log(response, 2233)
this.tableData4 = response.data this.tableData4 = response.data
this.machineValue = response.data[0].机床流水号 this.machineValue = response.data[0].机床流水号
this.form3.机床 = response.data[0].机床图号 this.form3.机床 = response.data[0].机床图号
@@ -523,24 +536,44 @@ export default {
}) })
}, },
calculateContractSum() { // 计算合同总额 calculateContractSum() { // 计算合同总额
this.contractSum = 0 if (this.contractNumType === 0) {
this.contractSum1 = 0 this.contractSum = 0
this.costAccount = 0 this.contractSum1 = 0
this.riseFallPoint = 0 this.costAccount = 0
this.tableData4 = [] this.riseFallPoint = 0
for (let i = 0; i < this.groupNum2.length; i++) { this.tableData4 = []
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量) for (let i = 0; i < this.groupNum2.length; i++) {
this.contractSum1 += parseFloat(this.groupNum2[i].金额) this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
this.tableData4.push(this.groupNum2[i]) this.contractSum1 += parseFloat(this.groupNum2[i].金额)
} this.tableData4.push(this.groupNum2[i])
this.contractSum = (this.contractSum1).toFixed(2) }
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100 this.contractSum = (this.contractSum1).toFixed(2)
this.costAccount = this.contractSum this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
if (parseInt(this.costAccount) === 0) { this.costAccount = this.contractSum
this.$message.error('成本核算不可为0') if (parseInt(this.costAccount) === 0) {
} else { this.$message.error('成本核算不可为0')
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount } else {
this.riseFallPoint = this.riseFallPoint.toFixed(2) this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
this.riseFallPoint = this.riseFallPoint.toFixed(2)
}
} else if (this.contractNumType === 1) {
this.contractSum = 0
this.contractSum1 = 0
this.costAccount = 0
this.riseFallPoint = 0
for (let i = 0; i < this.groupNum5.length; i++) {
this.contractSum1 += parseFloat((parseInt(this.groupNum5[i].数量) * parseFloat(this.groupNum5[i].单价)).toFixed(2))
}
console.log(this.contractSum1, this.groupNum5, 898989)
this.contractSum = (this.contractSum1).toFixed(2)
this.contractSum2 = parseInt(this.contractSum * (1 + parseFloat(this.taxRate)) * 100) / 100
this.costAccount = this.contractSum
if (parseInt(this.costAccount) === 0) {
this.$message.error('成本核算不可为0')
} else {
this.riseFallPoint = (this.contractSum - this.costAccount) / this.costAccount
this.riseFallPoint = this.riseFallPoint.toFixed(2)
}
} }
}, },
fetchData() { fetchData() {
@@ -581,6 +614,12 @@ export default {
response.data[i].创立日期 = response.data[i].创立日期.split(' ')[0] response.data[i].创立日期 = response.data[i].创立日期.split(' ')[0]
} }
} }
for (let i = 0; i < response.data.length; i++) {
this.supplierValues.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
this.tableData01 = response.data this.tableData01 = response.data
}) })
}, },

View File

@@ -1,32 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card style="margin-left: 0px;width: 37%;float: left">
<el-col v-show="false" :span="9"> <el-col>
<span>原材料名称:</span>
<el-input v-model="RawMaterialName" placeholder="原材料名称" size="mini" clearable style="width: 120px"/>
<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 10px" @click="pageCurrent=1;searchRawMaterial()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel2">选入原材料</el-button>
<el-table :data="tableData" border style="width: 100%;height: 460px;margin-top: 15px;" height="330" size="mini" @selection-change="handleSelectionChange2">
<el-table-column type="selection" align="center" width="55"/>
<el-table-column label="原材料名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.原材料名称 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;margin-bottom: 10px;">
<el-pagination
:current-page="pageCurrent"
:page-size="pageSize"
:total="total"
style="display:inline-block;width:50%"
layout="total, prev, pager, next"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
</el-col>
<el-col style="margin-left: 0px">
<span>零件图号:</span>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0" @keyup.enter.native="searchTable1"/> <el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
@@ -34,34 +9,34 @@
<el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="将零件打回重新分配备料计划" placement="top">
<el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button> <el-button type="danger" size="small" icon="el-icon-download" plain style="margin-left: 10px;float: right;" @click="back">打回重新分配</el-button>
</el-tooltip> </el-tooltip>
<el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="330" size="mini" @selection-change="handleSelectionChange"> <el-table v-loading="loading1" :data="tableData1" border stripe highlight-current-row style="width: 100%;margin-top:3px;" height="690" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="55"/> <el-table-column type="selection" align="center" width="45"/>
<el-table-column label="机床图号" prop="机床图号" min-width="100" align="center"> <el-table-column label="机床图号" prop="机床图号" width="95" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="组号" prop="组号" min-width="100" align="center"> <el-table-column label="组号" prop="组号" width="65" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件图号" prop="零件图号" min-width="100" align="center"> <el-table-column label="零件图号" prop="零件图号" min-width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件图号 }} {{ scope.row.零件图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" prop="零件名称" min-width="100" align="center"> <el-table-column label="零件名称" prop="零件名称" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" width="140" align="center"> <el-table-column label="数量" width="50" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" prop="材料" align="center"> <el-table-column label="材料" prop="材料" width="85" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
@@ -80,11 +55,9 @@
</el-col> </el-col>
</el-card> </el-card>
<el-card> <el-card style="margin-left: 10px;width: 62.3%;float: left">
<div> <!--slot="header"--> <div> <!--slot="header"-->
<span>采购计划单号:</span>
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/> <el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/>
<span style="margin-left: 10px">供应商:</span>
<el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable> <el-select v-model="supplierName0" placeholder="供应商" size="small" filterable clearable>
<el-option <el-option
v-for="item in supplierName0s" v-for="item in supplierName0s"
@@ -96,16 +69,16 @@
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button>
</el-tooltip> </el-tooltip>
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">创建采购计划单</el-button> <el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addPurchaseOrder">新增</el-button>
<el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="向选择的采购计划里添加采购零件" placement="top">
<el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入外购备料</el-button> <el-button type="success" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">
<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button> <el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存</el-button>
</el-tooltip> </el-tooltip>
</div> </div>
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3"> <el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="200px" size="mini" highlight-current-row @row-click="searchTable3">
<el-table-column label="采购状态" prop="采购计划状态" align="center" width="100" fixed="left"> <el-table-column label="采购状态" prop="采购计划状态" align="center" width="75" fixed="left">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</el-tag> <el-tag v-if="Number(scope.row.采购计划状态)===0" type="warning" size="mini">编辑中</el-tag>
<el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</el-tag> <el-tag v-if="Number(scope.row.采购计划状态)===1" type="primary" size="mini">已保存</el-tag>
@@ -113,41 +86,36 @@
<el-tag v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</el-tag> <el-tag v-if="Number(scope.row.采购计划状态)===4" type="info" size="mini">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购计划单号" prop="采购单号" align="center" min-width="170"> <el-table-column label="采购计划单号" prop="采购单号" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购单号 }} {{ scope.row.采购单号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购计划单名称" prop="采购单名称" align="center" min-width="170"> <el-table-column label="采购计划单名称" prop="采购单名称" align="center" width="130">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购单名称 }} {{ scope.row.采购单名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="250" show-overflow-tooltip> <el-table-column label="供应商" prop="供应商名称" align="center" min-width="200" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购员" prop="姓名" align="center" min-width="80"> <el-table-column label="采购员" prop="姓名" align="center" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.姓名 }} {{ scope.row.姓名 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="下单日期" prop="下单日期" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.下单日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="计划完成日期" align="center" width="100"> <el-table-column label="计划完成日期" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成日期.split(' ')[0] }} {{ scope.row.计划完成日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="350" fixed="right"> <el-table-column label="操作" align="center" width="250" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="打印采购计划单" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="打印" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印采购计划</el-button> <el-button size="mini" type="success" plain icon="el-icon-printer" @click="exportExcel(scope.row)">打印</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
@@ -174,54 +142,54 @@
@size-change="handleSizeChange2" @size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/> @current-change="handleCurrentChange2"/>
</div> </div>
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" size="mini"> <el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="455px" size="mini">
<el-table-column label="采购状态" align="center"> <el-table-column label="采购状态" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</el-tag> <el-tag v-if="Number(scope.row.是否到货)===0" type="warning" size="mini">未到货</el-tag>
<el-tag v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</el-tag> <el-tag v-if="Number(scope.row.是否到货)===1" type="success" size="mini">已到货</el-tag>
<el-tag v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</el-tag> <el-tag v-if="Number(scope.row.是否到货)===2" type="info" size="mini">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="200"> <el-table-column label="物料编码" prop="物料零件编码" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料零件编码 }} {{ scope.row.物料零件编码 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="零件名称" align="center"> <el-table-column label="零件名称" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" prop="材料" align="center" > <el-table-column label="材料" prop="材料" align="center" width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" align="center"> <el-table-column label="数量" align="center" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.总数量 }} {{ scope.row.总数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="250px"> <el-table-column label="成品尺寸(长、宽、高)" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:240px" @change="saveWeight(scope.$index, scope.row)"/> <el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.成品尺寸" size="mini" style="width:100%" @change="saveWeight(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" width="100px"> <el-table-column label="单位" align="center" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:70px" @change="saveMoney(scope.$index, scope.row)"/> <el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.单位" size="mini" style="width:100%" @change="saveMoney(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" prop="备注" min-width="200px"> <el-table-column label="备注" align="center" prop="备注" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:180px" @change="saveRemarks(scope.$index, scope.row)"/> <el-input :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" v-model="scope.row.备注1" size="mini" style="width:100%" @change="saveRemarks(scope.$index, scope.row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="200px"> <el-table-column label="操作" align="center" width="110px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="物料移出采购计划" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="物料移出" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出采购计划</el-button> <el-button :disabled="parseInt(scope.row.是否到货)===1 || parseInt(scope.row.是否到货)===2" type="info" size="mini" icon="el-icon-right" plain @click="deleteMateriel(scope.row)">物料移出</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
</template> </template>

View File

@@ -11,18 +11,6 @@
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!--<el-input v-model="Name" placeholder="供应商" size="small" clearable/>--> <!--<el-input v-model="Name" placeholder="供应商" size="small" clearable/>-->
<span style="margin-left: 10px">时间段:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:260px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<span>关联情况:</span> <span>关联情况:</span>
<el-select v-model="PickingValue" placeholder="关联情况" size="small" clearable> <el-select v-model="PickingValue" placeholder="关联情况" size="small" clearable>
<el-option <el-option
@@ -37,50 +25,49 @@
<el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button> <el-button type="primary" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
</div> </div>
</el-card> </el-card>
<el-card> <el-card style="width: 45%;float: left">
<h3>到货单</h3> <h3>到货单</h3>
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable5"> <el-table v-loading="" :data="tableData4" border stripe style="width: 100%" height="230px" size="mini" highlight-current-row @row-click="searchTable5">
<el-table-column width="60" align="center" type="index" label="序号"/> <el-table-column label="关联情况" align="center" width="80">
<el-table-column label="关联情况" align="center" min-width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</el-tag> <el-tag v-if="Number(scope.row.是否关联) === 1" type="success" size="mini">已结算</el-tag>
<el-tag v-else type="primary" size="mini">未结算</el-tag> <el-tag v-else type="primary" size="mini">未结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="280"> <el-table-column label="供应商" prop="供应商名称" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货日期" prop="到货日期" align="center" width="150"> <el-table-column label="到货日期" prop="到货日期" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.日期.split(' ')[0] }} {{ scope.row.日期.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" min-width="250" show-overflow-tooltip> <el-table-column label="到货单号" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.到货单编号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250" fixed="right"> <el-table-column label="操作" align="center" width="220" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="添加到货明细" placement="top"> <el-button :disabled="Number(scope.row.是否关联) === 1" type="success" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalOrderMX(scope.row)">添加到货明细</el-button>
<div style="display: inline-block"> <el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)">删除</el-button>
<el-button :disabled="Number(scope.row.是否关联) === 1" type="success" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalOrderMX(scope.row)">添加到货明细</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalOrder(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>
</div>
</el-tooltip>
</template> </template>
</el-table-column> </el-table-column>
<!--</el-tooltip>-->
<!--<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">-->
<!--<div style="display: inline-block">-->
<!--<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalOrder(scope.row)"/>-->
<!--</div>-->
<!--</el-tooltip>-->
<!--<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">-->
<!--<div style="display: inline-block">-->
<!--<el-button :disabled="Number(scope.row.是否关联) === 1" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalOrder(scope.row)"/>-->
<!--</div>-->
<!--</el-tooltip>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table> </el-table>
<div class="block"> <div class="block">
<el-pagination <el-pagination
@@ -93,6 +80,8 @@
@size-change="handleSizeChange4" @size-change="handleSizeChange4"
@current-change="handleCurrentChange4"/> @current-change="handleCurrentChange4"/>
</div> </div>
</el-card>
<el-card style="width: 54%;float: left;margin-left: 10px">
<h3>到货单明细</h3> <h3>到货单明细</h3>
<el-table <el-table
v-loading="" v-loading=""
@@ -103,6 +92,7 @@
highlight-current-row highlight-current-row
stripe stripe
style="margin: 3px 0" style="margin: 3px 0"
height="260px"
size="mini" size="mini"
@row-click="searchTable6"> @row-click="searchTable6">
<el-table-column width="60" align="center" type="index" label="序号"/> <el-table-column width="60" align="center" type="index" label="序号"/>
@@ -128,21 +118,16 @@
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center"> <el-table-column label="金额" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.金额 }} {{ parseInt(scope.row.金额 * 100) / 100 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250" fixed="right"> <el-table-column label="操作" align="center" width="220" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="关联备料材料" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="关联备料材料" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button :disabled="disable === '1'" type="warning" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalCL(scope.row)">关联备料材料</el-button> <el-button :disabled="disable === '1'" type="warning" size="mini" icon="el-icon-circle-plus-outline" plain @click="addArrivalCL(scope.row)">关联备料材料</el-button>
</div> </div>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-edit-outline" @click="editArrivalMX(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<div style="display: inline-block"> <div style="display: inline-block">
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalMX(scope.row)"/> <el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalMX(scope.row)"/>
@@ -151,6 +136,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card>
<el-card style="width: 100%">
<h3>关联备料材料</h3> <h3>关联备料材料</h3>
<el-table <el-table
v-loading="" v-loading=""
@@ -161,6 +148,7 @@
highlight-current-row highlight-current-row
stripe stripe
style="margin: 3px 0" style="margin: 3px 0"
height="500px"
size="mini"> size="mini">
<el-table-column label="物料编码" prop="物料零件编码" align="center" width="200"> <el-table-column label="物料编码" prop="物料零件编码" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -189,7 +177,7 @@
</el-table-column> </el-table-column>
<el-table-column label="总重量" align="center" prop="总重量"> <el-table-column label="总重量" align="center" prop="总重量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:120px" @change="save(scope.$index, scope.row)"/> {{ scope.row.重量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位" align="center" > <el-table-column label="单位" align="center" >
@@ -199,7 +187,7 @@
</el-table-column> </el-table-column>
<el-table-column label="总金额" align="center" prop="总金额"> <el-table-column label="总金额" align="center" prop="总金额">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.金额 }} {{ parseInt(scope.row.金额 * 100) / 100 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" > <el-table-column label="备注" align="center" >
@@ -219,11 +207,11 @@
</el-table> </el-table>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 200px" width="430px"> <el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogVisible" center style="min-height: 400px" width="380px">
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
<el-row> <el-row>
<el-form-item label="供应商" prop="supplierNameValue"> <el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable> <el-select v-show="title==='新增到货单'" v-model="form.supplierNameValue" placeholder="供应商" size="small" filterable @change="searchTable20()">
<el-option <el-option
v-for="item in supplierNames" v-for="item in supplierNames"
:key="item.value" :key="item.value"
@@ -233,7 +221,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="创建日期" prop="invoiceTime"> <el-form-item label="到货日期" prop="invoiceTime">
<el-date-picker v-model="form.日期" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/> <el-date-picker v-model="form.日期" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item> </el-form-item>
</el-row> </el-row>
@@ -258,120 +246,193 @@
@click="submitEditArrivalOrder">确定</el-button> @click="submitEditArrivalOrder">确定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible10" title="添加到货明细" center style="min-height: 400px" width="1600px">
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 200px" width="430px"> <el-form ref="form10" :model="form10" :rules="rules10" label-position="right" label-width="60px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="120px">
<el-row> <el-row>
<el-form-item v-show="title1==='添加到货明细'" label="材料" prop="CailiaoValue"> <el-col :span="5" style="margin-left: 27%">
<el-input v-model="form1.CailiaoValue" size="small"/> <span>计划类型</span>
</el-form-item> <el-select v-model="planType" placeholder="计划类型" size="small" style="width: 150px" filterable @change="searchTable20()">
<el-option
v-for="item in planTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-col>
<el-col :span="6">
<span>供应商</span>
<el-input v-model="供应商名称" style="width: 250px" size="small" readonly/>
</el-col>
<el-col :span="5">
<span>到货单编号</span>
<el-input v-model="到货单编号" style="width: 150px" size="small" readonly/>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-form-item label="数量" prop="数量"> <div style="width: 20%;float: left;margin-top: 5px">
<el-input-number v-model="form1.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/> <div style="background: gainsboro">
</el-form-item> <el-row style="height: 50px">
</el-row> <el-form-item label="材料" prop="CailiaoValue">
<el-row> <el-input v-model="form10.CailiaoValue" size="small"/>
<el-form-item label="单价" prop="单价"> </el-form-item>
<el-input-number v-model="form1.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/> </el-row>
</el-form-item> <el-row style="height: 50px">
</el-row> <el-form-item label="数量" prop="数量">
<el-row> <el-input-number v-model="form10.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
<el-form-item label="单位" prop="单位"> </el-form-item>
<el-input v-model="form1.单位" size="small"/> </el-row>
</el-form-item> <el-row style="height: 50px">
</el-row> <el-form-item label="单价" prop="单价">
<el-row> <el-input-number v-model="form10.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>
<el-form-item label="金额" prop="金额"> </el-form-item>
<el-input-number v-model="form1.金额" :precision="2" :step="1" size="medium"/> </el-row>
</el-form-item> <el-row style="height: 50px">
<el-form-item label="单位" prop="单位">
<el-input v-model="form10.单位" size="small"/>
</el-form-item>
</el-row>
<el-row style="height: 50px">
<el-form-item label="金额" prop="金额">
<el-input-number v-model="form10.金额" :precision="2" :step="1" size="medium"/>
</el-form-item>
</el-row>
</div>
<div>
<el-button type="primary" size="small" style="margin-left: 40%;margin-top: 10px" @click="submitAddArrivalOrderMX">确定</el-button>
</div>
</div>
<div style="width: 79%;float: left;margin-left: 10px">
<el-table v-loading="" :data="tableData20" border show-summary highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="采购单号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="物料编码" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.物料零件编码 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="备料件数" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="已到件数" align="center" width="70px">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到货件数" align="center" width="110px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/>
</template>
</el-table-column>
<el-table-column label="到货重量" align="center" width="110px" prop="到货重量">
<template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px"/>
</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="60px">
<template slot-scope="scope">
{{ scope.row.单位 ? scope.row.单位 : '-' }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注1 }}
</template>
</el-table-column>
</el-table>
</div>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title1==='添加到货明细'"
type="warning"
size="small"
plain
icon="el-icon-check"
@click="submitAddArrivalOrderMX">保存</el-button>
<el-button
v-show="title1==='添加到货明细'"
type="primary"
plain
size="small"
icon="el-icon-check"
@click="submitAddArrivalOrderMX1">继续添加</el-button>
<el-button
v-show="title1==='编辑到货明细'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditArrivalOrderMX">确定</el-button>
</div>
</el-dialog> </el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="关联备料材料" center style="min-height: 200px" width="55%"> <!--<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 200px" width="430px">-->
<div> <!--<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="120px">-->
<span>采购计划单号:</span> <!--<el-row>-->
<el-input v-model="purchasingOrder" placeholder="采购计划单号" size="small" style="margin: 3px 0" clearable/> <!--<el-form-item v-show="title1==='添加到货明细'" label="材料" prop="CailiaoValue">-->
<el-input v-model="partNumber" placeholder="零件图号" size="small" style="margin: 3px 0" clearable/> <!--<el-input v-model="form1.CailiaoValue" size="small"/>-->
<el-select v-model="planType" placeholder="计划类型" size="small" filterable @change="ageCurrent2=1;pageSize2=10;total2=0;tableData3=[];searchTable2()"> <!--</el-form-item>-->
<el-option <!--</el-row>-->
v-for="item in planTypes" <!--<el-row>-->
:key="item.value" <!--<el-form-item label="数量" prop="数量">-->
:label="item.label" <!--<el-input-number v-model="form1.数量" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>-->
:value="item.value"/> <!--</el-form-item>-->
</el-select> <!--</el-row>-->
<el-tooltip :open-delay="1200" effect="dark" content="查询采购计划单" placement="top"> <!--<el-row>-->
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10;total2=0;searchTable2()">查询</el-button> <!--<el-form-item label="单价" prop="单价">-->
</el-tooltip> <!--<el-input-number v-model="form1.单价" :precision="2" :step="1" :min="0" size="medium" @change="Calculation"/>-->
</div> <!--</el-form-item>-->
<el-table v-loading="" :data="tableData2" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @row-click="searchTable3"> <!--</el-row>-->
<el-table-column label="采购计划单号" align="center"> <!--<el-row>-->
<!--<el-form-item label="单位" prop="单位">-->
<!--<el-input v-model="form1.单位" size="small"/>-->
<!--</el-form-item>-->
<!--</el-row>-->
<!--<el-row>-->
<!--<el-form-item label="金额" prop="金额">-->
<!--<el-input-number v-model="form1.金额" :precision="2" :step="1" size="medium"/>-->
<!--</el-form-item>-->
<!--</el-row>-->
<!--</el-form>-->
<!--<div slot="footer" class="dialog-footer">-->
<!--<el-button-->
<!--v-show="title1==='添加到货明细'"-->
<!--type="warning"-->
<!--size="small"-->
<!--plain-->
<!--icon="el-icon-check"-->
<!--@click="submitAddArrivalOrderMX">保存</el-button>-->
<!--<el-button-->
<!--v-show="title1==='添加到货明细'"-->
<!--type="primary"-->
<!--plain-->
<!--size="small"-->
<!--icon="el-icon-check"-->
<!--@click="submitAddArrivalOrderMX1">继续添加</el-button>-->
<!--<el-button-->
<!--v-show="title1==='编辑到货明细'"-->
<!--type="primary"-->
<!--size="small"-->
<!--icon="el-icon-check"-->
<!--@click="submitEditArrivalOrderMX">确定</el-button>-->
<!--</div>-->
<!--</el-dialog>-->
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible2" title="关联备料材料" center style="min-height: 400px" width="1400px">
<span>计划类型</span>
<el-select v-model="planType" placeholder="计划类型" size="small" style="width: 150px" filterable @change="searchTable20()">
<el-option
v-for="item in planTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-table v-loading="" :data="tableData20" border highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center"/>
<el-table-column label="采购单号" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购单号 ? scope.row.采购单号 : scope.row.离线采购计划编号 }} {{ scope.row.采购单号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="采购计划单名称" align="center">
<template slot-scope="scope">
{{ scope.row.采购单名称 ? scope.row.采购单名称 : scope.row.离线采购计划名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column v-show="planType===0" label="采购员" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="下单日期" align="center">
<template slot-scope="scope">
{{ scope.row.下单日期 ? scope.row.下单日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column v-show="planType===0" label="计划完成日期" align="center">
<template slot-scope="scope">
{{ scope.row.计划完成日期 ? scope.row.计划完成日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize2"
:total="total2"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
<el-table v-loading="" :data="tableData3" border highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="物料编码" align="center" width="150"> <el-table-column label="物料编码" align="center" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.物料零件编码 }} {{ scope.row.物料零件编码 }}
@@ -382,26 +443,31 @@
{{ scope.row.零件名称 }} {{ scope.row.零件名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="材料" align="center" width="90px"> <el-table-column label="材料" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.材料 }} {{ scope.row.材料 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数" align="center" width="50px"> <el-table-column label="备料件数" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.批次数量 }} {{ scope.row.批次数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货数量" align="center" width="70px"> <el-table-column label="已到件数" align="center" width="70px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货数量 }} {{ scope.row.到货数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="本次到货数量" align="center" width="110px"> <el-table-column label="到货件数" align="center" width="110px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/> <el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.批次数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:90px"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="到货重量" align="center" width="110px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:90px"/>
</template>
</el-table-column>
<el-table-column label="成品尺寸(长、宽、高)" align="center"> <el-table-column label="成品尺寸(长、宽、高)" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.成品尺寸 }} {{ scope.row.成品尺寸 }}
@@ -426,7 +492,7 @@
</template> </template>
<script> <script>
import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, saveWeight, saveWeight1, searchTable5, import { searchPurchaseOrder, searchMateriel, addMateriel, searchArriveOrder, addPurchaseOrder, editPurchaseOrder, deletePurchaseOrder, searchTable5,
searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js' searchSupplier, deleteArrivalMX, EditArrivalOrderMX, AddArrivalOrderMX, deleteMateriel, searchTable6, searchLxPurchaseOrder, searchLxMateriel } from '@/api/WorkshopProcurement/NewArrivalList.js'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@@ -456,6 +522,7 @@ export default {
Name: '', Name: '',
单价: '', 单价: '',
数量: '', 数量: '',
供应商: '',
SUM: 0, SUM: 0,
PickingValue: '', PickingValue: '',
Picking: [{ Picking: [{
@@ -472,8 +539,9 @@ export default {
total2: 0, total2: 0,
pageCurrent2: 1, pageCurrent2: 1,
pageSize2: 10, pageSize2: 10,
tableData3: [],
tableData6: [], tableData6: [],
tableData20: [],
tableData30: [],
采购计划流水号: '', 采购计划流水号: '',
离线采购计划流水号: '', 离线采购计划流水号: '',
tableData4: [], tableData4: [],
@@ -482,16 +550,21 @@ export default {
pageSize4: 10, pageSize4: 10,
tableData5: [], tableData5: [],
到货单流水号: '', 到货单流水号: '',
dateRange: '',
中间变量: '', 中间变量: '',
form: { form: {
supplierNameValue: '',
备注: '', 备注: '',
日期: '', 日期: ''
supplierNameValue: ''
}, },
form1: { form1: {
CailiaoValue: '', CailiaoValue: '',
材料: '', 数量: '',
单位: 'KG',
单价: '',
金额: ''
},
form10: {
CailiaoValue: '',
数量: '', 数量: '',
单位: 'KG', 单位: 'KG',
单价: '', 单价: '',
@@ -501,6 +574,7 @@ export default {
supplierNames: [], supplierNames: [],
dialogVisible: false, dialogVisible: false,
dialogVisible1: false, dialogVisible1: false,
dialogVisible10: false,
dialogVisible2: false, dialogVisible2: false,
title: '', title: '',
title1: '', title1: '',
@@ -510,15 +584,23 @@ export default {
日期: [{ required: true, message: '请选择日期' }] 日期: [{ required: true, message: '请选择日期' }]
}, },
rules1: { rules1: {
CailiaoValue: [{ required: true, message: '请选择材料' }], CailiaoValue: [{ required: true, message: '请填写材料' }],
数量: [{ required: true, message: '请填写数量' }],
单位: [{ required: true, message: '请填写单位' }],
单价: [{ required: true, message: '请填写单价' }]
},
rules10: {
CailiaoValue: [{ required: true, message: '请填写材料' }],
数量: [{ required: true, message: '请填写数量' }], 数量: [{ required: true, message: '请填写数量' }],
单位: [{ required: true, message: '请填写单位' }], 单位: [{ required: true, message: '请填写单位' }],
单价: [{ required: true, message: '请填写单价' }] 单价: [{ required: true, message: '请填写单价' }]
}, },
本次到货数量组: [], 本次到货数量组: [],
到货重量组: [],
工艺计划流水号组: [], 工艺计划流水号组: [],
采购计划明细流水号组: [], 采购计划明细流水号组: [],
离线采购计划明细流水号组: [] 离线采购计划明细流水号组: [],
到货金额组: []
} }
}, },
computed: { computed: {
@@ -546,6 +628,17 @@ export default {
} }
}) })
}, },
searchTable20() {
if (this.planType === 0) {
searchMateriel(this.供应商).then(response => {
this.tableData20 = response.data
})
} else {
searchLxMateriel(this.供应商).then(response => {
this.tableData20 = response.data
})
}
},
searchTable2() { // 查询采购单列表 searchTable2() { // 查询采购单列表
if (this.planType === 0) { if (this.planType === 0) {
this.purchasingOrder ? this.check3 = 1 : this.check3 = 0 this.purchasingOrder ? this.check3 = 1 : this.check3 = 0
@@ -573,20 +666,6 @@ export default {
this.pageCurrent2 = val this.pageCurrent2 = val
this.searchTable2() this.searchTable2()
}, },
searchTable3(row) { // 查询采购计划明细
this.采购计划流水号 = row.采购计划流水号
this.离线采购计划流水号 = row.离线采购计划流水号
this.partNumber ? this.check5 = 1 : this.check5 = 0
if (this.planType === 0) {
searchMateriel(this.采购计划流水号, this.check5, this.partNumber).then(response => {
this.tableData3 = response.data
})
} else {
searchLxMateriel(this.离线采购计划流水号, this.check5, this.partNumber).then(response => {
this.tableData3 = response.data
})
}
},
getSummaries(param) { getSummaries(param) {
const { columns, data } = param const { columns, data } = param
const sums = [] const sums = []
@@ -618,7 +697,7 @@ export default {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
if (!isNaN(value)) { if (!isNaN(value)) {
return Number(prev) + Number(curr) return parseInt((Number(prev) + Number(curr)) * 100) / 100
} else { } else {
return Number(prev) return Number(prev)
} }
@@ -644,7 +723,7 @@ export default {
sums[index] = '绑定重量:' sums[index] = '绑定重量:'
return return
} else if (index === 6) { } else if (index === 6) {
const values = data.map(item => Number(item['重量'])) const values = data.map(item => Number(item['重量']))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
@@ -662,7 +741,7 @@ export default {
sums[index] = '总金额:' sums[index] = '总金额:'
return return
} else if (index === 8) { } else if (index === 8) {
const values = data.map(item => Number(item['金额'])) const values = data.map(item => Number(item['金额']))
if (!values.every(value => isNaN(value))) { if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => { sums[index] = values.reduce((prev, curr) => {
const value = Number(curr) const value = Number(curr)
@@ -685,65 +764,18 @@ export default {
this.tableData5 = [] this.tableData5 = []
this.tableData6 = [] this.tableData6 = []
this.supplierNameValue ? this.check = 1 : this.check = 0 this.supplierNameValue ? this.check = 1 : this.check = 0
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
if (this.PickingValue === 0 || this.PickingValue === 1) { if (this.PickingValue === 0 || this.PickingValue === 1) {
this.check2 = 1 this.check2 = 1
} else { } else {
this.check2 = 0 this.check2 = 0
} }
searchArriveOrder(this.check, this.supplierNameValue, this.check1, this.dateRange[0], this.dateRange[1], this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => { searchArriveOrder(this.check, this.supplierNameValue, this.check2, this.PickingValue, this.pageCurrent4, this.pageSize4).then(response => {
this.tableData4 = response.data.rows this.tableData4 = response.data.rows
this.total4 = response.data.total this.total4 = response.data.total
}) })
}, },
save(index, row) {
this.SUM = 0
this.ALLMoney = parseInt(row.总重量 * this.单价 * 100) / 100
for (let i = 0; i < this.tableData6.length; i++) {
this.SUM += parseFloat(this.tableData6[i].总重量)
}
if (this.数量 - this.SUM < 0) {
this.$message.warning('总重量已超出上限')
searchTable6(this.ArrivalOrderMXNumber).then(response => {
this.tableData6 = response.data
if (response.data.length !== 0) {
this.未绑定数量 = response.data[0].未绑定数量
}
})
} else {
if (row.采购计划明细流水号) {
saveWeight(row.采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
if (response.data[0].result === '1') {
this.$message.success('录入成功')
searchTable6(this.ArrivalOrderMXNumber).then(response => {
this.tableData6 = response.data
if (response.data.length !== 0) {
this.未绑定数量 = response.data[0].未绑定数量
}
})
} else {
this.$message.error('录入失败')
}
})
} else {
saveWeight1(row.离线采购计划明细流水号, row.总重量, this.ALLMoney).then(response => {
if (response.data[0].result === '1') {
this.$message.success('录入成功')
searchTable6(this.ArrivalOrderMXNumber).then(response => {
this.tableData6 = response.data
if (response.data.length !== 0) {
this.未绑定数量 = response.data[0].未绑定数量
}
})
} else {
this.$message.error('录入失败')
}
})
}
}
},
Calculation() { Calculation() {
this.form1.金额 = this.form1.单价 * this.form1.数量 this.form10.金额 = this.form10.单价 * this.form10.数量
}, },
handleSizeChange4(val) { // 采购单列表分页 handleSizeChange4(val) { // 采购单列表分页
this.pageSize4 = val this.pageSize4 = val
@@ -799,13 +831,12 @@ export default {
this.title = '编辑到货单' this.title = '编辑到货单'
this.form.备注 = row.备注 this.form.备注 = row.备注
this.form.日期 = row.日期 this.form.日期 = row.日期
this.form.supplierNameValue = row.供应商流水号
this.dialogVisible = true this.dialogVisible = true
}, },
submitEditArrivalOrder() { submitEditArrivalOrder() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
editPurchaseOrder(this.form.备注, this.到货单流水号, this.form.supplierNameValue, this.form.日期).then(response => { editPurchaseOrder(this.form.备注, this.到货单流水号, this.form.日期).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('修改到货单成功') this.$message.success('修改到货单成功')
this.searchTable4() this.searchTable4()
@@ -850,32 +881,57 @@ export default {
}) })
}, },
addArrivalOrderMX(row) { addArrivalOrderMX(row) {
if (this.$refs['form1'] !== undefined) { if (this.$refs['form10'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form10'].resetFields()
} }
this.供应商111 = row.供应商流水号 this.form10.CailiaoValue = ''
this.title1 = '添加到货明细' this.form10.数量 = ''
this.form1.CailiaoValue = '' this.form10.单价 = ''
this.form1.数量 = '' this.form10.金额 = ''
this.form1.单价 = '' this.供应商 = row.供应商流水号
this.form1.金额 = '' this.供应商名称 = row.供应商名称
this.到货单编号 = row.到货单编号
this.ArrivalOrderNumber = row.到货单流水号 this.ArrivalOrderNumber = row.到货单流水号
this.dialogVisible1 = true this.dialogVisible10 = true
this.searchTable20()
}, },
submitAddArrivalOrderMX() { submitAddArrivalOrderMX() {
if (this.form1.数量 > 0) { if (this.form10.数量 > 0) {
this.form1.金额 = this.form1.数量 * this.form1.单价 this.form10.金额 = this.form10.数量 * this.form10.单价
this.$refs['form1'].validate((valid) => { this.$refs['form10'].validate((valid) => {
if (valid) { if (valid) {
AddArrivalOrderMX(this.ArrivalOrderNumber, this.form1.CailiaoValue, this.form1.数量, this.form1.单位, this.form1.单价, this.form1.金额).then(response => { if (this.arrest.length === 0) {
if (response.data[0].result === '1') { this.$message.warning('请勾选要绑定的材料')
this.$message.success('新增到货材料成功') } else {
searchTable5(this.ArrivalOrderNumber).then(response => { this.工艺计划流水号组 = []
this.tableData5 = response.data this.采购计划明细流水号组 = []
}) this.离线采购计划明细流水号组 = []
// this.dialogVisible1 = false this.本次到货数量组 = []
} else { this.$message.error('新建到货单失败') } this.到货重量组 = []
}) this.到货金额组 = []
this.arrest.map(v => {
this.工艺计划流水号组.push(v.工艺计划流水号)
this.采购计划明细流水号组.push(v.采购计划明细流水号)
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
this.本次到货数量组.push(v.未到货数量)
this.到货重量组.push(v.到货重量)
this.到货金额组.push(v.到货重量 * this.form10.单价)
})
AddArrivalOrderMX(this.ArrivalOrderNumber, this.form10.CailiaoValue, this.form10.数量, this.form10.单位, this.form10.单价, this.form10.金额, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.到货重量组, this.到货金额组, this.userId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新增到货材料成功')
this.form10.CailiaoValue = ''
this.form10.数量 = ''
this.form10.单价 = ''
this.form10.金额 = ''
this.searchTable20()
searchTable5(this.ArrivalOrderNumber).then(response => {
this.tableData5 = response.data
})
// this.dialogVisible1 = false
} else { this.$message.error('新建到货单失败') }
})
}
} else { } else {
return false return false
} }
@@ -885,7 +941,6 @@ export default {
} }
}, },
submitAddArrivalOrderMX1() { submitAddArrivalOrderMX1() {
this.searchCailiao()
this.form1.CailiaoValue = '' this.form1.CailiaoValue = ''
this.form1.数量 = '' this.form1.数量 = ''
this.form1.单价 = '' this.form1.单价 = ''
@@ -895,8 +950,6 @@ export default {
if (this.$refs['form1'] !== undefined) { if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form1'].resetFields()
} }
this.供应商111 = row.供应商流水号
this.searchCailiao()
this.title1 = '编辑到货明细' this.title1 = '编辑到货明细'
// this.form1.CailiaoValue = row.材料 // this.form1.CailiaoValue = row.材料
this.form1.数量 = row.数量 this.form1.数量 = row.数量
@@ -959,11 +1012,11 @@ export default {
}) })
}, },
addArrivalCL(row) { addArrivalCL(row) {
this.supplierName0 = row.供应商流水号 this.供应商 = row.供应商流水号
this.ArrivalOrderMXNumber = row.到货单明细流水号 this.ArrivalOrderMXNumber = row.到货单明细流水号
this.tableData3 = [] this.单价 = row.单价
this.dialogVisible2 = true this.dialogVisible2 = true
this.searchTable2() this.searchTable20()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.arrest = val this.arrest = val
@@ -980,18 +1033,20 @@ export default {
this.采购计划明细流水号组 = [] this.采购计划明细流水号组 = []
this.离线采购计划明细流水号组 = [] this.离线采购计划明细流水号组 = []
this.本次到货数量组 = [] this.本次到货数量组 = []
this.到货重量组 = []
this.到货金额组 = []
this.arrest.map(v => { this.arrest.map(v => {
this.工艺计划流水号组.push(v.工艺计划流水号) this.工艺计划流水号组.push(v.工艺计划流水号)
this.采购计划明细流水号组.push(v.采购计划明细流水号) this.采购计划明细流水号组.push(v.采购计划明细流水号)
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号) this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
this.本次到货数量组.push(v.未到货数量) this.本次到货数量组.push(v.未到货数量)
this.到货重量组.push(v.到货重量)
this.到货金额组.push(v.到货重量 * this.单价)
}) })
addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.userId).then(response => { addMateriel(this.ArrivalOrderMXNumber, this.工艺计划流水号组, this.采购计划明细流水号组, this.本次到货数量组, this.离线采购计划明细流水号组, this.到货重量组, this.到货金额组, this.userId).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('关联成功') this.$message.success('关联成功')
searchMateriel(this.采购计划流水号).then(response => { this.searchTable20()
this.tableData3 = response.data
})
searchTable6(this.ArrivalOrderMXNumber).then(response => { searchTable6(this.ArrivalOrderMXNumber).then(response => {
this.tableData6 = response.data this.tableData6 = response.data
if (response.data.length !== 0) { if (response.data.length !== 0) {

View File

@@ -32,80 +32,38 @@
type="date" type="date"
placeholder="选择日期"/> placeholder="选择日期"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="查询外购备料发票信息" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button> <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=30;searchTable1()">查询</el-button>
</el-tooltip> </el-tooltip>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增发票</el-button> <el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addTable1()">新增发票</el-button>
</el-row> </el-row>
</el-card> </el-card>
<el-card> <el-card style="width: 58%;float: left">
<el-table <el-table
:data="tableData1" :data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
size="mini" size="mini"
style="margin-top: 3px" style="margin-top: 3px"
height="550px" height="750px"
stripe stripe
border border
highlight-current-row highlight-current-row
@expand-change="searchTable02"> @row-click="searchTable02">
<el-table-column type="expand" label="详情"> <el-table-column align="center" label="发票状态" width="80px">
<template slot-scope="scope">
<el-table :data="gridData" class="subTableHeader" show-summary stripe border size="mini" style="width: 40%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="供应商">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="到货日期">
<template slot-scope="scope">
{{ scope.row.日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="操作">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
<el-button
type="text"
size="mini"
icon="el-icon-delete"
@click="deleteTable10(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="发票状态" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.是否请款) === 0" type="warning" size="mini">未请款</el-tag> <el-tag v-if="Number(scope.row.是否请款) === 0" type="warning" size="mini">未请款</el-tag>
<el-tag v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</el-tag> <el-tag v-else-if="Number(scope.row.是否请款) === 1" type="primary" size="mini">已请款</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="发票号" min-width="120px"> <el-table-column align="center" label="发票号" width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.发票号 }} {{ scope.row.发票号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="开票时间" prop="开票时间" min-width="100px"> <el-table-column align="center" label="开票时间" prop="开票时间" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票时间 }} {{ scope.row.开票时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="开票金额" min-width="100px"> <el-table-column align="center" label="开票金额" width="80px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.开票金额 }} {{ scope.row.开票金额 }}
</template> </template>
@@ -171,29 +129,124 @@
@current-change="handleCurrentChange1"/> @current-change="handleCurrentChange1"/>
</div> </div>
</el-card> </el-card>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="400px"> <el-card style="float: left;width: 41.3%;margin-left: 5px">
<el-table :data="gridData" class="subTableHeader" show-summary stripe border size="mini" style="width: 100%">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column min-width="150" align="center" label="供应商">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column width="100" align="center" label="到货日期">
<template slot-scope="scope">
{{ scope.row.日期.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="金额" align="center" width="80" prop="到货金额">
<template slot-scope="scope">
{{ scope.row.到货金额 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column min-width="100" align="center" label="操作">
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
<el-button
type="text"
size="mini"
icon="el-icon-delete"
@click="deleteTable10(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogVisible1" center style="min-height: 300px" width="1400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="110px"> <el-form ref="form1" :model="form1" :rules="rules1" label-width="110px">
<el-form-item label="供应商" prop="supplierNameValue"> <div style="width: 25%;float: left;margin-top: 5px">
<el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable> <div style="background: gainsboro">
<el-option <el-form-item label="供应商" prop="supplierNameValue">
v-for="item in supplierNames" <el-select v-model="form1.supplierNameValue" placeholder="供应商" size="small" filterable @change="Name=form1.supplierNameValue;pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">
:key="item.value" <el-option
:label="item.label" v-for="item in supplierNames"
:value="item.value"/> :key="item.value"
</el-select> :label="item.label"
</el-form-item> :value="item.value"/>
<el-form-item label="发票号" prop="money"> </el-select>
<el-input v-model="form1.Number" size="small" placeholder="发票号"/> </el-form-item>
</el-form-item> <el-form-item label="发票号" prop="money">
<el-form-item label="开票时间" prop="invoiceTime"> <el-input v-model="form1.Number" size="small" placeholder="发票号"/>
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/> </el-form-item>
</el-form-item> <el-form-item label="开票时间" prop="invoiceTime">
<el-form-item label="开票金额" prop="money"> <el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
<el-input v-model="form1.money" size="small" placeholder="开票金额"/> </el-form-item>
</el-form-item> <el-form-item label="开票金额" prop="money">
<el-form-item label="备注" prop="remark"> <el-input v-model="form1.money" size="small" placeholder="开票金额"/>
<el-input v-model="form1.remark" size="small"/> </el-form-item>
</el-form-item> <el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
</el-form-item>
</div>
</div>
<div style="width: 74%;float: left;margin-left: 5px">
<div>
<span style="margin-left: 10px">时间段:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:260px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询到货单" placement="top">
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="pageCurrent4=1;pageSize4=10;total4=0;searchTable4()">查询</el-button>
</el-tooltip>
</div>
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="供应商" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="到货日期" align="center">
<template slot-scope="scope">
{{ scope.row.日期.split(' ')[0] }}
</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" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="pageCurrent4"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize4"
:total="total4"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange4"
@current-change="handleCurrentChange4"/>
</div>
</div>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible1 = false">取消</el-button> <el-button size="small" @click="dialogVisible1 = false">取消</el-button>
@@ -282,7 +335,7 @@ export default {
Name: '', Name: '',
arrest: [], arrest: [],
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10, pageSize1: 30,
total1: 0, total1: 0,
pageCurrent4: 1, pageCurrent4: 1,
pageSize4: 10, pageSize4: 10,
@@ -303,7 +356,6 @@ export default {
dialogVisible: false, dialogVisible: false,
dialogVisible1: false, dialogVisible1: false,
title1: '', title1: '',
expands: [],
form1: { form1: {
supplierNameValue: '', supplierNameValue: '',
Number: '', Number: '',
@@ -399,29 +451,11 @@ export default {
this.searchTable4() this.searchTable4()
}, },
searchTable02(row) { // 查看详情(发票包含的合同) searchTable02(row) { // 查看详情(发票包含的合同)
if (this.a === 1) {
this.expands.push(row.发票流水号)
this.b = row.发票流水号
this.a = 0
} else {
if (this.b === row.发票流水号) {
this.expands = []
this.a = 1
} else {
this.expands = []
this.expands.push(row.发票流水号)
this.a = 0
this.b = row.发票流水号
}
}
this.发票流水号 = row.发票流水号 this.发票流水号 = row.发票流水号
searchInvoiceDetail(this.发票流水号).then(response => { searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data this.gridData = response.data
}) })
}, },
getRowKeys(row) {
return row.发票流水号
},
addTable1() { addTable1() {
if (this.$refs['form1'] !== undefined) { if (this.$refs['form1'] !== undefined) {
this.$refs['form1'].resetFields() this.$refs['form1'].resetFields()
@@ -438,13 +472,23 @@ export default {
submitAdd1(formName) { submitAdd1(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
addInvoice(this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue).then(response => { if (this.arrest.length === 0) {
if (response.data[0].result === '1') { this.$message.warning('请勾选需要关联的到货单')
this.$message.success('增加成功') } else {
this.dialogVisible1 = false this.到货单流水号组 = []
this.searchTable1() this.arrest.map(v => {
} else { this.$message.error('增加失败') } this.到货单流水号组.push(v.到货单流水号)
}) })
addInvoice(this.form1.invoiceTime, this.form1.money, this.form1.Number, this.form1.remark, this.form1.supplierNameValue, this.到货单流水号组).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogVisible1 = false
this.searchTable1()
} else {
this.$message.error('增加失败')
}
})
}
} else { } else {
console.log('error submit!!') console.log('error submit!!')
return false return false
@@ -526,7 +570,9 @@ export default {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('关联成功') this.$message.success('关联成功')
this.dialogVisible = false this.dialogVisible = false
this.tableData4 = [] searchInvoiceDetail(this.发票流水号).then(response => {
this.gridData = response.data
})
} else { this.$message.error('关联失败') } } else { this.$message.error('关联失败') }
}) })
} }

View File

@@ -27,104 +27,107 @@
size="small" size="small"
icon="el-icon-search" icon="el-icon-search"
style="margin-left: 10px" style="margin-left: 10px"
@click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button> @click="pageCurrent1=1;pageSize1=30;total1=0;searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">请款</el-button> <el-button type="primary" size="small" icon="el-icon-goods" style="" @click="requestFund">新增请款</el-button>
</el-card> </el-card>
<el-row>
<el-card> <el-col style="width: 1200px">
<el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe> <el-card>
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="250"> <el-table v-loading="" :data="tableData1" border style="max-height: 500px;" height="500px" size="mini" stripe @row-click="searchTable02">
<template slot-scope="scope"> <el-table-column label="供应商" prop="供应商名称" align="center" min-width="340">
{{ scope.row.供应商名称 }} <template slot-scope="scope">
</template> {{ scope.row.供应商名称 }}
</el-table-column> </template>
<el-table-column label="请款时间" prop="请款时间" align="center" min-width="150"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="请款时间" prop="请款时间" align="center" width="80">
{{ scope.row.请款时间 }} <template slot-scope="scope">
</template> {{ scope.row.请款时间.substr(0,10) }}
</el-table-column> </template>
<el-table-column label="请款人" prop="姓名" align="center" min-width="80"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="请款人" prop="姓名" align="center" width="100">
{{ scope.row.姓名 }} <template slot-scope="scope">
</template> {{ scope.row.姓名 }}
</el-table-column> </template>
<el-table-column label="请款金额" align="center" min-width="90" prop="请款金额"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="请款金额" align="center" width="90" prop="请款金额">
{{ scope.row.请款金额 }} <template slot-scope="scope">
</template> {{ scope.row.请款金额 }}
</el-table-column> </template>
<el-table-column label="请款付款情况" align="center"> </el-table-column>
<el-table-column label="审批情况内容" width="100" align="center"> <!-- <el-table-column label="请款付款情况" align="center">-->
<template slot-scope="scope"> <el-table-column label="审批情况内容" width="100" align="center">
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag> <el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
<el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">通过</el-tag> <el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">通过</el-tag>
</template> <el-tag v-if="Number(scope.row.审批情况流水号)===2" type="danger" size="small">不通过</el-tag>
</el-table-column> </template>
<el-table-column label="未通过审批原因" width="110" align="center"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="未通过审批原因" width="130" align="center">
{{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }} <template slot-scope="scope">
</template> {{ scope.row.未通过审批原因 === '通过' ? '—' : scope.row.未通过审批原因 }}
</el-table-column> </template>
<el-table-column label="付款情况" width="100" align="center"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="付款情况" width="100" align="center">
<el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag> <template slot-scope="scope">
<el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">已同意</el-tag> <el-tag v-if="Number(scope.row.付款情况流水号)===3" type="primary" size="small">未操作</el-tag>
<el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">同意</el-tag> <el-tag v-if="Number(scope.row.付款情况流水号)===1" type="success" size="small">同意</el-tag>
</template> <el-tag v-if="Number(scope.row.付款情况流水号)===2" type="danger" size="small">不同意</el-tag>
</el-table-column> </template>
<el-table-column label="未付款原因" width="100" align="center"> </el-table-column>
<template slot-scope="scope"> <el-table-column label="未付款原因" width="100" align="center">
{{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }} <template slot-scope="scope">
</template> {{ scope.row.未付款原因 === '通过' ? '—' : scope.row.未付款原因 }}
</el-table-column> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <!-- </el-table-column>-->
<template slot-scope="scope"> <el-table-column label="操作" align="center" width="120">
<el-popover placement="right" width="500" trigger="click"> <template slot-scope="scope">
<el-table :data="gridData" highlight-current-row size="mini" show-summary> <el-button :disabled="Number(id)!==Number(scope.row.请款人) || (Number(scope.row.审批情况流水号)===1 && Number(scope.row.付款情况流水号)!==2)" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" plain @click="cancelRequestFund(scope.row)">取消请款</el-button>
<el-table-column width="50" align="center" type="index" label="序号"/> </template>
<el-table-column min-width="150" align="center" label="采购合同编号"> </el-table-column>
<template slot-scope="scope"> </el-table>
{{ scope.row.采购合同编号 }} <div class="block" style="margin-top: 10px;">
</template> <el-pagination
</el-table-column> :current-page="pageCurrent1"
<el-table-column min-width="100" align="center" label="已付金额" prop="已付金额"> :page-sizes="[10, 20, 30, 40]"
<template slot-scope="scope"> :page-size="pageSize1"
{{ scope.row.已付金额 }} :total="total1"
</template> style="display:inline-block;width:40%"
</el-table-column> layout="total, sizes, prev, pager, next, jumper"
<el-table-column min-width="100" align="center" label="请款金额" prop="请款金额"> @size-change="handleSizeChange1"
<template slot-scope="scope"> @current-change="handleCurrentChange1"/>
{{ scope.row.请款金额 }} <!-- <span v-show="supplierValue">累计合同总额</span>-->
</template> <!-- <el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/>-->
</el-table-column> <!-- <span v-show="supplierValue">累计付款</span>-->
</el-table> <!-- <el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/>-->
<el-button slot="reference" type="primary" size="mini" icon="el-icon-search" plain @click="searchTable02(scope.row)">查看详情</el-button> <!-- <span v-show="supplierValue">累计欠款</span>-->
</el-popover> <!-- <el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/>-->
<el-button :disabled="Number(id)!==Number(scope.row.请款人) || (Number(scope.row.审批情况流水号)===1 && Number(scope.row.付款情况流水号)!==2)" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" plain @click="cancelRequestFund(scope.row)">取消请款</el-button> </div>
</template> </el-card>
</el-table-column> </el-col>
</el-table> <el-col style="width: 500px">
<div class="block" style="margin-top: 10px;"> <el-card>
<el-pagination <el-table :data="gridData" highlight-current-row size="mini" show-summary>
:current-page="pageCurrent1" <el-table-column width="50" align="center" type="index" label="序号"/>
:page-sizes="[10, 20, 30, 40]" <el-table-column min-width="150" align="center" label="采购合同编号">
:page-size="pageSize1" <template slot-scope="scope">
:total="total1" {{ scope.row.采购合同编号 }}
style="display:inline-block;width:50%" </template>
layout="total, sizes, prev, pager, next, jumper" </el-table-column>
@size-change="handleSizeChange1" <el-table-column min-width="100" align="center" label="已付金额" prop="已付金额">
@current-change="handleCurrentChange1"/> <template slot-scope="scope">
<span v-show="supplierValue">累计合同总额</span> {{ scope.row.已付金额 }}
<el-input v-show="supplierValue" v-model="totalSum" size="mini" style="width: 100px;" readonly/> </template>
<span v-show="supplierValue">累计付款</span> </el-table-column>
<el-input v-show="supplierValue" v-model="totalPay" size="mini" style="width: 100px;" readonly/> <el-table-column min-width="100" align="center" label="请款金额" prop="请款金额">
<span v-show="supplierValue">累计欠款</span> <template slot-scope="scope">
<el-input v-show="supplierValue" v-model="totalDebt" size="mini" style="width: 100px;" readonly/> {{ scope.row.请款金额 }}
</div> </template>
</el-card> </el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px"> <el-dialog :visible.sync="dialogVisible2" title="采购合同请款" center style="min-height: 300px" width="1200px">
<span>供应商</span> <span>供应商</span>
<el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small"> <el-select v-model="supplierValue" placeholder="供应商" filterable clearable size="small">
@@ -242,7 +245,7 @@ export default {
tableData1: [], tableData1: [],
total1: 0, total1: 0,
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 10, pageSize1: 30,
returns: '', returns: '',
supplierValue: '', supplierValue: '',
supplier: [], supplier: [],