更新
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-show="contractNumType===1" :data="tableData5" border style="width: 1200px" height="100px" size="mini">
|
||||
<el-table-column align="center" width="50" type="selection"/>
|
||||
<el-table-column label="组件名称" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.组件名称 }}
|
||||
@@ -637,14 +636,14 @@ export default {
|
||||
this.contractSum1 = 0
|
||||
this.costAccount = 0
|
||||
this.riseFallPoint = 0
|
||||
this.tableData4 = []
|
||||
for (let i = 0; i < this.groupNum2.length; i++) {
|
||||
if (this.groupNum2[i].单价 === '') {
|
||||
this.groupNum2[i].单价 = 0.00
|
||||
// this.tableData4 = []
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
if (this.tableData4[i].单价 === '') {
|
||||
this.tableData4[i].单价 = 0.00
|
||||
}
|
||||
this.groupNum2[i].金额 = parseFloat(this.groupNum2[i].单价) * parseFloat(this.groupNum2[i].零件数量)
|
||||
this.contractSum1 += parseFloat(this.groupNum2[i].金额)
|
||||
this.tableData4.push(this.groupNum2[i])
|
||||
this.tableData4[i].金额 = parseFloat(this.tableData4[i].单价) * parseFloat(this.tableData4[i].零件数量)
|
||||
this.contractSum1 += parseFloat(this.tableData4[i].金额)
|
||||
// this.tableData4.push(this.groupNum2[i])
|
||||
}
|
||||
this.contractSum = (this.contractSum1).toFixed(2)
|
||||
this.contractSum2 = (parseInt(this.contractSum * (1 - parseFloat(this.taxRate)) * 100) / 100).toFixed(2)
|
||||
@@ -660,8 +659,8 @@ export default {
|
||||
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))
|
||||
for (let i = 0; i < this.tableData5.length; i++) {
|
||||
this.contractSum1 += parseFloat((parseInt(this.tableData5[i].数量) * parseFloat(this.tableData5[i].单价)).toFixed(2))
|
||||
}
|
||||
this.contractSum = (this.contractSum1).toFixed(2)
|
||||
this.contractSum2 = parseInt(this.contractSum * (1 - parseFloat(this.taxRate)) * 100) / 100
|
||||
@@ -766,49 +765,52 @@ export default {
|
||||
this.$message.error('请选择供应商!')
|
||||
} else {
|
||||
if (this.contractNumType === 0) {
|
||||
this.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
this.group5 = []
|
||||
this.group7 = ''
|
||||
this.group8 = ''
|
||||
this.group9 = []
|
||||
this.group10 = ''
|
||||
this.group11 = ''
|
||||
this.group12 = ''
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
for (let j = 0; j < this.multipleSelection.length; j++) {
|
||||
if (this.tableData4[i].请购单明细流水号 === this.multipleSelection[j].请购单明细流水号) {
|
||||
console.log(333333)
|
||||
this.group1 += this.tableData4[i].物料流水号 + ','
|
||||
this.group2 += this.tableData4[i].零件数量 + ','
|
||||
this.group3 += this.tableData4[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9.push(Number(this.tableData4[i].请购单明细流水号))
|
||||
this.group11 += this.tableData4[i].单件定额工时 + ','
|
||||
this.group12 += this.tableData4[i].准结定额工时 + ','
|
||||
} else {
|
||||
if (this.group5.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1 && this.Selection.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1) {
|
||||
this.group5.push(Number(this.tableData4[i].请购单明细流水号))
|
||||
if (this.multipleSelection.length > 0) {
|
||||
this.group1 = ''
|
||||
this.group2 = ''
|
||||
this.group3 = ''
|
||||
this.group5 = []
|
||||
this.group7 = ''
|
||||
this.group8 = ''
|
||||
this.group9 = []
|
||||
this.group10 = ''
|
||||
this.group11 = ''
|
||||
this.group12 = ''
|
||||
for (let i = 0; i < this.tableData4.length; i++) {
|
||||
for (let j = 0; j < this.multipleSelection.length; j++) {
|
||||
if (this.tableData4[i].请购单明细流水号 === this.multipleSelection[j].请购单明细流水号) {
|
||||
this.group1 += this.tableData4[i].物料流水号 + ','
|
||||
this.group2 += this.tableData4[i].零件数量 + ','
|
||||
this.group3 += this.tableData4[i].单价 + ','
|
||||
this.group7 += this.taxRate + ','
|
||||
this.group8 += this.currencyValue + ','
|
||||
this.group9.push(Number(this.tableData4[i].请购单明细流水号))
|
||||
this.group11 += this.tableData4[i].单件定额工时 + ','
|
||||
this.group12 += this.tableData4[i].准结定额工时 + ','
|
||||
} else {
|
||||
if (this.group5.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1 && this.Selection.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1) {
|
||||
this.group5.push(Number(this.tableData4[i].请购单明细流水号))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
if (this.contractNum[i].value === this.contractNumValue) {
|
||||
this.RequisitionNumber = this.contractNum[i].label
|
||||
}
|
||||
}
|
||||
this.group1 = this.group1.substr(0, this.group1.length - 1)
|
||||
this.group2 = this.group2.substr(0, this.group2.length - 1)
|
||||
this.group3 = this.group3.substr(0, this.group3.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.contractValue, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge, this.group5).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
} else {
|
||||
this.$message.warning('请勾选要生成合同的物料')
|
||||
}
|
||||
this.group1 = this.group1.substr(0, this.group1.length - 1)
|
||||
this.group2 = this.group2.substr(0, this.group2.length - 1)
|
||||
this.group3 = this.group3.substr(0, this.group3.length - 1)
|
||||
doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.contractValue, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge, this.group5).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('生成合同成功')
|
||||
this.reload()
|
||||
} else { this.$message.error('生成合同失败') }
|
||||
})
|
||||
} else {
|
||||
if (this.contractValue === 4) {
|
||||
for (let i = 0; i < this.contractNum.length; i++) {
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0.00" size="mini" style="width:100%" @change="saveData(scope.row)"/>
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="1" size="mini" style="width:100%" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量(KG)" align="center" width="150px" prop="到货重量">
|
||||
@@ -431,7 +431,20 @@
|
||||
<span>零件图号</span>
|
||||
<el-input v-model="零件图号" style="width: 150px" size="small" clearable/>
|
||||
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable20()">查询</el-button>
|
||||
<el-table :row-key="getRowKeys" :row-selection="{selectedRowKeys: selectedRowKeys}" :data="tableData20" border highlight-current-row stripe style="margin: 3px 0" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:row-key="getRowKeys"
|
||||
:summary-method="getSummaries3"
|
||||
:row-selection="{selectedRowKeys: selectedRowKeys}"
|
||||
:data="tableData20"
|
||||
border
|
||||
show-summary
|
||||
highlight-current-row
|
||||
stripe
|
||||
style="margin: 3px 0"
|
||||
height="300px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange1">
|
||||
<el-table-column :reserve-selection="mark" type="selection" width="50" align="center"/>
|
||||
<el-table-column label="采购单号" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
@@ -463,14 +476,14 @@
|
||||
{{ scope.row.到货数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货件数" align="center" width="90px">
|
||||
<el-table-column label="到货件数" align="center" width="120px">
|
||||
<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:95px" @change="saveData(scope.row)"/>
|
||||
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="1" size="mini" style="width:95px" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="到货重量(KG)" align="center" width="120px">
|
||||
<el-table-column label="到货重量(KG)" align="center" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
|
||||
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:100%" @change="saveData(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品尺寸(长、宽、高)" align="center">
|
||||
@@ -490,7 +503,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">选入备料材料</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" style="margin-left: 10px" @click="addMateriel">关联备料材料</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -511,6 +524,7 @@ export default {
|
||||
expands: [],
|
||||
totalWight: 0.00,
|
||||
totalWight1: 0.00,
|
||||
totalWight2: 0.00,
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '上季度',
|
||||
@@ -560,6 +574,7 @@ export default {
|
||||
}
|
||||
],
|
||||
arrest: [],
|
||||
arrest1: [],
|
||||
check: 0,
|
||||
Name: '',
|
||||
单价: '',
|
||||
@@ -717,6 +732,30 @@ export default {
|
||||
未到货数量: row.未到货数量
|
||||
})
|
||||
}
|
||||
if (this.arrest.length > 0) {
|
||||
this.arrest.map(v => {
|
||||
if (v.采购计划明细流水号 === row.采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
v.未到货数量 = row.未到货数量
|
||||
}
|
||||
})
|
||||
this.totalWight = 0.00
|
||||
for (let i = 0; i < this.arrest.length; i++) {
|
||||
this.totalWight += this.arrest[i].到货重量
|
||||
}
|
||||
}
|
||||
if (this.arrest1.length > 0) {
|
||||
this.arrest1.map(v => {
|
||||
if (v.采购计划明细流水号 === row.采购计划明细流水号) {
|
||||
v.到货重量 = row.到货重量
|
||||
v.未到货数量 = row.未到货数量
|
||||
}
|
||||
})
|
||||
this.totalWight2 = 0.00
|
||||
for (let i = 0; i < this.arrest1.length; i++) {
|
||||
this.totalWight2 += this.arrest1[i].到货重量
|
||||
}
|
||||
}
|
||||
},
|
||||
fetchdata() {
|
||||
searchSupplier(0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0, '').then(response => {
|
||||
@@ -883,6 +922,19 @@ export default {
|
||||
})
|
||||
return sums
|
||||
},
|
||||
getSummaries3(param) {
|
||||
const { columns } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 7) {
|
||||
sums[index] = '总重量:'
|
||||
return
|
||||
} else if (index === 8) {
|
||||
sums[index] = this.totalWight2 + ' KG'
|
||||
}
|
||||
})
|
||||
return sums
|
||||
},
|
||||
// 查询到货单
|
||||
searchTable4() {
|
||||
this.tableData5 = []
|
||||
@@ -1154,15 +1206,23 @@ export default {
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.totalWight += val[i].到货重量
|
||||
}
|
||||
console.log(this.totalWight, 111)
|
||||
this.arrest = val
|
||||
},
|
||||
handleSelectionChange1(val) {
|
||||
this.totalWight2 = 0.00
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.totalWight2 += val[i].到货重量
|
||||
}
|
||||
this.arrest1 = val
|
||||
},
|
||||
// 选入
|
||||
addMateriel() {
|
||||
if (!this.ArrivalOrderMXNumber) {
|
||||
this.$message.warning('请选择到货材料')
|
||||
} else if (this.arrest.length === 0) {
|
||||
} else if (this.arrest1.length === 0) {
|
||||
this.$message.warning('请勾选需要关联的材料')
|
||||
} else if (this.未绑定数量 < this.totalWight2) {
|
||||
this.$message.warning('所选物料总重量超出未绑定重量')
|
||||
} else {
|
||||
this.工艺计划流水号组 = []
|
||||
this.采购计划明细流水号组 = []
|
||||
@@ -1170,7 +1230,7 @@ export default {
|
||||
this.本次到货数量组 = []
|
||||
this.到货重量组 = []
|
||||
this.到货金额组 = []
|
||||
this.arrest.map(v => {
|
||||
this.arrest1.map(v => {
|
||||
this.工艺计划流水号组.push(v.工艺计划流水号)
|
||||
this.采购计划明细流水号组.push(v.采购计划明细流水号)
|
||||
this.离线采购计划明细流水号组.push(v.离线采购计划明细流水号)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<span>合计:<el-input v-model="SUM" size="mini" style="width: 90px; margin: 10px 10px 0 10px"/>元</span>
|
||||
<el-button type="primary" size="small" style="float:right;margin: 10px 10px 0 10px" icon="el-icon-check" @click="submitRequestFund">提交请款审批</el-button>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -341,6 +341,7 @@ export default {
|
||||
handleSelectionChange(val) {
|
||||
this.contractGroup = []
|
||||
this.sumGroup = []
|
||||
this.SUM = 0
|
||||
for (let i = 0; i < val.length; i++) {
|
||||
this.SUM += parseFloat(val[i].开票金额)
|
||||
this.contractGroup.push(val[i].发票流水号)
|
||||
|
||||
Reference in New Issue
Block a user