This commit is contained in:
liushuai
2020-03-23 17:59:00 +08:00
parent cb61a19abe
commit 94e5561fdf
20 changed files with 942 additions and 527 deletions

View File

@@ -234,6 +234,7 @@ export default {
交货期组: [],
备注组: [],
companyAddress: '',
count: 0,
sendAddress: ''
}
},
@@ -738,6 +739,7 @@ export default {
`
},
async editContract() { // 选择一个询价单,整成合同明细
console.log(this.tableData1, 'tableData')
this.openDeal = false
const date = new Date()
this.year = date.getFullYear()
@@ -854,55 +856,65 @@ export default {
// this.content = `自定义`
// },
generateContract() { // 生成采购合同
this.content = this.contentNew.replace(/ /g, '')
this.content = this.content.replace(/\n/g, '')
this.content = this.content.replace(/==/g, '= =') // 更新tinymce中的东西到html中后续会用到
this.组件零件流水号组 = []
this.组件零件基本件流水号组 = []
this.数量组 = []
this.单价组 = []
this.交货期组 = []
this.hasTax === '含税' ? this.单价是否含税 = 1 : this.单价是否含税 = 0
const inquiryDetailNum_old = [] // 需要转移到新询价单的物料的询价单明细流水号
this.tableData1.map(v => {
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
this.组件零件流水号组.push(v.组件零件流水号)
this.组件零件基本件流水号组.push(v.组件零件基本件流水号)
this.数量组.push(v.数量)
this.hasTax === '含税' ? this.单价组.push(v.含税单价) : this.单价组.push(v.未税单价)
this.交货期组.push(v.交货期)
this.备注组.push(v.备注)
} else { // 获取未询到价格的物料的询价单明细流水号们
inquiryDetailNum_old.push(v.询价单明细流水号)
}
})
if (this.contractNumValue) {
if (this.demoRadio) {
this.$confirm('此采购合同将递交审核,递交后该合同不可删除,确认完成编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
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') {
this.$message.success('合同生成成功')
this.openDeal = true
this.reload()
} else {
this.$message.error('生成合同失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.$message.warning('请先选择模板进行预览')
for (let i = 0; i < this.tableData1.length; i++) {
if (this.tableData1[i].含税单价 === '') {
console.log(this.tableData1[i].含税单价, '含税单价')
this.count++
}
}
if (this.count === this.tableData1.length) {
this.$message.error('该合同未绑定物料信息')
} else {
this.$message.warning('请先选择合同进行编辑')
this.content = this.contentNew.replace(/&nbsp;/g, '')
this.content = this.content.replace(/\n/g, '')
this.content = this.content.replace(/==/g, '= =') // 更新tinymce中的东西到html中后续会用到
this.组件零件流水号组 = []
this.组件零件基本件流水号组 = []
this.数量组 = []
this.单价组 = []
this.交货期组 = []
this.hasTax === '含税' ? this.单价是否含税 = 1 : this.单价是否含税 = 0
const inquiryDetailNum_old = [] // 需要转移到新询价单的物料的询价单明细流水号
this.tableData1.map(v => {
if ((this.hasTax === '含税' && Number(v.含税单价)) || (this.hasTax === '未税' && Number(v.未税单价))) { // 筛掉未询到价格的物料
this.组件零件流水号组.push(v.组件零件流水号)
this.组件零件基本件流水号组.push(v.组件零件基本件流水号)
this.数量组.push(v.数量)
this.hasTax === '含税' ? this.单价组.push(v.含税单价) : this.单价组.push(v.未税单价)
this.交货期组.push(v.交货期)
this.备注组.push(v.备注)
} else { // 获取未询到价格的物料的询价单明细流水号们
inquiryDetailNum_old.push(v.询价单明细流水号)
}
})
if (this.contractNumValue) {
if (this.demoRadio) {
this.$confirm('此采购合同将递交审核,递交后该合同不可删除,确认完成编辑?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
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') {
this.$message.success('合同生成成功')
this.openDeal = true
this.reload()
} else {
this.$message.error('生成合同失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.$message.warning('请先选择模板进行预览')
}
} else {
this.$message.warning('请先选择合同进行编辑')
}
}
}
}

View File

@@ -2,46 +2,53 @@
<div class="app-container">
<el-card>
<div slot="header">
<el-select v-model="supplierValue" placeholder="选择供应商" filterable style="width: 220px;margin-left: 5px" size="small" clearable>
<el-option
v-for="item in supplierValues"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>申请时间:</span>
<el-date-picker v-model="date1" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择开始日期"/>&nbsp;~
<el-date-picker v-model="date2" size="small" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择结束日期"/>
<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=100000;searchTable1()">查询</el-button>
</div>
<h4 style="margin: 0">发票结算申请单</h4>
<!-- <h4 style="margin: 0">发票结算申请单</h4>-->
<el-table id="expandTable" :data="tableData1" border highlight-current-row height="330px" style="width: 100%;height: 330px;overflow:auto" size="mini" @row-click="searchTable2">
<el-table-column type="expand">
<template slot-scope="scope">
<el-form label-position="left" inline class="demo-table-expand">
<el-row>
<el-col :lg="10" :sm="12">
<viewer>
<img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">
</viewer>
</el-col>
<el-col :span="6">
<el-form-item label="已付款项">
<span>{{ scope.row.已付款项 }}</span>
</el-form-item><br>
<el-form-item label="尚欠金额">
<span>{{ scope.row.尚欠金额 }}</span>
</el-form-item><br>
<el-form-item label="备注">
<span>{{ scope.row.备注 }}</span>
</el-form-item><br>
</el-col>
<el-col :span="6">
<el-form-item label="是否费用类发票">
<span>{{ scope.row.是否费用类 }}</span>
</el-form-item><br>
<el-form-item label="税额">
<span>{{ scope.row.税额 }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</el-table-column>
<el-table-column label="供应商" align="center" min-width="200">
<!-- <el-table-column type="expand">-->
<!-- <template slot-scope="scope">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <el-row>-->
<!-- <el-col :lg="10" :sm="12">-->
<!-- <viewer>-->
<!-- <img :src="scope.row.scanSrc" alt="发票扫描件" height="120px">-->
<!-- </viewer>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="已付款项">-->
<!-- <span>{{ scope.row.已付款项 }}</span>-->
<!-- </el-form-item><br>-->
<!-- <el-form-item label="尚欠金额">-->
<!-- <span>{{ scope.row.尚欠金额 }}</span>-->
<!-- </el-form-item><br>-->
<!-- <el-form-item label="备注">-->
<!-- <span>{{ scope.row.备注 }}</span>-->
<!-- </el-form-item><br>-->
<!-- </el-col>-->
<!-- <el-col :span="6">-->
<!-- <el-form-item label="是否费用类发票">-->
<!-- <span>{{ scope.row.是否费用类 }}</span>-->
<!-- </el-form-item><br>-->
<!-- <el-form-item label="税额">-->
<!-- <span>{{ scope.row.税额 }}</span>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="供应商" align="center" min-width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -102,17 +109,17 @@
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
</div>
<!-- <div class="block" style="margin-top: 10px;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent1"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize1"-->
<!-- :total="total1"-->
<!-- style="display:inline-block;width:50%"-->
<!-- layout="total, sizes, prev, pager, next, jumper"-->
<!-- @size-change="handleSizeChange1"-->
<!-- @current-change="handleCurrentChange1"/>-->
<!-- </div>-->
</el-card>
<el-card>
<!--<h4 style="margin: 0px;display: inline-block;width: 150px;">发票结算申请单明细</h4>-->
@@ -160,7 +167,7 @@
</template>
<script>
import { searchTable1, searchTable2, excuteApprove } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { searchTable1, searchTable2, excuteApprove, searchSupplier } from '@/api/PurchasingCenter/InvoiceSettlementApprove'
import { mapGetters } from 'vuex'
import { readFile } from '@/utils/request'
import request from '@/utils/request'
@@ -176,7 +183,9 @@ export default {
pageSize1: 10,
invoiceNumber: '',
tableData2: [],
tableData3: []
tableData3: [],
supplierValues: [],
supplierValue: ''
}
},
computed: {
@@ -190,14 +199,44 @@ export default {
created() {
this.fetchData()
this.searchTable1()
this.searchSupplier()
},
methods: {
fetchData() {
// console.log(this.token)
},
searchSupplier() { // 查询创立日期和注册资本大于符合条件的数据
this.supplierName ? this.supplierCheck1 = 1 : (this.supplierCheck1 = 0, this.supplierName = '')
this.enterpriseNature ? this.supplierCheck2 = 1 : (this.supplierCheck2 = 0, this.enterpriseNature = '')
this.createDate ? this.supplierCheck3 = 1 : (this.supplierCheck3 = 0, this.createDate = '')
this.registeredCapital ? this.supplierCheck4 = 1 : (this.supplierCheck4 = 0, this.registeredCapital = '')
this.taxNum ? this.supplierCheck5 = 1 : (this.supplierCheck5 = 0, this.taxNum = '')
this.EMail ? this.supplierCheck6 = 1 : (this.supplierCheck6 = 0, this.EMail = '')
this.address ? this.supplierCheck7 = 1 : (this.supplierCheck7 = 0, this.address = '')
this.account ? this.supplierCheck8 = 1 : (this.supplierCheck8 = 0, this.account = '')
this.openingBank ? this.supplierCheck9 = 1 : (this.supplierCheck9 = 0, this.openingBank = '')
this.phone ? this.supplierCheck10 = 1 : (this.supplierCheck10 = 0, this.phone = '')
this.fax ? this.supplierCheck11 = 1 : (this.supplierCheck11 = 0, this.fax = '')
this.goodTime ? this.supplierCheck12 = 1 : (this.supplierCheck12 = 0, this.goodTime = '')
searchSupplier(this.supplierCheck1, this.supplierName, this.supplierCheck2, this.enterpriseNature, this.supplierCheck3, this.createDate, this.supplierCheck4, this.registeredCapital, this.supplierCheck5, this.taxNum, this.supplierCheck6, this.EMail, this.supplierCheck7, this.address, this.supplierCheck8, this.account, this.supplierCheck9, this.openingBank, this.supplierCheck10, this.phone, this.supplierCheck11, this.fax, this.supplierCheck12, this.goodTime).then(response => {
for (let i = 0; i < response.data.length; i++) {
if (response.data[i].创立日期 !== '' && response.data[i].创立日期 !== null) {
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].供应商流水号
})
}
})
},
searchTable1() {
let check
this.date1 && this.date2 ? this.check1 = 1 : (this.check1 = 0, this.date1 = '', this.date2 = '')
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1, this.token).then(response => {
this.supplierValue ? check = 1 : check = 0
searchTable1(this.check1, this.date1, this.date2, this.pageCurrent1, this.pageSize1, this.token, check, this.supplierValue).then(response => {
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'scanSrc', '')

View File

@@ -1,385 +1,391 @@
<template>
<div class="app-container">
<el-row id="PurchasingCenter/OfflineContract">
<el-col :span="24">
<el-tabs v-model="tabName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="三表" name="标准件">
<el-row>
<el-input v-model="materialName" style="width: 150px;margin-left: 5px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()"/>
<el-select v-model="machineValue" style="width:150px;margin-left: 5px" placeholder="机床图号" size="small" clearable filterable @change="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 5px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 5px" @click="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">查询</el-button>
<el-button type="primary" size="small" plain style="float: right;margin-right: 20px" @click="tiaozheng1">调整采购任务</el-button>
<el-select v-model="PersonValue" style="width:100px; float: right" placeholder="人员" size="small" filterable clearable>
<el-option
v-for="item in Person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<!--:row-class-name="tableRowClassName"-->
<el-table
v-loading="loading1"
:data="tableData00"
border
style="width: 100%;max-height: 500px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange1"
@select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="型号" prop="物料型号" align="center" width="100" 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="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料类别" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column label="物料品种" prop="物料品种" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</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 label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" width="110" prop="使用库存数">
<template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1 || (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) === 0">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1 && (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) !== 0" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="待采数量" align="center" width="80" prop="待采购数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" width="110" prop="使用滞货数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? Number(scope.row.使用滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用滞货" align="center" width="80">
<template slot-scope="scope">
<template v-if="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0">
<el-card>
<el-row id="PurchasingCenter/OfflineContract">
<el-col :span="24">
<el-tabs v-model="tabName" type="border-card" @tab-click="tabClick">
<el-tab-pane label="三表" name="标准件">
<el-row>
<el-input v-model="materialName" style="width: 150px;margin-left: 5px" placeholder="名称规格型号" size="small" clearable @keyup.enter.native="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()"/>
<el-select v-model="machineValue" style="width:150px;margin-left: 5px" placeholder="机床图号" size="small" clearable filterable @change="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">
<el-option
v-for="item in machine"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-date-picker
v-model="startTime"
size="small"
type="daterange"
align="center"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
style="width:250px;margin-left: 5px"
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 5px" @click="pageCurrent11=1;pageSize11=20;total11=0;searchTable11()">查询</el-button>
<el-button type="primary" size="small" plain style="float: right;margin-right: 20px" @click="tiaozheng1">调整采购任务</el-button>
<el-select v-model="PersonValue" style="width:100px; float: right" placeholder="人员" size="small" filterable clearable>
<el-option
v-for="item in Person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-row>
<!--:row-class-name="tableRowClassName"-->
<el-table
v-loading="loading1"
:data="tableData00"
border
style="width: 100%;max-height: 500px;"
height="300px"
size="mini"
@selection-change="handleSelectionChange1"
@select="handleSelection">
<el-table-column :selectable="selectable" align="center" width="43" type="selection"/>
<el-table-column label="名称" align="center" prop="物料名称" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
<el-button v-else :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="可用滞货数量" align="center" width="110">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 2 ? Number(scope.row.滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注筛选" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" width="70px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
<el-table-column label="分配时间" prop="任务分配时间" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? (scope.row.任务分配时间.split(' ')[0] === '1900/1/4' ? '-' : scope.row.任务分配时间.split(' ')[0]) : '-' }}
</template>
</el-table-column>
</el-table>
<el-tooltip :open-delay="100" effect="dark" content="将勾选的物料库中物料选入到选中的离线合同" placement="top">
<el-button type="warning" size="small" plain style="margin: 0px 40px 0px 20px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<div class="block" style="margin: 10px 0 0 0;display: inline-block">
<el-pagination
:current-page="pageCurrent11"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize11"
:total="total11"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange11"
@current-change="handleCurrentChange11"/>
</div>
<!--:row-class-name="tableRowClassName2"-->
</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-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable22()">查询</el-button>
</el-row>
<el-table
v-loading="loading2"
:data="tableData22"
border
stripe
style="width: 594px;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>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="物料型号" align="center" width="128" 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>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="132">
<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" plain style="margin: 0px 40px 0px 20px; display: inline-block" @click="addMateriel">选入物料</el-button>
</el-tooltip>
<div class="block" style="display: inline-block">
<el-pagination
:current-page="pageCurrent22"
:page-sizes="[20, 50, 100, 150]"
:page-size="pageSize22"
:total="total22"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange22"
@current-change="handleCurrentChange22"/>
</div>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-table-column>
<el-table-column label="规格" align="center" prop="物料规格" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="型号" prop="物料型号" align="center" width="100" 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="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供货商 === '0' ? '-' : scope.row.供货商 }}
</template>
</el-table-column>
<el-table-column label="机床图号" prop="机床图号" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" prop="组号" align="center" width="50">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="物料类别" align="center" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料类别 }}
</template>
</el-table-column>
<el-table-column label="物料品种" prop="物料品种" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料品种 }}
</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 label="库存(BZ)" align="center" width="80" prop="库存">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.库存 = Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用库存数量" align="center" width="110" prop="使用库存数">
<template slot-scope="scope">
<span v-if="Number(scope.row.零件类型) !== 1 || (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) === 0">-</span>
<el-input-number v-if="Number(scope.row.零件类型) === 1 && (Number(scope.row.货位存量 ? scope.row.货位存量 : 0) - Number(scope.row.占用数量)) !== 0" v-model="scope.row.使用库存数" :min="0" :max="Number(scope.row.零件数量) > (Number(scope.row.货位存量) - Number(scope.row.占用数量)) ? (Number(scope.row.货位存量) - Number(scope.row.占用数量) + Number(scope.row.使用库存数)) : Number(scope.row.零件数量)" :disabled="(Number(scope.row.货位存量) - Number(scope.row.占用数量)) === 0 || parseInt(scope.row.采购状态编号)===3" size="mini" style="width: 90px" @change="changeNumber(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="待采数量" align="center" width="80" prop="待采购数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用库存数) : scope.row.待采购数量 = Number(scope.row.零件数量) - Number(scope.row.使用滞货数量) }}
</template>
</el-table-column>
<el-table-column label="使用滞货数量" align="center" width="110" prop="使用滞货数量">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? Number(scope.row.使用滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column label="使用滞货" align="center" width="80">
<template slot-scope="scope">
<template v-if="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0">
</template>
<el-button v-else :disabled="parseInt(scope.row.询价状态编号)!==1||parseInt(scope.row.是否确认)!==1||Number(scope.row.滞货数量)===0" icon="el-icon-goods" plain type="primary" size="mini" @click="useInventory(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="可用滞货数量" align="center" width="110">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 2 ? Number(scope.row.滞货数量) : '-' }}
</template>
</el-table-column>
<el-table-column :filters="remarkFilters" :filter-method="filterHandler0" label="备注" align="center" min-width="100" prop="备注筛选" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column :filters="source" :filter-method="filterSource" align="center" label="来源" width="70px" prop="零件类型筛选">
<template slot-scope="scope">
{{ Number(scope.row.零件类型) === 1 ? 'BZ' : 'WG' }}
</template>
</el-table-column>
<el-table-column label="分配时间" prop="任务分配时间" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.任务分配时间 ? (scope.row.任务分配时间.split(' ')[0] === '1900/1/4' ? '-' : scope.row.任务分配时间.split(' ')[0]) : '-' }}
</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-tooltip>
<div class="block" style="margin: 10px 0 0 0;display: inline-block">
<el-pagination
:current-page="pageCurrent11"
:page-sizes="[10, 20, 30, 40, 100]"
:page-size="pageSize11"
:total="total11"
style="display:inline-block;width:800px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange11"
@current-change="handleCurrentChange11"/>
</div>
<!--:row-class-name="tableRowClassName2"-->
</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-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="searchTable22()">查询</el-button>
</el-row>
<el-table
v-loading="loading2"
:data="tableData22"
border
stripe
style="width: 594px;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>
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" prop="物料型号" align="center" width="128" 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>
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column :filters="supplierFilters" :filter-method="filterHandler" prop="供货商" label="供货商" align="center" width="132">
<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-tooltip>
<div class="block" style="display: inline-block">
<el-pagination
:current-page="pageCurrent22"
:page-sizes="[20, 50, 100, 150]"
:page-size="pageSize22"
:total="total22"
style="display:inline-block;width:50%"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange22"
@current-change="handleCurrentChange22"/>
</div>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</el-card>
<el-card>
<div slot="header">
<el-input v-model="offlineContract" placeholder="离线合同号/供应商" size="small" style="width: 170px" clearable/>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>-->
<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" plain style="margin-right:10px;margin-left:100px;" @click="addOfflineContract">创建离线合同</el-button>
<el-tooltip :open-delay="1000" effect="dark" content="生成合同" placement="top">
<el-button :disabled="disable" type="success" size="small" plain style="margin-left:10px;margin-right: 10px" @click="doneOfflineContact">生成离线合同</el-button>
</el-tooltip>
<el-card>
<div slot="header">
<el-input v-model="offlineContract" placeholder="离线合同号/供应商" size="small" style="width: 170px;margin-left: 5px" clearable/>
<!--<el-input v-model="supplierName0" placeholder="供应商" size="small" style="width: 140px" clearable/>-->
<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-tooltip>
<!--<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>-->
<el-tooltip :content="hasTax" placement="top" style="margin-right: 370px">
<el-switch v-model="hasTax" active-color="#13ce66" inactive-color="#ff4949" active-value="含税" inactive-value="未税" style="margin: 3px;float:right"/>
</el-tooltip>
<el-input v-model="taxRate" style="float:right;width:60px;" placeholder="税率" size="mini"/>
<h4 style="float:right;width: 40px;margin: 5px">税率:</h4>
<!--<el-button :disabled="disable" type="info" size="mini" style="float:right" @click="saveContract">保存</el-button>-->
<el-tooltip :content="hasTax" placement="top" style="margin-right: 370px">
<el-switch v-model="hasTax" active-color="#13ce66" inactive-color="#ff4949" active-value="含税" inactive-value="未税" style="margin: 3px;float:right"/>
</el-tooltip>
<el-input v-model="taxRate" style="float:right;width:60px;" placeholder="税率" size="mini"/>
<h4 style="float:right;width: 40px;margin: 5px">税率:</h4>
<!--<el-button v-if="quickChangePrice" size="mini" style="float:right; width: 100px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>-->
<!--<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>-->
</div>
<el-table v-loading="loading3" :data="tableData2" border style="max-height: 460px;" size="mini" highlight-current-row @row-click="searchTable3">
<!-- <el-table-column label="详情" type="expand" fixed="left" width="50px">-->
<!-- <template slot-scope="scope">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <el-form-item label="离线合同备注">-->
<!-- {{ scope.row.离线合同备注 }}-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="合同状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<span v-if="editing(scope.row)" style="color: #E6A23C" size="small">编辑中</span>
<span v-if="purchasing(scope.row)" style="color: #409eff" size="small">已采购</span>
<span v-if="arrival(scope.row)" style="color: #67c23a" size="small">全部到货</span>
</template>
</el-table-column>
<el-table-column label="离线合同编号" prop="离线合同编号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="离线合同名称" align="center" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" prop="供应商名称" align="center" width="320" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" prop="采购员" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</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="120">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-edit" plain size="mini" @click="editOfflineContract(scope.row)"/>
<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-delete" plain size="mini" @click="deleteOfflineContract(scope.row)"/>
<el-tooltip :open-delay="1000" effect="dark" content="打印合同" placement="top">
<el-button type="text" size="mini" icon="el-icon-printer" plain @click="exportExcel(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<!-- <div class="block" style="margin: 10px 0;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent2"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize2"-->
<!-- :total="total2"-->
<!-- style="display:inline-block;width:50%"-->
<!-- layout="total"-->
<!-- @size-change="handleSizeChange2"-->
<!-- @current-change="handleCurrentChange2"/>-->
<!-- </div>-->
<!--<h3>合同详细信息</h3>-->
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border stripe style="max-height: 500px;" height="450px" size="mini" show-summary>
<el-table-column label="物料名称" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数" align="center" width="100">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:60px" @change="saveContract()"/>
<b v-else>{{ scope.row.数量 }}</b>
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="参考价格" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="单价(未税)元" align="center" width="110" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px" @change="saveContract()"/>
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="单价(含税)元" align="center" width="120" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:80px" @change="saveContract()"/>
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="总额(未税)元" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="总额(含税)元" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="120" prop="备注">
<template slot-scope="scope">
<el-input v-direction="{x: 3, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:100px" @change="saveContract()"/>
<b v-else>{{ scope.row.备注 || '' }}</b>
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="130" prop="交货期要求">
<template slot-scope="scope">
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
<b v-else>{{ scope.row.交货期要求 || '' }}</b>
</template>
</el-table-column>
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="50">
<template slot-scope="scope">
<!--<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-delete" plain size="mini" @click="deleteOfflineContract(scope.row)"/>-->
<el-button v-if="quickChangePrice" :disabled="disable" type="text" plain size="mini" icon="el-icon-right" @click="deleteMateriel(scope.row)"/>
<b v-else>移除</b>
</template>
</el-table-column>
</el-table>
<!--<el-button v-if="quickChangePrice" size="mini" style="float:right; width: 100px" @click="quickChangePrice=!quickChangePrice">快速修改价格</el-button>-->
<!--<el-button v-else size="mini" style="float:right;" @click="quickChangePrice=!quickChangePrice">还原</el-button>-->
</div>
<el-table v-loading="loading3" :data="tableData2" border style="max-height: 460px;" size="mini" highlight-current-row @row-click="searchTable3">
<!-- <el-table-column label="详情" type="expand" fixed="left" width="50px">-->
<!-- <template slot-scope="scope">-->
<!-- <el-form label-position="left" inline class="demo-table-expand">-->
<!-- <el-form-item label="离线合同备注">-->
<!-- {{ scope.row.离线合同备注 }}-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="合同状态" align="center" width="80" fixed="left">
<template slot-scope="scope">
<span v-if="editing(scope.row)" style="color: #E6A23C" size="small">编辑中</span>
<span v-if="purchasing(scope.row)" style="color: #409eff" size="small">已采购</span>
<span v-if="arrival(scope.row)" style="color: #67c23a" size="small">全部到货</span>
</template>
</el-table-column>
<el-table-column label="离线合同编号" prop="离线合同编号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="离线合同名称" align="center" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.离线合同名称 }}
</template>
</el-table-column>
<el-table-column label="供应商" prop="供应商名称" align="center" width="320" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="采购员" prop="采购员" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.采购员 }}
</template>
</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="120">
<template slot-scope="scope">
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="scope">
<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-edit" plain size="mini" @click="editOfflineContract(scope.row)"/>
<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-delete" plain size="mini" @click="deleteOfflineContract(scope.row)"/>
<el-tooltip :open-delay="1000" effect="dark" content="打印合同" placement="top">
<el-button type="text" size="mini" icon="el-icon-printer" plain @click="exportExcel(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<!-- <div class="block" style="margin: 10px 0;">-->
<!-- <el-pagination-->
<!-- :current-page="pageCurrent2"-->
<!-- :page-sizes="[10, 20, 30, 40]"-->
<!-- :page-size="pageSize2"-->
<!-- :total="total2"-->
<!-- style="display:inline-block;width:50%"-->
<!-- layout="total"-->
<!-- @size-change="handleSizeChange2"-->
<!-- @current-change="handleCurrentChange2"/>-->
<!-- </div>-->
</el-card>
<el-card>
<!--<h3>合同详细信息</h3>-->
<el-table v-loading="" :data="tableData3" :summary-method="getSummaries" border stripe style="max-height: 500px;" height="450px" size="mini" show-summary>
<el-table-column label="物料名称" align="center" width="120" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="规格" align="center" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="图号或型号" align="center" width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="采购数" align="center" width="100">
<template slot-scope="scope">
<el-input v-direction="{x: 0, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.数量" :disabled="disable" size="mini" style="width:60px" @change="saveContract()"/>
<b v-else>{{ scope.row.数量 }}</b>
</template>
</el-table-column>
<el-table-column label="单位" align="center" min-width="50">
<template slot-scope="scope">
{{ scope.row.计量单位 }}
</template>
</el-table-column>
<el-table-column label="参考价格" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.参考价格 }}
</template>
</el-table-column>
<el-table-column label="单价(未税)元" align="center" width="110" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='未税'" v-model="scope.row.未税单价" :disabled="disable" size="mini" style="width:70px" @change="saveContract()"/>
<b v-show="hasTax!=='未税'">{{ (scope.row.单价 / (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="单价(含税)元" align="center" width="120" prop="单价">
<template slot-scope="scope">
<el-input v-direction="{x: 1, y: scope.$index}" v-if="hasTax==='含税'" v-model="scope.row.单价" :disabled="disable" size="mini" style="width:80px" @change="saveContract()"/>
<b v-show="hasTax!=='含税'">{{ (scope.row.未税单价 * (1 + taxRate)).toFixed(2) }}</b>
</template>
</el-table-column>
<el-table-column label="总额(未税)元" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='未税' ? scope.row.未税总额 = (Number(scope.row.数量) * Number(scope.row.未税单价)).toFixed(2) : scope.row.未税总额 = (scope.row.含税总额 / (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="总额(含税)元" align="center" width="110" prop="合计">
<template slot-scope="scope">
{{ hasTax==='含税' ? scope.row.含税总额 = (Number(scope.row.数量) * Number(scope.row.单价)).toFixed(2) : scope.row.含税总额 = (scope.row.未税总额 * (1+taxRate)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="120" prop="备注">
<template slot-scope="scope">
<el-input v-direction="{x: 3, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.备注" :disabled="disable" size="mini" style="width:100px" @change="saveContract()"/>
<b v-else>{{ scope.row.备注 || '' }}</b>
</template>
</el-table-column>
<el-table-column label="交货要求" align="center" min-width="130" prop="交货期要求">
<template slot-scope="scope">
<el-input v-direction="{x: 2, y: scope.$index}" v-if="quickChangePrice" v-model="scope.row.交货要求" :disabled="disable" size="mini" style="width:90px" @change="saveContract()"/>
<b v-else>{{ scope.row.交货期要求 || '' }}</b>
</template>
</el-table-column>
<el-table-column v-if="disable" label="到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="50">
<template slot-scope="scope">
<!--<el-button :disabled="arrival(scope.row)" type="text" icon="el-icon-delete" plain size="mini" @click="deleteOfflineContract(scope.row)"/>-->
<el-button v-if="quickChangePrice" :disabled="disable" type="text" plain size="mini" icon="el-icon-right" @click="deleteMateriel(scope.row)"/>
<b v-else>移除</b>
</template>
</el-table-column>
</el-table>
</el-card>
</el-card>
<div id="offlineContract" style="width: 800px;margin: 0 auto;display: none">
<table class="offlineContract" cellspacing="0px" align="center" border="1 solid black" width="100%">
@@ -812,6 +818,7 @@ export default {
paramRow: '', // 参数row
disable: true, // 其他的禁用
tabName: '标准件',
disabledbutton: false,
total22: 0,
pageCurrent22: 1,
pageSize22: 20
@@ -1060,6 +1067,7 @@ export default {
this.offlineContract ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.loading3 = true
this.tableData3 = []
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0).then(response => {
console.log(response.data.rows, 99)
this.tableData2 = response.data.rows
@@ -1277,6 +1285,12 @@ export default {
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
})
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 // 是否为编辑模式
},

View File

@@ -90,11 +90,16 @@
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="总金额(元)" align="center" min-width="60">
<el-table-column label="总金额(元)" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.合同总额 }}
</template>
</el-table-column>
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.操作时间 ? scope.row.操作时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>

View File

@@ -90,7 +90,7 @@
size="mini"
border
stripe
style="width: 1232px"
style="width: 1330px"
height="300px"
highlight-current-row
@row-click="searchTable2">
@@ -190,6 +190,11 @@
{{ scope.row.欠款金额 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" width="110" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间.split(' ')[0] : '-' }}
</template>
</el-table-column>
<!-- <el-table-column label="审核时间" align="center" width="80">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.审核时间 ? scope.row.审核时间.substr(0,9) : '—' }}-->
@@ -355,7 +360,7 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
// this.searchTable1()
},
methods: {
// 处理完成
@@ -527,7 +532,8 @@ export default {
合同金额: response.data.rows[i].合同金额,
欠款金额: response.data.rows[i].欠款金额,
采购员流水号: response.data.rows[i].采购员流水号,
采购合同流水号: response.data.rows[i].采购合同流水号
采购合同流水号: response.data.rows[i].采购合同流水号,
审批时间: response.data.rows[i].审批时间
})
}
}

View File

@@ -417,7 +417,6 @@ export default {
},
created() {
this.fetchData()
this.searchTable()
},
methods: {
// open2: function (mess) {