更新
This commit is contained in:
@@ -142,7 +142,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
|
||||
<el-button type="warning" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
|
||||
</el-tooltip>
|
||||
<div class="block" style="margin: 10px 0 0 0;display: inline-block">
|
||||
<el-pagination
|
||||
@@ -159,7 +159,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="仓库" name="仓库">
|
||||
<el-row>
|
||||
<el-input v-model="materialName" style="width: 150px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent22=1;pageSize22=20;total22=0;searchTable22()"/>
|
||||
<el-input v-model="materialName" style="width: 180px;margin-left: 10px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent22=1;pageSize22=20;total22=0;searchTable22()"/>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable22()">查询</el-button>
|
||||
</el-row>
|
||||
<el-table
|
||||
@@ -167,35 +167,35 @@
|
||||
:data="tableData22"
|
||||
border
|
||||
stripe
|
||||
style="width: 594px;max-height: 500px;"
|
||||
style="width: 680px;max-height: 500px;"
|
||||
height="300px"
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange1"
|
||||
@select="handleSelection1">
|
||||
<el-table-column align="center" width="43" type="selection"/>
|
||||
<el-table-column label="名称" align="center" prop="物料名称" width="153" show-overflow-tooltip>
|
||||
<el-table-column label="名称" align="center" prop="物料名称" width="170" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图号或型号" prop="物料型号" align="center" width="128" show-overflow-tooltip>
|
||||
<el-table-column label="图号或型号" prop="物料型号" align="center" width="150" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" align="center" prop="物料规格" width="119" show-overflow-tooltip>
|
||||
<el-table-column label="规格" align="center" prop="物料规格" width="140" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料规格 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="132">
|
||||
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供货商 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
|
||||
<el-button type="warning" size="small" icon="el-icon-bottom" plain style="margin: 0px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-bottom" plain style="margin: 5px 40px 0px 0px; display: inline-block" @click="addMateriel">选入物料</el-button>
|
||||
</el-tooltip>
|
||||
<div class="block" style="display: inline-block">
|
||||
<el-pagination
|
||||
@@ -222,7 +222,7 @@
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent2=1;pageSize2=10000;total2=0;searchTable2()">查询</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-circle-plus-outline" plain style="margin-right:30px;margin-left:100px;" @click="addOfflineContract">离线合同</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="生成合同" placement="top">
|
||||
<el-button :disabled="disabledbutton" type="success" size="small" plain style="margin-left:10px;margin-right: 10px" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
<el-button type="success" size="small" plain style="margin-left:10px;margin-right: 10px" @click="doneOfflineContact">生成离线合同</el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<!--<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>-->
|
||||
@@ -818,7 +818,6 @@ export default {
|
||||
paramRow: '', // 参数row
|
||||
disable: true, // 其他的禁用
|
||||
tabName: '标准件',
|
||||
disabledbutton: false,
|
||||
total22: 0,
|
||||
pageCurrent22: 1,
|
||||
pageSize22: 20
|
||||
@@ -1048,6 +1047,7 @@ export default {
|
||||
})
|
||||
},
|
||||
tabClick(tab) {
|
||||
console.log(tab.name, 1111)
|
||||
if (tab.name === '外购件') {
|
||||
this.tabName = '外购件'
|
||||
this.searchTable11()
|
||||
@@ -1285,11 +1285,6 @@ export default {
|
||||
})
|
||||
this.loading4 = false
|
||||
console.log(response.data.length, 1231231233)
|
||||
if (response.data.length === 0) {
|
||||
this.disabledbutton = true
|
||||
} else {
|
||||
this.disabledbutton = false
|
||||
}
|
||||
})
|
||||
this.arrival(row) || this.purchasing(row) ? this.disable = true : this.disable = false // 是否为编辑模式
|
||||
},
|
||||
@@ -1370,6 +1365,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
console.log(row.离线合同明细流水号, 1111)
|
||||
deleteMateriel(row.离线合同明细流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('移除成功')
|
||||
@@ -1399,6 +1395,7 @@ export default {
|
||||
})
|
||||
},
|
||||
saveContract() {
|
||||
console.log(11111)
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
@@ -1442,55 +1439,59 @@ export default {
|
||||
// })
|
||||
},
|
||||
doneOfflineContact() { // 生成离线合同
|
||||
let judge = true
|
||||
this.tableData3.map(v => {
|
||||
judge = judge && v.数量
|
||||
})
|
||||
if (judge) {
|
||||
this.$confirm('确定生成合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
this.tableData3 = []
|
||||
// searchMateriel(this.offlineContractNum).then(response => {
|
||||
// this.tableData3 = response.data
|
||||
// this.tableData3.map(v => {
|
||||
// this.$set(v, '未税总额', 0)
|
||||
// this.$set(v, '含税总额', 0)
|
||||
// !v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||
// this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||
// })
|
||||
// this.disable = true // 是否为编辑模式
|
||||
// })
|
||||
} else { this.$message.error('离线合同生成失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
if (this.tableData3.length === 0) {
|
||||
this.$message.error('无法生成空合同,请先选入物料!')
|
||||
} else {
|
||||
this.$message.error('数量不正确')
|
||||
let judge = true
|
||||
this.tableData3.map(v => {
|
||||
judge = judge && v.数量
|
||||
})
|
||||
if (judge) {
|
||||
this.$confirm('确定生成合同?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.totalPrice = 0
|
||||
this.partGroup = []
|
||||
this.numGroup = []
|
||||
this.priceGroup = []
|
||||
const dateGroup = []
|
||||
const remarkGroup = []
|
||||
for (let i = 0; i < this.tableData3.length; i++) {
|
||||
this.totalPrice += this.tableData3[i].数量 * this.tableData3[i].单价
|
||||
this.partGroup.push(this.tableData3[i].离线合同明细流水号)
|
||||
this.numGroup.push(this.tableData3[i].数量)
|
||||
this.hasTax === '含税' ? this.priceGroup.push(this.tableData3[i].单价) : this.priceGroup.push(this.tableData3[i].未税单价 * (1 + this.taxRate))
|
||||
dateGroup.push(this.tableData3[i].交货期要求)
|
||||
remarkGroup.push(this.tableData3[i].备注)
|
||||
}
|
||||
doneOfflineContact(this.offlineContractNum, this.totalPrice, this.partGroup, this.numGroup, this.priceGroup, dateGroup, remarkGroup, this.taxRate * 100).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('离线合同生成成功')
|
||||
this.searchTable2()
|
||||
this.tableData3 = []
|
||||
// searchMateriel(this.offlineContractNum).then(response => {
|
||||
// this.tableData3 = response.data
|
||||
// this.tableData3.map(v => {
|
||||
// this.$set(v, '未税总额', 0)
|
||||
// this.$set(v, '含税总额', 0)
|
||||
// !v.单价 ? v.单价 = v.参考价格 : v.单价
|
||||
// this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
|
||||
// })
|
||||
// this.disable = true // 是否为编辑模式
|
||||
// })
|
||||
} else { this.$message.error('离线合同生成失败') }
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message.error('数量不正确')
|
||||
}
|
||||
}
|
||||
},
|
||||
exportExcel(row) {
|
||||
|
||||
Reference in New Issue
Block a user