This commit is contained in:
zhangdingyu
2018-11-19 16:31:00 +08:00
31 changed files with 1048 additions and 460 deletions

View File

@@ -14,6 +14,9 @@
</el-select>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<span>提前</span>
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
<span>天预警</span>
<el-button
type="success"
size="small"
@@ -70,7 +73,7 @@
<el-progress
:text-inside="true"
:stroke-width="18"
:percentage="100*(parseInt(scope.row.合同物料到货总数)/parseInt(scope.row.合同物料采购总数)).toFixed(4)"
:percentage="parseFloat((100*scope.row.合同物料到货总数/scope.row.合同物料采购总数).toFixed(2))"
status="success"/>
</template>
</el-table-column>
@@ -114,7 +117,7 @@
</el-table-column>
<el-table-column label="已到货数量" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.总到货数量 }}
{{ scope.row.总到货数量 ? scope.row.总到货数量 : 0 }}
</template>
</el-table-column>
</el-table>
@@ -130,6 +133,7 @@ export default {
name: '', // 项目总价查询
data() {
return {
warningValue: 3,
check1: 0,
check2: 0,
contractNumValue: '',
@@ -169,6 +173,7 @@ export default {
})
},
searchTable1() {
this.warningValue ? this.warningValue : this.warningValue = 1
this.arrival = [] // 规定到货时间数组
this.now = new Date()
this.contractNumValue ? this.check1 = 1 : this.check1 = 0
@@ -177,13 +182,13 @@ export default {
for (let i = 0; i < response.data.rows.length; i++) {
this.arrival.push(new Date(response.data.rows[i].规定到货时间))
if (parseInt(response.data.rows[i].合同物料到货总数) === parseInt(response.data.rows[i].合同物料采购总数)) {
this.judge[i] = 1
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 0 && (this.now - this.arrival[i]) < 86400000) {
this.judge[i] = 2
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) > 86400000) {
this.judge[i] = 3
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.now - this.arrival[i]) < 0) {
this.judge[i] = 4
this.judge[i] = 1 // 全部到货
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
this.judge[i] = 2 // 即将拖期
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) < 0) {
this.judge[i] = 3 // 已拖期
} else if (parseInt(response.data.rows[i].合同物料到货总数) !== parseInt(response.data.rows[i].合同物料采购总数) && (this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
this.judge[i] = 4 // 进度正常
}
}
this.tableData1 = response.data.rows

View File

@@ -20,24 +20,20 @@
<span>合同号:</span>
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
<span>采购员:</span>
<el-input
v-model="buyerName"
placeholder="采购员"
size="small"
readonly
clearable
style="width:100px"
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px" clearable>
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span>供应商:</span>
<el-input
v-model="supplierName"
placeholder="供应商"
size="small"
readonly
clearable
style="width:180px"
@dblclick.native="dialogVisible1=true;submitDisable=true"
@clear="emptySupplierDetail"/>
style="width:180px"/>
<el-button
type="success"
size="small"
@@ -48,19 +44,19 @@
<el-card>
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;">
<el-table-column label="采购合同编号" min-width="150" align="center">
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同编号 }}
</template>
</el-table-column>
<el-table-column label="采购合同名称" min-width="150" align="center">
<el-table-column label="采购合同名称" min-width="100" align="center">
<template slot-scope="scope">
{{ scope.row.采购合同名称 }}
</template>
</el-table-column>
<el-table-column label="规定到货时间" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="200" align="center">
@@ -78,7 +74,7 @@
{{ scope.row.付款方式内容 }}
</template>
</el-table-column>
<el-table-column label="欠款金额" min-width="100" align="center">
<el-table-column label="欠款金额" min-width="90" align="center">
<template slot-scope="scope">
{{ scope.row.欠款金额 }}
</template>
@@ -93,7 +89,7 @@
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
</template>
</el-table-column>
<el-table-column label="请款付款情况" width="810" align="center">
<el-table-column label="请款付款情况" width="900" align="center">
<template slot-scope="scope">
<el-table v-show="tableData11[scope.$index].length!==0" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<el-table-column label="次数" min-width="60" align="center" type="index"/>
@@ -104,25 +100,25 @@
</el-table-column>
<el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
{{ scope.row.请款时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="审核情况内容" width="80" align="center">
<el-table-column label="审核情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.审核情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审核原因" width="80" align="center">
<el-table-column label="未通过审核原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审核原因 }}
</template>
</el-table-column>
<el-table-column label="审批情况内容" width="80" align="center">
<el-table-column label="审批情况" width="80" align="center">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
</template>
</el-table-column>
<el-table-column label="未通过审批原因" width="80" align="center">
<el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未通过审批原因 }}
</template>
@@ -132,7 +128,7 @@
{{ scope.row.付款情况内容 }}
</template>
</el-table-column>
<el-table-column label="未付款原因" width="80" align="center">
<el-table-column label="未付款原因" width="110" align="center">
<template slot-scope="scope">
{{ scope.row.未付款原因 }}
</template>
@@ -142,7 +138,6 @@
<el-button
type="danger"
size="mini"
icon=""
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
@@ -217,15 +212,10 @@
</el-table-column>
<el-table-column label="规定到货时间" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.规定到货时间 }}
{{ scope.row.规定到货时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="实际到货时间" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.实际到货时间 }}
</template>
</el-table-column>
<el-table-column label="供应商" min-width="150" align="center">
<el-table-column label="供应商" min-width="250" align="center">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
@@ -257,170 +247,23 @@
</el-table-column>
<el-table-column label="请款时间" width="100" align="center">
<template slot-scope="scope">
{{ scope.row.请款时间 }}
{{ scope.row.请款时间.split(' ')[0] }}
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
<el-form ref="form1" :model="form1" label-position="left" label-width="90px" class="searchForm">
<el-row>
<el-col :span="12">
<el-form-item label="供应商名称">
<el-input v-model="supplierName" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="企业性质">
<el-input v-model="enterpriseNature" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="货期">
<el-input v-model="goodTime" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="注册资本">
<el-input v-model="registeredCapital" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="税号">
<el-input v-model="taxNum" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子邮箱">
<el-input v-model="EMail" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址">
<el-input v-model="address" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="账号">
<el-input v-model="account" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开户行">
<el-input v-model="openingBank" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电话号码">
<el-input v-model="phone" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="传真">
<el-input v-model="fax" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-button
type="success"
size="small"
icon="el-icon-search"
@click="searchSupplier">查询</el-button>
<el-button
:disabled="submitDisable"
type="primary"
size="small"
icon="el-icon-check"
@click="submitSelectSupplier">确定</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-delete"
@click="emptySupplierDetail">清空</el-button>
</el-col>
</el-row>
<el-table :data="tableData01" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="200px" border @row-click="showSupplierDetail">
<el-table-column align="center" label="供应商名称" width="200">
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="企业性质">
<template slot-scope="scope">
{{ scope.row.企业性质 }}
</template>
</el-table-column>
<el-table-column align="center" label="创立日期">
<template slot-scope="scope">
{{ scope.row.创立日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="注册资本">
<template slot-scope="scope">
{{ scope.row.注册资本 }}
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
<el-dialog :visible.sync="dialogVisible2" title="采购员选择" center style="min-height: 300px;" width="40%">
<el-table
:data="tableData02"
size="small"
border
style="width: 100%;min-height:300px"
height="300px"
highlight-current-row
@row-click="clickBuyer">
<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.姓名 }}
</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">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button :disabled="submitDisable" type="primary" size="small" icon="el-icon-check" @click="submitSelectBuyer">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchSupplier, searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
import { searchTable1, requestFund, searchCondition, cancelRequestFund, searchRequestTable, initBuyer } from '@/api/PurchasingCenter/BuyerRequestFund'
import { mapGetters } from 'vuex'
export default {
data() {
return {
tableData02: [],
dialogVisible2: false,
personValue: '',
person: [],
loading2: false,
tableData2: [],
tableData11: [],
@@ -430,35 +273,9 @@ export default {
startDate: '',
endDate: '',
contractNum: '',
buyerName: '',
dialogVisible1: false,
submitDisable: true,
form1: {},
supplierValue: '',
supplierName: '',
enterpriseNature: '',
createDate: '',
registeredCapital: '',
taxNum: '',
EMail: '',
address: '',
account: '',
openingBank: '',
phone: '',
fax: '',
goodTime: '',
supplierCheck1: 0,
supplierCheck2: 0,
supplierCheck3: 0,
supplierCheck4: 0,
supplierCheck5: 0,
supplierCheck6: 0,
supplierCheck7: 0,
supplierCheck8: 0,
supplierCheck9: 0,
supplierCheck10: 0,
supplierCheck11: 0,
supplierCheck12: 0,
tableData01: [],
loading1: false,
tableData1: [],
@@ -479,98 +296,39 @@ export default {
'id'
])
},
created() {
this.initBuyer()
},
methods: {
submitSelectBuyer() { // 确定
this.dialogVisible2 = false
},
clickBuyer(row) { // 点击采购员表某一行
this.submitDisable = false
this.buyerName = row.姓名
},
initBuyer() { // 初始化采购人员
initBuyer().then(response => {
this.tableData02 = response.data
for (let i = 0; i < response.data.length; i++) {
this.person.push({
text: response.data[i].姓名,
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
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 => {
this.tableData01 = response.data
})
},
submitSelectSupplier() { // 确定选择供应商
this.dialogVisible1 = false
},
emptySupplierDetail() { // 清空
this.submitDisable = true
this.supplierValue = ''
this.supplierName = ''
this.enterpriseNature = ''
this.createDate = ''
this.registeredCapital = ''
this.taxNum = ''
this.EMail = ''
this.address = ''
this.account = ''
this.openingBank = ''
this.phone = ''
this.fax = ''
this.goodTime = ''
},
showSupplierDetail(row) { // 点击供应商表某一行
this.submitDisable = false
this.supplierValue = row.供应商流水号
this.supplierName = row.供应商名称
this.enterpriseNature = row.企业性质
this.createDate = row.创立日期
this.registeredCapital = row.注册资本
this.taxNum = row.税号
this.EMail = row.电子信箱
this.address = row.地址
this.account = row.帐号
this.openingBank = row.开户行
this.phone = row.电话号码
this.fax = row.传真
this.goodTime = row.货期
},
searchTable1() {
this.loading1 = true
this.tableData1 = []
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
this.contractNum ? this.check2 = 1 : this.check2 = 0
this.buyerName ? this.check3 = 1 : this.check3 = 0
this.personValue ? this.check3 = 1 : this.check3 = 0
this.supplierName ? this.check4 = 1 : this.check4 = 0
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.buyerName, this.check4, this.supplierName).then(response => {
searchTable1(this.pageCurrent1, this.pageSize1, this.check1, this.startDate, this.endDate, this.check2, this.contractNum, this.check3, this.personValue, this.check4, this.supplierName).then(response => {
for (let j = 0; j < response.data.rows.length; j++) {
if (response.data.rows[j].规定到货时间 !== null) {
response.data.rows[j].规定到货时间 = response.data.rows[j].规定到货时间.substring(0, response.data.rows[j].规定到货时间.indexOf(' '))
}
if (response.data.rows[j].实际到货时间 !== null) {
response.data.rows[j].实际到货时间 = response.data.rows[j].实际到货时间.substring(0, response.data.rows[j].实际到货时间.indexOf(' '))
}
this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
for (let i = 0; i < response0.data.length; i++) {
if (response0.data[i].请款时间 !== null) {
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' '))
}
this.tableData11[j].push(response0.data[i])
}
})
}
this.tableData1 = response.data.rows
this.total1 = response.data.total
}).then(() => {
this.loading1 = false
})
@@ -630,12 +388,6 @@ export default {
} else { this.checkRequest = 1 }
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
for (let j = 0; j < response.data.length; j++) {
if (response.data[j].规定到货时间 !== null) {
response.data[j].规定到货时间 = response.data[j].规定到货时间.substring(0, response.data[j].规定到货时间.indexOf(' '))
}
if (response.data[j].实际到货时间 !== null) {
response.data[j].实际到货时间 = response.data[j].实际到货时间.substring(0, response.data[j].实际到货时间.indexOf(' '))
}
if (response.data[j].请款时间 !== null) {
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
}

View File

@@ -26,7 +26,7 @@
</el-option>
</el-select>
<span>采购员:</span>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-select v-model="personValue" placeholder="采购员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
@@ -186,7 +186,7 @@
</el-option>
</el-select>
<span>采购员:</span>
<el-select v-model="personValue3" placeholder="采购员" size="small" style="width: 100px">
<el-select v-model="personValue3" placeholder="采购员" size="small" clearable style="width: 100px">
<el-option
v-for="item in person"
:key="item.value"
@@ -494,16 +494,27 @@ export default {
},
contractChange() {
if (this.contractValue) {
contractChange(this.contractValue, this.changeReason).then(response => {
this.contractValue = ''
this.changeReason = ''
if (response.data[0].result === '1') {
this.$message.success('变更成功')
this.searchTable1()
this.contractNumValue = ''
this.contractNumValue3 = ''
this.fetchData()
} else { this.$message.error('变更失败') }
this.$confirm('确定更改该合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
contractChange(this.contractValue, this.changeReason).then(response => {
this.contractValue = ''
this.changeReason = ''
if (response.data[0].result === '1') {
this.$message.success('变更成功')
this.searchTable1()
this.contractNumValue = ''
this.contractNumValue3 = ''
this.fetchData()
} else { this.$message.error('变更失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
} else {
this.$message.error('请先选择合同')

View File

@@ -186,7 +186,7 @@
style="margin-top:10px"
@click="calculateContractSum">计算合同总额</el-button>
<span>合同总额:</span>
<el-input v-model="contractSum" size="small"/>
<el-input v-model="contractSum" size="small" readonly/>
</el-card>
<el-card>
@@ -237,10 +237,10 @@ export default {
searchView: '',
fileList: [],
minDate: null,
endDateOpt: { // 为了让规定到货时间早于物料计划到货时间
endDateOpt: { // 禁用大于规定到货日期和小于当前日期
disabledDate: (time) => {
if (this.minDate) {
return time.getTime() > this.minDate
return time.getTime() > this.minDate || time.getTime() < new Date()
}
}
},
@@ -262,8 +262,8 @@ export default {
payTime5Value: '', // 付款时间
payTime6Value: '', // 付款时间
freight: '', // 运费
taxRate: '', // 税率
currencyValue: '', // 币种
taxRate: '0.17', // 税率
currencyValue: 1, // 币种
currency: [
{
label: '人民币',

View File

@@ -318,23 +318,20 @@
<el-input v-model="form2.inquirySheetNum" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierName">
<el-input v-model="form2.supplierName" size="small" readonly>
<el-button slot="append" icon="el-icon-search" @click="dialogVisible1=true"/>
</el-input>
<el-input v-model="form2.supplierName" size="small" readonly @focus="dialogVisible1=true"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible2=false">取消</el-button>
<el-button
v-show="title2==='创建询价单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitCreateInquirySheet">确定</el-button>
<el-button
v-show="title2==='编辑询价单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditInquirySheet">确定</el-button>
</div>
</el-dialog>
@@ -342,7 +339,7 @@
<el-dialog :visible.sync="dialogVisible3" title="物料变更选择" center style="min-height: 300px;" width="780px">
<span>物料名称:</span>
<el-input v-model="materialName0" placeholder="物料名称" size="small" clearable/>
<el-button type="success" size="small" icon="el-icon-search" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left:10px" @click="pageCurrent02=1;pageSize02=10;total02=0;searchMaterial()">查询</el-button>
<el-table :data="tableData02" size="mini" style="width: 97%;max-height: 300px;margin-top:15px" height="400px" border highlight-current-row @row-click="selectNewMaterial">
<el-table-column align="center" label="物料名称" min-width="150">
<template slot-scope="scope">
@@ -374,7 +371,8 @@
<span style="font-size: large;color: red">将原物料替换为: {{ materialNew }}</span>
<!--<el-input v-model="materialNew" size="small" readonly style="margin: 10px 10px 0 10px"></el-input>-->
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" icon="el-icon-check" @click="submitMaterialChange">确定</el-button>
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
<el-button type="primary" size="small" @click="submitMaterialChange">确定</el-button>
</div>
</el-dialog>
</div>

View File

@@ -29,6 +29,7 @@
<el-card>
<el-table
v-loading="loading1"
:data="tableData1"
border
style="width: 100%;max-height: 300px;"
@@ -69,7 +70,22 @@
</el-table-column>
<el-table-column label="安全库存量" min-width="200" align="center">
<template slot-scope="scope">
{{ scope.row.安全库存量 }}
<template v-if="scope.row.changeSafeValue">
<el-input v-model="scope.row.安全库存量" class="edit-input" size="mini"/>
<el-button class="cancel-btn" size="mini" icon="el-icon-refresh" type="warning" @click="cancelEdit(scope.row)">取消</el-button>
</template>
<span v-else>{{ scope.row.安全库存量 }}</span>
</template>
</el-table-column>
<el-table-column label="设置" min-width="100" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.changeSafeValue" type="mini" size="mini" icon="el-icon-circle-check-outline" @click="confirmEdit(scope.row)">确定</el-button>
<el-button
v-else
type="primary"
size="mini"
icon="el-icon-edit"
@click="scope.row.changeSafeValue=!scope.row.changeSafeValue">设置</el-button>
</template>
</el-table-column>
</el-table>
@@ -228,12 +244,12 @@
</el-table-column>
<el-table-column label="合计" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价) * parseInt(scope.row.数量) }}
{{ parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
<el-button :disabled="disable" type="danger" size="mini" icon="el-icon-delete" @click="deleteMateriel(scope.row)">移除</el-button>
</template>
</el-table-column>
</el-table>
@@ -243,7 +259,7 @@
<el-table
:data="tableData4"
:show-header="false"
highlight-current-row
:highlight-current-row="!disable"
border
height="280px"
style="width: 250px;display:inline-block;max-height: 280px;"
@@ -256,7 +272,7 @@
</el-table-column>
</el-table>
<el-input :rows="20" v-model="textArea" :readonly="disable" type="textarea" style="width:calc(99% - 250px);float:right;margin-bottom: 20px" resize="none"/>
<el-button type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
<el-button :disabled="disable" type="success" size="mini" icon="el-icon-circle-check-outline" @click="doneOfflineContact">生成离线合同</el-button>
</el-card>
<el-dialog :visible.sync="dialogVisible1" title="供应商选择" center style="min-height: 300px">
@@ -491,13 +507,14 @@
<script>
import { searchInventoryNum, searchOfflineContract, searchOfflineContract2, searchSupplier, initPayMethod, initPayTimeNode, addOfflineContract, editOfflineContract, deleteOfflineContract, searchMateriel,
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo } from '@/api/PurchasingCenter/OfflineContract'
addMateriel, deleteMateriel, doneOfflineContact, searchContractDemo, setSafeValue } from '@/api/PurchasingCenter/OfflineContract'
import { mapGetters } from 'vuex'
export default {
name: '', // 离线合同
data() {
return {
loading1: false,
title2: '',
purchaseStateValue: 2, // 采购状态 全部
purchaseState: [
@@ -603,7 +620,7 @@ export default {
disable2: true,
disable3: true,
disable4: true,
disable: false // 其他的禁用
disable: true // 其他的禁用
}
},
computed: {
@@ -640,12 +657,18 @@ export default {
})
},
searchTable1() { // 查询物料库物料
this.loading1 = true
this.materialName ? this.check1 = 1 : this.check1 = 0
this.inventoryStateValue ? this.check2 = 1 : this.check2 = 0
searchInventoryNum(this.pageCurrent1, this.pageSize1, this.check1, this.materialName, this.check2, this.inventoryStateValue, this.purchaseStateValue).then(response => {
console.log(response.data.rows)
this.tableData1 = response.data.rows
this.tableData1.map(v => {
this.$set(v, 'changeSafeValue', false)
v.原安全库存量 = v.安全库存量
return v
})
this.total1 = response.data.total
this.loading1 = false
})
},
handleSizeChange1(val) {
@@ -663,6 +686,23 @@ export default {
this.materielGroup.push(val[i].物料流水号)
}
},
cancelEdit(row) { // 取消设置
row.安全库存量 = row.原安全库存量
row.changeSafeValue = false
this.$message('取消修改')
},
confirmEdit(row) { // 确认设置
Number(row.安全库存量) ? row.安全库存量 = Number(row.安全库存量) : row.安全库存量 = 0
setSafeValue(row.物料流水号, parseInt(row.安全库存量)).then(response => {
if (response.data[0].result === '1') {
row.changeSafeValue = false
this.$message.success('设置成功')
this.searchTable1()
} else {
this.$message.error('设置失败')
}
})
},
searchTable2() { // 查询离线合同列表
this.offlineContract ? this.check3 = 1 : this.check3 = 0
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
@@ -963,9 +1003,11 @@ export default {
}
}
this.paramRow = row
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
})
if (!this.disable) {
searchContractDemo(this.paramRow.合同模板流水号).then(response => {
this.textArea = response.data[0].合同模板内容.replace('stipulateArrivalTime', this.stipulateArrivalTime).replace('payMethodName', this.payMethodName)
})
}
},
payMethodChange() { // 付款方式改变
for (let i = 0; i < this.payMethod.length; i++) {
@@ -1023,4 +1065,12 @@ export default {
.searchForm .el-form-item{
margin-bottom: 5px;
}
.edit-input {
padding-right: 100px;
}
.cancel-btn {
position: absolute;
right: 15px;
top: 5px;
}
</style>

View File

@@ -95,7 +95,7 @@
</el-table>
<el-button slot="reference" type="success" size="mini" icon="el-icon-search" style="margin-left: 10px" @click="searchTable02(scope.row)">查看详情</el-button>
</el-popover>
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
<el-button :disabled="parseInt(scope.row.审核情况流水号)!==3&&parseInt(scope.row.审批情况流水号)!==3&&parseInt(scope.row.付款情况流水号)!==3" type="danger" size="mini" icon="el-icon-delete" style="margin-left: 10px" @click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table>

View File

@@ -43,7 +43,7 @@
</el-table-column>
<el-table-column label="预付款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预付时间 }}
{{ scope.row.预付时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="付款比例" align="center" min-width="100">
@@ -175,7 +175,7 @@
</el-table-column>
<el-table-column label="付款时间" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.预付时间 }}
{{ scope.row.预付时间 ? scope.row.预付时间.split(' ')[0] : '参考时间节点未设置' }}
</template>
</el-table-column>
<el-table-column label="付款比例" align="center" min-width="100">

View File

@@ -165,6 +165,7 @@
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible3=false">取消</el-button>
<el-button type="primary" size="small" @click="submitApproval('form2')">确定</el-button>
</div>
</el-dialog>

View File

@@ -239,11 +239,8 @@ export default {
created() {
this.fetchData()
},
mounted() {
this.useqrcode()
},
methods: {
useqrcode() {
useqrcode(contractNum) {
const opts = {
errorCorrectionLevel: 'H',
type: 'image/jpeg',
@@ -251,7 +248,8 @@ export default {
quality: 0.3
}
}
QRCode.toDataURL('知道这是啥吗你就扫', opts, function(err, url) {
const str = 'http://192.168.1.111:8022/searchContract.html?contractNum=' + contractNum
QRCode.toDataURL(str, opts, function(err, url) {
if (err) throw err
const img = document.getElementById('img')
img.src = url
@@ -260,7 +258,6 @@ export default {
searchPic() {
// 读取图片时查找合同流水号获取其下所有图片id根据拼接成的路径查询图片显示出来。
searchFile(this.contract).then(response => {
console.log(response.data)
if (response.data.length !== 0) {
this.searchView = 'http://localhost:8022/Img/' + response.data[0].文件名
} else {
@@ -335,6 +332,7 @@ export default {
this.searchTable1()
},
searchTable2(row) {
this.useqrcode(row.采购合同流水号)
this.textarea = row.合同文本
this.supplier = row.供应商名称
this.contract = row.采购合同编号

View File

@@ -41,9 +41,9 @@
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column align="center" label="数量">
<el-table-column align="center" label="小计(元)" prop="小计">
<template slot-scope="scope">
{{ scope.row.数量 }}
{{ scope.row.小计 }}
</template>
</el-table-column>
<el-table-column align="center" label="单价">
@@ -51,9 +51,14 @@
{{ scope.row.单价 }}
</template>
</el-table-column>
<el-table-column align="center" label="小计(元)" prop="小计">
<el-table-column align="center" label="领用数量">
<template slot-scope="scope">
{{ scope.row.小计 }}
{{ scope.row.出库数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="领用时间">
<template slot-scope="scope">
{{ scope.row.出库时间 }}
</template>
</el-table-column>
</el-table>