This commit is contained in:
liushuai
2020-03-15 16:01:54 +08:00
parent 7e162bd0ab
commit 27b9331a9f
3 changed files with 29 additions and 13 deletions

View File

@@ -184,7 +184,7 @@
</el-table-column> </el-table-column>
<el-table-column label="库存(BZ)" align="center" width="80" prop="库存"> <el-table-column label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.库存 }} {{ scope.row.货位存量 - scope.row.占用数量 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="使用库存数量" align="center" width="145" prop="使用库存数"> <el-table-column label="使用库存数量" align="center" width="145" prop="使用库存数">
@@ -254,8 +254,10 @@
<div style="display: inline-block; float: left"> <div style="display: inline-block; float: left">
<el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="为选择的询价单添加物料" placement="top">
<el-button <el-button
type="distribution" type="primary"
size="small" size="small"
plain
icon="el-icon-bottom"
style="margin: 0px 20px; display: inline-block;" style="margin: 0px 20px; display: inline-block;"
@click="addInquirySheet">选入物料</el-button> @click="addInquirySheet">选入物料</el-button>
</el-tooltip> </el-tooltip>
@@ -1380,7 +1382,7 @@ export default {
changeNumber(row) { changeNumber(row) {
changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => { changeNum(row.物料流水号, row.使用库存数, row.机床流水号, row.组件零件流水号, row.零件数量).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('使用成功') // this.$message.success('使用成功')
this.searchTable11() this.searchTable11()
} else { } else {
this.$message.success('使用失败') this.$message.success('使用失败')
@@ -2253,6 +2255,7 @@ export default {
} }
}, },
addInquirySheet() { // 追加物料 addInquirySheet() { // 追加物料
this.numbers = []
const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号 const numGroup1 = [] // 空数组,放该询价单中已有的组件零件流水号
const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号 const numGroup2 = [] // 空数组,放该询价单中已有的组件零件基本件流水号
if (this.inquirySheetFlowNum === '' || this.inquirySheetFlowNum === null) { if (this.inquirySheetFlowNum === '' || this.inquirySheetFlowNum === null) {
@@ -2441,11 +2444,15 @@ export default {
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
let color = '' let color = ''
if (this.numbers.length > 0) {
this.numbers.forEach((r, i) => { this.numbers.forEach((r, i) => {
if (rowIndex === r) { if (rowIndex === r) {
color = 'MistyRose' color = 'MistyRose'
} }
}) })
} else {
color = ''
}
return color return color
}, },
tableRowClassName2({ row, rowIndex }) { tableRowClassName2({ row, rowIndex }) {

View File

@@ -150,7 +150,7 @@
<el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button> <el-button type="primary" plain size="small" style="margin-left:10px;" @click="editContract()">预览合同</el-button>
<span>递交审核</span> <span>递交审核</span>
<el-tooltip :open-delay="1000" effect="dark" content="生成合同并提交审核" placement="top"> <el-tooltip :open-delay="1000" effect="dark" content="生成合同并提交审核" placement="top">
<el-button type="primary" plain size="small" @click="generateContract()">递交</el-button> <el-button :disabled="openDeal" type="primary" plain size="small" @click="generateContract()">递交</el-button>
</el-tooltip> </el-tooltip>
<hr> <hr>
<!--html代码--> <!--html代码-->
@@ -180,6 +180,7 @@ export default {
return { return {
isShowN: false, isShowN: false,
loading: false, loading: false,
openDeal: true,
supplierValue11: '', // 供应商查询条件 supplierValue11: '', // 供应商查询条件
supplier11: [], supplier11: [],
quickChangePrice: true, quickChangePrice: true,
@@ -517,6 +518,7 @@ export default {
}, },
contractChange() { // 选择合同select contractChange() { // 选择合同select
this.loading = true this.loading = true
this.openDeal = true
searchContractHeader(this.contractNumValue).then(response => { searchContractHeader(this.contractNumValue).then(response => {
this.deliveryDate = response.data[0].交货日期 this.deliveryDate = response.data[0].交货日期
this.invoiceInfo = response.data[0].开票信息 this.invoiceInfo = response.data[0].开票信息
@@ -734,6 +736,7 @@ export default {
` `
}, },
async editContract() { // 选择一个询价单,整成合同明细 async editContract() { // 选择一个询价单,整成合同明细
this.openDeal = false
const date = new Date() const date = new Date()
this.year = date.getFullYear() this.year = date.getFullYear()
this.month = date.getMonth() + 1 this.month = date.getMonth() + 1
@@ -832,6 +835,7 @@ export default {
// this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML // this.contentNew = document.getElementsByClassName('editor-content')[0].innerHTML
// this.$refs.tinymce.initTinymce() // this.$refs.tinymce.initTinymce()
setTimeout(() => { setTimeout(() => {
this.submitTotal()
// this.$refs.tinymce.setContent(this.contentNew) // this.$refs.tinymce.setContent(this.contentNew)
}, 1000) }, 1000)
} else { } else {
@@ -880,6 +884,7 @@ export default {
doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100, inquiryDetailNum_old, this.备注组).then(response => { doneContract(this.contractNum, this.contractName, this.deliveryDate, this.payDate, this.payMethod, this.invoiceInfo, this.otherInfo, this.actualTotal, this.id, this.supplierValue, this.单价是否含税, this.组件零件流水号组, this.组件零件基本件流水号组, this.数量组, this.单价组, this.交货期组, this.content, this.taxRate * 100, inquiryDetailNum_old, this.备注组).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('合同生成成功') this.$message.success('合同生成成功')
this.openDeal = true
this.reload() this.reload()
} else { } else {
this.$message.error('生成合同失败') this.$message.error('生成合同失败')

View File

@@ -61,7 +61,8 @@
</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">
<el-input v-model="scope.row.单价" positive="'float'" class="editWorkTime" size="mini" style="width:100%" type="number" @input="filterNuber1(scope.row.单价, scope.$index, '单价')" @change="update1(scope.row)"/> <el-input v-model="scope.row.单价" positive="'float'" class="editWorkTime" size="mini" style="width:100%" type="number" @input="filterNuber1(scope.row.单价, scope.$index, '单价')"/>
<!-- @change="update1(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="150">
@@ -112,7 +113,8 @@
</el-table-column> </el-table-column>
<el-table-column label="单价(元)" align="center" width="140"> <el-table-column label="单价(元)" align="center" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.单价" positive="'float'" class="editWorkTime" size="mini" type="number" style="width:100px" @input="filterNuber(scope.row.单价, scope.$index, '单价')" @change="calculateContractSum"/> <el-input v-model="scope.row.单价" positive="'float'" class="editWorkTime" size="mini" type="number" style="width:100px" @blur="filterNuber(scope.row.单价, scope.$index, '单价')"/>
<!--@change="calculateContractSum"-->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="金额" align="center" width="140"> <el-table-column label="金额" align="center" width="140">
@@ -460,7 +462,7 @@ export default {
linkGroup() { linkGroup() {
this.dialogVisible2 = true this.dialogVisible2 = true
}, },
filterNuber(val, index, date) { filterNuber(val, index, date, row) {
console.log(index, 6666) console.log(index, 6666)
let value = '' + val let value = '' + val
value = value value = value
@@ -475,8 +477,9 @@ export default {
} }
console.log(value) console.log(value)
this.tableData4[index][date] = value this.tableData4[index][date] = value
this.calculateContractSum(row)
}, },
filterNuber1(val, index, date) { filterNuber1(val, index, date, row) {
let value = '' + val let value = '' + val
value = value value = value
.replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符 .replace(/[^\d.]/g, '') // 清除“数字”和“.”以外的字符
@@ -490,6 +493,7 @@ export default {
} }
console.log(value) console.log(value)
this.tableData5[index][date] = value this.tableData5[index][date] = value
this.update1(row)
}, },
submitGroup() { submitGroup() {
submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => { submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => {