This commit is contained in:
lixin
2018-11-23 13:29:04 +08:00
23 changed files with 305 additions and 283 deletions

View File

@@ -59,14 +59,14 @@ export function searchContractDetail(contractnumber) {
}) })
} }
// 直达件查询 // 直达件查询
export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract) { export function searchDirectPart(pageCurrent, pageSize, project_check, project, machine_check, machine, group_check, group, contract_check, contract) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '库存管理_直达件_零件查询', name: '库存管理_直达件_零件查询',
param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号=' + contract, param: '项目流水号_check=' + project_check + '&项目流水号=' + project + '&机床流水号_check=' + machine_check + '&机床流水号=' + machine + '&组件流水号_check=' + group_check + '&组件流水号=' + group + '&合同流水号_check=' + contract_check + '&合同流水号=' + contract,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })
@@ -79,7 +79,7 @@ export function searchPeople() {
data: { data: {
type: '1', type: '1',
name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号', name: '人事档案管理_人员_部门与人员_查询数据_根据部门编号',
param: '考核部门编号=' + 18 param: '考核部门编号=18'
} }
}) })
} }

View File

@@ -1,12 +1,13 @@
import request from '@/utils/request' import request from '@/utils/request'
// 替换单查询 // 替换单查询
export function searchSubstitutedCard() { export function searchSubstitutedCard(...params) {
return request({ return request({
url: '', url: '',
method: 'post', method: 'post',
data: { data: {
type: '1', type: '1',
name: '库存管理_替换件_替换单查询' name: '库存管理_替换件_替换单查询',
param: `替换单编号_check=${params[0]}&替换单编号=${params[1]}&替换件名称_check=${params[2]}&替换件名称=${params[3]}`
} }
}) })
} }

View File

@@ -235,7 +235,7 @@ export function updateDate(num1, num2, date) {
method: 'post', method: 'post',
data: { data: {
type: '2', type: '2',
name: '车间生产管理工艺_新排产算法_制定计划_调整计划_增加数据New', name: '车间生产管理工艺_新排产算法_制定计划_调整计划_增加数据New1',
param: '工序流水号=' + num1 + '&调整人编号=' + num2 + '&调整计划完成日期=' + date param: '工序流水号=' + num1 + '&调整人编号=' + num2 + '&调整计划完成日期=' + date
} }
}) })

View File

@@ -47,4 +47,15 @@ export function allocateTask(group, person) {
param: `标准件和外购件流水号组=${group}&人员编号=${person}` param: `标准件和外购件流水号组=${group}&人员编号=${person}`
} }
}) })
}// 执行退回
export function executeReturn(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '采购部采购_退回物料',
param: `标准件和外购件流水号组=${params[0]}&组件零件流水号组=${params[1]}`
}
})
} }

View File

@@ -8,7 +8,7 @@ export function searchTable1(pageCurrent, pageSize, check1, start, end, check2,
data: { data: {
type: '1', type: '1',
name: '车间采购管理_请款表_查询数据', name: '车间采购管理_请款表_查询数据',
param: '时间段_check=' + check1 + '&开始时间=' + start + '&结束时间=' + end + '&合同号_check=' + check2 + '&采购合同编号=' + num1 + '&采购员_check=' + check3 + '&采购员姓名=' + name1 + '&供应商_check=' + check4 + '&供应商名称=' + name2, param: '时间段_check=' + check1 + '&开始时间=' + start + '&结束时间=' + end + '&合同号_check=' + check2 + '&采购合同编号=' + num1 + '&采购员_check=' + check3 + '&采购员流水号=' + name1 + '&供应商_check=' + check4 + '&供应商名称=' + name2,
Pagination: pageCurrent + '&' + pageSize Pagination: pageCurrent + '&' + pageSize
} }
}) })

View File

@@ -10,8 +10,14 @@ export const name = `OP8888`
export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx` export const upload = `http://123.56.95.229:8411/submit/uploadFile.ashx`
export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx` export const download = `http://123.56.95.229:8411/submit/downloadFile.ashx`
const service = axios.create({ const service = axios.create({
<<<<<<< HEAD
// baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, // baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`, baseURL: `http://192.168.1.149:8411/submit/MESCommonBase.ashx`,
=======
baseURL: `http://localhost:8411/submit/MESCommonBase.ashx`,
>>>>>>> 3b215d048bf49b3019c70e80ff7dbd7ebd5869a4
timeout: 1500000 // 请求超时时间 timeout: 1500000 // 请求超时时间
}) })

View File

@@ -137,7 +137,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button> <el-button style="margin-left: 120px;margin-top: 20px" @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button> <el-button :disabled="staffNum===''" type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>

View File

@@ -206,7 +206,7 @@
<el-row> <el-row>
<el-col :span="9"> <el-col :span="9">
<el-form-item label="典型工艺机床分类"> <el-form-item label="典型工艺机床分类">
<el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px"> <el-select v-model="machineTypeValue" placeholder="机床分类" size="small" style="width:150px" @change="SearchMachine">
<el-option <el-option
v-for="item in machineType" v-for="item in machineType"
:key="item.value" :key="item.value"
@@ -783,6 +783,8 @@ export default {
this.dataAll = [] this.dataAll = []
} else { this.$message.error('保存失败') } } else { this.$message.error('保存失败') }
}) })
} else {
this.$message.warning('请勾选是否核准')
} }
}, },
upOne(row) { upOne(row) {

View File

@@ -268,9 +268,8 @@ export default {
this.PeopleNumber = this.id this.PeopleNumber = this.id
}, },
searchMachine() { // 查询机床 searchMachine() { // 查询机床
if (this.ProjectValue === '') { this.Machine = []
this.ProjectValue_check = 0 this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
}
searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => { searchmachine(this.ProjectValue_check, this.ProjectValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Machine.push({ this.Machine.push({
@@ -281,6 +280,7 @@ export default {
}) })
}, },
searchGroupList() { // 查询组号 searchGroupList() { // 查询组号
this.GroupNum = []
searchTeam(this.MachineValue).then(response => { searchTeam(this.MachineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.GroupNum.push({ this.GroupNum.push({
@@ -291,16 +291,19 @@ export default {
}) })
}, },
searchPeopleData() { // 查询人员 searchPeopleData() { // 查询人员
this.People = []
searchPeople().then(response => { searchPeople().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.People.push({ this.People.push({
label: response.data[i].姓名, label: response.data[i].姓名,
value: response.data[i].考勤编号 value: parseInt(response.data[i].考勤编号)
}) })
} }
console.log(this.People)
}) })
}, },
searchContractData() { // 查询合同 searchContractData() { // 查询合同
this.Contract = []
searchContract().then(response => { searchContract().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.Contract.push({ this.Contract.push({
@@ -312,18 +315,10 @@ export default {
}, },
searchPartinfo() { searchPartinfo() {
this.tableDataPurchase = [] this.tableDataPurchase = []
if (this.ProjectValue === '') { this.ProjectValue ? this.ProjectValue_check = 1 : this.ProjectValue_check = 0
this.ProjectValue_check = 0 this.MachineValue ? this.MachineValue_check = 1 : this.MachineValue_check = 0
} this.GroupNumValue ? this.GroupNumValue_check = 1 : this.GroupNumValue_check = 0
if (this.MachineValue === '') { this.ContractValue ? this.ContractValue_check = 1 : this.ContractValue_check = 0
this.MachineValue_check = 0
}
if (this.GroupNumValue === '') {
this.GroupNumValue_check = 0
}
if (this.ContractValue === '') {
this.ContractValue_check = 0
}
this.listLoading = true this.listLoading = true
searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => { searchDirectPart(this.PageCurrent, this.PageSize, this.ProjectValue_check, this.ProjectValue, this.MachineValue_check, this.MachineValue, this.GroupNumValue_check, this.GroupNumValue, this.ContractValue_check, this.ContractValue).then(response => {
this.tableDataPurchase = response.data.rows this.tableDataPurchase = response.data.rows
@@ -349,8 +344,7 @@ export default {
// 打开直达件表单 // 打开直达件表单
addDirect(row) { addDirect(row) {
this.PeopleValue = '' this.PeopleValue = ''
this.form = [] this.form = {}
console.log(row)
this.dialogFormVisible = true this.dialogFormVisible = true
this.materialNum = row.物料流水号 this.materialNum = row.物料流水号
this.purchaseContractNumber = row.采购合同明细流水号 this.purchaseContractNumber = row.采购合同明细流水号
@@ -367,7 +361,7 @@ export default {
this.dialogFormVisible1 = true this.dialogFormVisible1 = true
this.directPartNumber = row.直达件流水号 this.directPartNumber = row.直达件流水号
this.form.DirectNumber = row.到货数量 this.form.DirectNumber = row.到货数量
this.PeopleValue = row.领用人员流水号 this.PeopleValue = parseInt(row.领用人员流水号)
this.form.DirectNote = row.备注 this.form.DirectNote = row.备注
}, },
// 修改直达件 // 修改直达件

View File

@@ -111,7 +111,7 @@
</el-table-column> </el-table-column>
<el-table-column label="入库时间" align="center" min-width="80"> <el-table-column label="入库时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.入库时间 }} {{ scope.row.入库时间 ? scope.row.入库时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -261,7 +261,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -404,7 +404,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -562,7 +562,7 @@
</el-table-column> </el-table-column>
<el-table-column label="到货时间" align="center" min-width="80"> <el-table-column label="到货时间" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.到货时间 }} {{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -3,8 +3,8 @@
<el-card> <el-card>
<span style="margin: 5px">替换单编号</span> <span style="margin: 5px">替换单编号</span>
<el-input v-model="substituteNumber" clearable size="small" style="width:200px" /> <el-input v-model="substituteNumber" clearable size="small" style="width:200px" />
<span style="margin: 5px">零件图号</span> <span style="margin: 5px">替换件名称</span>
<el-input v-model="partNumber" clearable size="small" style="width:200px" /> <el-input v-model="subPartName" clearable size="small" style="width:200px" />
<el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button> <el-button size="small" type="success" icon="el-icon-search" style="margin: 0 0 0 10px" @click="getSubstitutedCard()">查询</el-button>
</el-card> </el-card>
<el-card> <el-card>
@@ -65,8 +65,10 @@ export default {
data() { data() {
return { return {
tableDataExchange: [], tableDataExchange: [],
substituteNumber: '', check1: 0,
partNumber: '', check2: 0,
substituteNumber: '', // 替换单编号
subPartName: '', // 替换件名称
listLoading: '', listLoading: '',
subList: '', subList: '',
locateNumber: '', locateNumber: '',
@@ -77,7 +79,9 @@ export default {
// 替换单查询 // 替换单查询
getSubstitutedCard() { getSubstitutedCard() {
this.listloading = true this.listloading = true
searchSubstitutedCard().then(response => { this.substituteNumber ? this.check1 = 1 : this.check1 = 0
this.subPartName ? this.check2 = 1 : this.check2 = 0
searchSubstitutedCard(this.check1, this.substituteNumber, this.check2, this.subPartName).then(response => {
this.tableDataExchange = response.data this.tableDataExchange = response.data
this.listloading = false this.listloading = false
}) })

View File

@@ -186,8 +186,8 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="选择日期"/>
<el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="purchaseRequisition()">车间请购</el-button> <el-button type="success" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="purchaseRequisition()">车间请购</el-button>
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button> <el-button v-show="PartType!=='基本件'" type="primary" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button> <el-button v-show="PartType==='基本件'" type="warning" size="small" icon="el-icon-star-off" style="margin-top: 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
</el-card> </el-card>
<el-card> <el-card>
<el-row> <el-row>

View File

@@ -8,7 +8,7 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table :data="List" highlight-current-row border> <el-table :data="List" style="height: 550px" border size="small">
<el-table-column label="设备名称" align="center" > <el-table-column label="设备名称" align="center" >
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.设备名称 }} {{ scope.row.设备名称 }}
@@ -184,8 +184,7 @@ export default {
{ value: '3', label: 3 }, { value: '3', label: 3 },
{ value: '4', label: 4 }], { value: '4', label: 4 }],
form: { form: {
设备名称: '', 设备名称: '', 设备编号: '',
设备编号: '',
设备型号: '', 设备型号: '',
设备性能指标: '', 设备性能指标: '',
设备加工能力: '', 设备加工能力: '',

View File

@@ -5,7 +5,9 @@
<span>表单号:</span> <span>表单号:</span>
<el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px"/> <el-input v-model="formNumber" size="small" placeholder="表单号" clearable style="width:200px"/>
<span>外协厂家:</span> <span>外协厂家:</span>
<el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:200px" clearable @dblclick.native="onFocus1();param=0"/> <el-input v-model="manufacturers" readonly size="small" placeholder="外协厂家" style="width:250px" clearable>
<el-button slot="append" icon="el-icon-search" @click="onFocus1();param=0"/>
</el-input>
<span>下达任务日期:</span> <span>下达任务日期:</span>
<el-date-picker <el-date-picker
v-model="time" v-model="time"
@@ -446,8 +448,12 @@ import { getTable, getData1, getTable1, getprocedure, searchManufactor, sparePar
import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel' import { getExplorer, method5, Cleanup } from '@/vendor/exportExcel'
import { convertCurrency } from '@/vendor/int2Chinese' import { convertCurrency } from '@/vendor/int2Chinese'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import elInput from 'element-ui/packages/input'
export default { export default {
components: {
elInput
},
data() { data() {
return { return {
bianliang: [], bianliang: [],
@@ -609,7 +615,7 @@ export default {
this.List3 = [] this.List3 = []
getTable(this.num, this.formNumber, this.num1, this.ManufactorNumber, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize).then(response => { getTable(this.num, this.formNumber, this.num1, this.ManufactorNumber, this.num2, this.time1, this.time2, this.id, this.pageList, this.pageSize).then(response => {
this.total = parseInt(response.data.total) this.total = parseInt(response.data.total)
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.rows.length; i++) {
if (response.data.rows[i].任务下达日期 !== null) { if (response.data.rows[i].任务下达日期 !== null) {
response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substr(0, 10) response.data.rows[i].任务下达日期 = response.data.rows[i].任务下达日期.substr(0, 10)
} }
@@ -871,7 +877,7 @@ export default {
sums[4] = '材料费:' sums[4] = '材料费:'
sums[6] = '其他费用:' sums[6] = '其他费用:'
sums[8] = '运费:' sums[8] = '运费:'
sums[9] = this.freight sums[9] = parseInt(this.freight)
sums[10] = '合计:' sums[10] = '合计:'
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100 sums[24] += Math.round(parseFloat(data[i].外协预算总价格) * 100) / 100
@@ -1046,6 +1052,7 @@ export default {
}) })
} }
}, },
// 确定价格
confirmPrice() { confirmPrice() {
this.code1 = 0 this.code1 = 0
for (let i = 0; i < this.List3.length; i++) { for (let i = 0; i < this.List3.length; i++) {
@@ -1168,6 +1175,7 @@ export default {
}) })
} }
}, },
// 成交
Deal() { Deal() {
this.documentStatus = 2 this.documentStatus = 2
this.sign = 1 this.sign = 1
@@ -1227,7 +1235,7 @@ export default {
}, },
// 提交编辑 // 提交编辑
submitEdit() { submitEdit() {
editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, this.sign, this.Explain).then(response => { editData(this.Number, this.ManufactorNumber1, this.form.运费, this.documentStatus, 1, this.Explain).then(response => {
if (response.data[0].result === '1') { if (response.data[0].result === '1') {
this.$message.success('编辑成功') this.$message.success('编辑成功')
this.dialogFormVisible = false this.dialogFormVisible = false

View File

@@ -43,7 +43,16 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;"> <el-table :data="tableData1" size="mini" border style="width: 100%">
<el-table-column label="请款" min-width="80" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
<el-table-column label="采购合同编号" min-width="100" align="center"> <el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 }} {{ scope.row.采购合同编号 }}
@@ -59,12 +68,12 @@
{{ scope.row.规定到货时间.split(' ')[0] }} {{ scope.row.规定到货时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" min-width="200" align="center"> <el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总金额" width="80" align="center"> <el-table-column label="总金额" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
@@ -74,7 +83,7 @@
{{ scope.row.付款方式内容 }} {{ scope.row.付款方式内容 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" min-width="90" align="center"> <el-table-column label="欠款金额" min-width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.欠款金额 }} {{ scope.row.欠款金额 }}
</template> </template>
@@ -91,7 +100,16 @@
</el-table-column> </el-table-column>
<el-table-column label="请款付款情况" width="900" align="center"> <el-table-column label="请款付款情况" width="900" align="center">
<template slot-scope="scope"> <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 :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<el-table-column label="取消请款" width="100" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.审核情况流水号!==3"
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
<el-table-column label="次数" min-width="60" align="center" type="index"/> <el-table-column label="次数" min-width="60" align="center" type="index"/>
<el-table-column label="请款金额" width="70" align="center"> <el-table-column label="请款金额" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -100,7 +118,7 @@
</el-table-column> </el-table-column>
<el-table-column label="请款时间" width="90" align="center"> <el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间.split(' ')[0] }} {{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核情况" width="80" align="center"> <el-table-column label="审核情况" width="80" align="center">
@@ -133,26 +151,9 @@
{{ scope.row.未付款原因 }} {{ scope.row.未付款原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center">
<template slot-scope="scope">
<el-button
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款" min-width="80" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;"> <div class="block" style="margin-top: 10px;">
<el-pagination <el-pagination
@@ -168,22 +169,22 @@
</el-card> </el-card>
<el-card> <el-card>
<span>请款开始时间:</span> <span>请款时间区:</span>
<el-date-picker <el-date-picker
v-model="startRequestDate" v-model="startRequestDate"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="开始日期"/>
<span>请款结束时间:</span>
<el-date-picker <el-date-picker
v-model="endRequestDate" v-model="endRequestDate"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="结束日期"/>
<el-button <el-button
type="success" type="success"
size="small" size="small"
@@ -277,7 +278,6 @@ export default {
form1: {}, form1: {},
supplierName: '', supplierName: '',
tableData01: [], tableData01: [],
loading1: false,
tableData1: [], tableData1: [],
check1: 0, check1: 0,
check2: 0, check2: 0,
@@ -312,7 +312,6 @@ export default {
}) })
}, },
searchTable1() { searchTable1() {
this.loading1 = true
this.tableData1 = [] this.tableData1 = []
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0 this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
this.contractNum ? this.check2 = 1 : this.check2 = 0 this.contractNum ? this.check2 = 1 : this.check2 = 0
@@ -322,15 +321,18 @@ export default {
for (let j = 0; j < response.data.rows.length; j++) { for (let j = 0; j < response.data.rows.length; j++) {
this.tableData11[j] = [] this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => { searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
for (let i = 0; i < response0.data.length; i++) { if (response0.data.length === 0) {
this.tableData11[j].push(response0.data[i]) this.tableData11[j].push(response0.data)
document.getElementById(j).setAttribute('style', 'display:none')
} else {
for (let i = 0; i < response0.data.length; i++) {
this.tableData11[j].push(response0.data[i])
}
} }
}) })
} }
this.tableData1 = response.data.rows this.tableData1 = response.data.rows
this.total1 = response.data.total this.total1 = response.data.total
}).then(() => {
this.loading1 = false
}) })
}, },
handleSizeChange1(val) { handleSizeChange1(val) {
@@ -356,6 +358,7 @@ export default {
}) })
}, },
cancelRequestFund(row) { // 取消请款 cancelRequestFund(row) { // 取消请款
console.log(row)
this.$confirm('确认取消请款吗?', '提示', { this.$confirm('确认取消请款吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -383,9 +386,15 @@ export default {
}, },
searchRequestTable() { // 查询请款表 searchRequestTable() { // 查询请款表
this.loading2 = true this.loading2 = true
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) { if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
this.checkRequest = 0 this.checkRequest = 0
} else { this.checkRequest = 1 } } else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
this.checkRequest = 1
} else {
this.$message.error('请款时间区间有误')
this.loading2 = false
return
}
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => { searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
for (let j = 0; j < response.data.length; j++) { for (let j = 0; j < response.data.length; j++) {
if (response.data[j].请款时间 !== null) { if (response.data[j].请款时间 !== null) {

View File

@@ -51,7 +51,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第1次付款时间"> <el-form-item label="第1次付款时间">
<el-select v-model="payTime1Value" placeholder="请选择" size="small" clearable> <el-select v-model="payTime1Value" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in payTime" v-for="item in payTime"
:key="item.value" :key="item.value"
@@ -62,7 +62,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第2次付款时间"> <el-form-item label="第2次付款时间">
<el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small" clearable> <el-select v-model="payTime2Value" :disabled="disable2" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in payTime" v-for="item in payTime"
:key="item.value" :key="item.value"
@@ -73,7 +73,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第3次付款时间"> <el-form-item label="第3次付款时间">
<el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small" clearable> <el-select v-model="payTime3Value" :disabled="disable3" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in payTime" v-for="item in payTime"
:key="item.value" :key="item.value"
@@ -84,7 +84,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第4次付款时间"> <el-form-item label="第4次付款时间">
<el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small" clearable> <el-select v-model="payTime4Value" :disabled="disable4" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in payTime" v-for="item in payTime"
:key="item.value" :key="item.value"
@@ -97,7 +97,7 @@
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="第5次付款时间"> <el-form-item label="第5次付款时间">
<el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small" clearable> <el-select v-model="payTime5Value" :disabled="disable5" placeholder="请选择" size="small">
<el-option <el-option
v-for="item in payTime" v-for="item in payTime"
:key="item.value" :key="item.value"
@@ -118,7 +118,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="币种"> <el-form-item label="币种">
<el-select v-model="currencyValue" placeholder="币种" size="small" clearable> <el-select v-model="currencyValue" placeholder="币种" size="small">
<el-option <el-option
v-for="item in currency" v-for="item in currency"
:key="item.value" :key="item.value"
@@ -251,17 +251,17 @@ export default {
contractName: '产品购销合同', // 合同名称 contractName: '产品购销合同', // 合同名称
supplierName: '', // 供应商名称 supplierName: '', // 供应商名称
stipulateArrivalTime: '', // 规定到货时间 stipulateArrivalTime: '', // 规定到货时间
payMethodValue: '', // 付款方式流水号 payMethodValue: 1, // 付款方式流水号
payMethodName: '', // 付款方式名称 payMethodName: '', // 付款方式名称
payMethod: [], payMethod: [],
payTime: [], payTime: [],
payTime1Value: '', // 付款时间 payTime1Value: 1, // 付款时间
payTime2Value: '', // 付款时间 payTime2Value: 1, // 付款时间
payTime3Value: '', // 付款时间 payTime3Value: 1, // 付款时间
payTime4Value: '', // 付款时间 payTime4Value: 1, // 付款时间
payTime5Value: '', // 付款时间 payTime5Value: 1, // 付款时间
payTime6Value: '', // 付款时间 payTime6Value: 1, // 付款时间
freight: '', // 运费 freight: 0, // 运费
taxRate: '0.17', // 税率 taxRate: '0.17', // 税率
currencyValue: 1, // 币种 currencyValue: 1, // 币种
currency: [ currency: [
@@ -380,10 +380,12 @@ export default {
}) })
initPayTimeNode().then(response => { initPayTimeNode().then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
this.payTime.push({ if (parseInt(response.data[i].付款时间节点流水号) !== 0) {
label: response.data[i].付款时间节点名称, this.payTime.push({
value: response.data[i].付款时间节点流水号 label: response.data[i].付款时间节点名称,
}) value: response.data[i].付款时间节点流水号
})
}
} }
}) })
}, },

View File

@@ -51,7 +51,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="到票情况" min-width="200px"> <el-table-column align="center" label="到票情况" min-width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))" status="success"/> <el-progress :status="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?'exception':'success'" :text-inside="true" :stroke-width="18" :percentage="Number(scope.row.到票总金额)>Number(scope.row.合同总金额)?100:parseFloat((100*(scope.row.到票总金额/scope.row.合同总金额)).toFixed(2))"/>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@@ -215,7 +215,7 @@ export default {
], ],
disabled: true, disabled: true,
form2: { form2: {
审批是否通过: '', 审批是否通过: 1,
未通过原因: '' 未通过原因: ''
}, },
rules2: {}, rules2: {},

View File

@@ -23,7 +23,7 @@
</el-option> </el-option>
</el-select> </el-select>
<span>采购员:</span> <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 <el-option
v-for="item in person" v-for="item in person"
:key="item.value" :key="item.value"

View File

@@ -1,45 +1,59 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-row :gutter="10">
<span>项目名称:</span> <el-col :span="16">
<el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable> <el-card>
<el-option <span style="margin:0">项目名称:</span>
v-for="item in project" <el-select v-model="projectValue" placeholder="项目名称" size="small" filterable clearable>
:key="item.value" <el-option
:label="item.label" v-for="item in project"
:value="item.value"/> :key="item.value"
</el-select> :label="item.label"
<span>物料名称:</span> :value="item.value"/>
<el-input v-model="materialName" placeholder="物料名称" size="small" clearable/> </el-select>
<span>分配情况:</span> <span>物料名称:</span>
<el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px"> <el-input v-model="materialName" placeholder="物料名称" style="width:170px" size="small" clearable/>
<el-option <span>分配情况:</span>
v-for="item in allocateState" <el-select v-model="allocateStateValue" placeholder="分配情况" size="small" style="width: 100px">
:key="item.value" <el-option
:label="item.label" v-for="item in allocateState"
:value="item.value"/> :key="item.value"
</el-select> :label="item.label"
<el-button :value="item.value"/>
type="success" </el-select>
size="small" <el-button
icon="el-icon-search" type="success"
style="margin-left: 10px" size="small"
@click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button> icon="el-icon-search"
<span>采购员:</span> style="margin-left: 10px"
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px"> @click="pageCurrent1=1;pageSize1=20;total1=0;searchTable1()">查询</el-button>
<el-option </el-card>
v-for="item in person" </el-col>
:key="item.value" <el-col :span="8">
:label="item.label" <el-card>
:value="item.value"/> <span>采购员:</span>
</el-select> <el-select v-model="personValue" placeholder="采购员" size="small" style="width: 100px">
<el-button <el-option
type="primary" v-for="item in person"
size="small" :key="item.value"
icon="el-icon-menu" :label="item.label"
style="margin-left: 10px" :value="item.value"/>
@click="allocateTask">分配</el-button> </el-select>
</el-card> <el-button
type="primary"
size="small"
icon="el-icon-menu"
style="margin-left: 10px"
@click="allocateTask">分配</el-button>
<el-button
type="danger"
size="small"
icon="el-icon-back"
style="margin-left: 10px"
@click="executeReturn">退回</el-button>
</el-card>
</el-col>
</el-row>
<el-card> <el-card>
<el-table <el-table
@@ -109,7 +123,7 @@
</template> </template>
<script> <script>
import { initProject, initBuyer, searchTable1, allocateTask } from '@/api/PurchasingCenter/PurchaseTaskAllocate' import { initProject, initBuyer, searchTable1, allocateTask, executeReturn } from '@/api/PurchasingCenter/PurchaseTaskAllocate'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
@@ -140,6 +154,7 @@ export default {
check2: 0, check2: 0,
tableData1: [], tableData1: [],
standardAndPurchase: [], standardAndPurchase: [],
groupAndPart: [],
pageCurrent1: 1, pageCurrent1: 1,
pageSize1: 20, pageSize1: 20,
total1: 0 total1: 0
@@ -187,8 +202,10 @@ export default {
}, },
handleSelectionChange1(val) { // 多选 handleSelectionChange1(val) { // 多选
this.standardAndPurchase = [] this.standardAndPurchase = []
this.groupAndPart = []
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
this.standardAndPurchase.push(val[i].标准件和外购件流水号) this.standardAndPurchase.push(val[i].标准件和外购件流水号)
this.groupAndPart.push(val[i].组件零件流水号)
} }
}, },
selectable(row) { // 多选禁用 selectable(row) { // 多选禁用
@@ -231,6 +248,29 @@ export default {
handleCurrentChange1(val) { handleCurrentChange1(val) {
this.pageCurrent1 = val this.pageCurrent1 = val
this.searchTable1() this.searchTable1()
},
executeReturn() { // 退回
if (this.standardAndPurchase.length === 0) {
this.$message.error('请选择需退回的物料')
} else {
this.$confirm('此操作执行后不可修改,是否确定退回?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
executeReturn(this.standardAndPurchase, this.groupAndPart).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.searchTable1()
} else { this.$message.error('操作失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消操作'
})
})
}
} }
} }
} }

View File

@@ -96,7 +96,7 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="接收人" min-width="80px"> <el-table-column align="center" label="接收人" min-width="80px">
<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 align="center" label="备注" min-width="200px"> <el-table-column align="center" label="备注" min-width="200px">

View File

@@ -20,15 +20,20 @@
<span>合同号:</span> <span>合同号:</span>
<el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/> <el-input v-model="contractNum" placeholder="合同号" size="small" style="width:180px" clearable/>
<span>采购员:</span> <span>采购员:</span>
<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 <el-input
v-model="buyerName" v-model="supplierName"
placeholder="请双击选择" placeholder="供应商"
size="small" size="small"
clearable clearable
style="width:120px" style="width:180px"/>
@dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true"/>
<span>供应商:</span>
<el-input v-model="supplierName" placeholder="供应商" size="small" clearable/>
<el-button <el-button
type="success" type="success"
size="small" size="small"
@@ -38,28 +43,37 @@
</el-card> </el-card>
<el-card> <el-card>
<el-table v-loading="loading1" :data="tableData1" size="mini" border style="width: 100%;"> <el-table :data="tableData1" size="mini" border style="width: 100%">
<el-table-column label="采购合同编号" min-width="150" align="center"> <el-table-column label="请款" min-width="80" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
<el-table-column label="采购合同编号" min-width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.采购合同编号 }} {{ scope.row.采购合同编号 }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.采购合同名称 }} {{ scope.row.采购合同名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="规定到货时间" width="100" align="center"> <el-table-column label="规定到货时间" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.规定到货时间 }} {{ scope.row.规定到货时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="供应商" min-width="200" align="center"> <el-table-column label="供应商" min-width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总金额" width="80" align="center"> <el-table-column label="总金额" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.总金额 }} {{ scope.row.总金额 }}
</template> </template>
@@ -69,7 +83,7 @@
{{ scope.row.付款方式内容 }} {{ scope.row.付款方式内容 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="欠款金额" min-width="100" align="center"> <el-table-column label="欠款金额" min-width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.欠款金额 }} {{ scope.row.欠款金额 }}
</template> </template>
@@ -84,9 +98,18 @@
<el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/> <el-input v-model="scope.row.本次应请款" size="mini" style="width:70px"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款付款情况" width="810" align="center"> <el-table-column label="请款付款情况" width="900" align="center">
<template slot-scope="scope"> <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 :id="scope.$index" :data="tableData11[scope.$index]" size="mini" border style="width: 100%;">
<el-table-column label="取消请款" width="100" align="center">
<template slot-scope="scope">
<el-button
:disabled="scope.row.审核情况流水号!==3"
type="danger"
size="mini"
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
<el-table-column label="次数" min-width="60" align="center" type="index"/> <el-table-column label="次数" min-width="60" align="center" type="index"/>
<el-table-column label="请款金额" width="70" align="center"> <el-table-column label="请款金额" width="70" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@@ -95,25 +118,25 @@
</el-table-column> </el-table-column>
<el-table-column label="请款时间" width="90" align="center"> <el-table-column label="请款时间" width="90" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间 }} {{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审核情况内容" width="80" align="center"> <el-table-column label="审核情况" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审核情况内容 }} {{ scope.row.审核情况内容 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未通过审核原因" width="80" align="center"> <el-table-column label="未通过审核原因" width="110" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过审核原因 }} {{ scope.row.未通过审核原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批情况内容" width="80" align="center"> <el-table-column label="审批情况" width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.审批情况内容 }} {{ scope.row.审批情况内容 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未通过审批原因" width="80" align="center"> <el-table-column label="未通过审批原因" width="110" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未通过审批原因 }} {{ scope.row.未通过审批原因 }}
</template> </template>
@@ -123,32 +146,14 @@
{{ scope.row.付款情况内容 }} {{ scope.row.付款情况内容 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="未付款原因" width="80" align="center"> <el-table-column label="未付款原因" width="110" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.未付款原因 }} {{ scope.row.未付款原因 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="100" align="center">
<template slot-scope="scope">
<el-button
type="danger"
size="mini"
icon=""
@click="cancelRequestFund(scope.row)">取消请款</el-button>
</template>
</el-table-column>
</el-table> </el-table>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请款" min-width="80" align="center" fixed="right">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
icon=""
@click="requestFund(scope.row)">请款</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="block" style="margin-top: 10px;"> <div class="block" style="margin-top: 10px;">
<el-pagination <el-pagination
@@ -164,22 +169,22 @@
</el-card> </el-card>
<el-card> <el-card>
<span>请款开始时间:</span> <span>请款时间区:</span>
<el-date-picker <el-date-picker
v-model="startRequestDate" v-model="startRequestDate"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="开始日期"/>
<span>请款结束时间:</span>
<el-date-picker <el-date-picker
v-model="endRequestDate" v-model="endRequestDate"
size="small" size="small"
type="date" type="date"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
format="yyyy-MM-dd" format="yyyy-MM-dd"
placeholder="选择日期"/> placeholder="结束日期"/>
<el-button <el-button
type="success" type="success"
size="small" size="small"
@@ -190,7 +195,8 @@
type="warning" type="warning"
size="small" size="small"
icon="el-icon-download" icon="el-icon-download"
style="margin-left:10px">导出Excel</el-button> style="margin-left:10px"
>导出Excel</el-button>
</el-card> </el-card>
<el-card> <el-card>
@@ -207,10 +213,10 @@
</el-table-column> </el-table-column>
<el-table-column label="规定到货时间" width="100" align="center"> <el-table-column label="规定到货时间" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.规定到货时间 }} {{ scope.row.规定到货时间.split(' ')[0] }}
</template> </template>
</el-table-column> </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"> <template slot-scope="scope">
{{ scope.row.供应商名称 }} {{ scope.row.供应商名称 }}
</template> </template>
@@ -242,46 +248,11 @@
</el-table-column> </el-table-column>
<el-table-column label="请款时间" width="100" align="center"> <el-table-column label="请款时间" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.请款时间 }} {{ scope.row.请款时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<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> </div>
</template> </template>
@@ -292,8 +263,8 @@ import { mapGetters } from 'vuex'
export default { export default {
data() { data() {
return { return {
tableData02: [], personValue: '',
dialogVisible2: false, person: [],
loading2: false, loading2: false,
tableData2: [], tableData2: [],
tableData11: [], tableData11: [],
@@ -303,37 +274,10 @@ export default {
startDate: '', startDate: '',
endDate: '', endDate: '',
contractNum: '', contractNum: '',
buyerName: '',
dialogVisible1: false,
submitDisable: true, submitDisable: true,
form1: {}, form1: {},
supplierValue: '',
supplierName: '', 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: [], tableData01: [],
loading1: false,
tableData1: [], tableData1: [],
check1: 0, check1: 0,
check2: 0, check2: 0,
@@ -352,45 +296,43 @@ export default {
'id' 'id'
]) ])
}, },
created() {
this.initBuyer()
},
methods: { methods: {
submitSelectBuyer() { // 确定
this.dialogVisible2 = false
},
clickBuyer(row) { // 点击采购员表某一行
this.submitDisable = false
this.buyerName = row.姓名
},
initBuyer() { // 初始化采购人员 initBuyer() { // 初始化采购人员
initBuyer().then(response => { 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].人员编号
})
}
}) })
}, },
searchTable1() { searchTable1() {
this.loading1 = true
this.tableData1 = [] this.tableData1 = []
this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0 this.startDate && this.endDate ? this.check1 = 1 : this.check1 = 0
this.contractNum ? this.check2 = 1 : this.check2 = 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 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++) { 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(' '))
}
this.tableData11[j] = [] this.tableData11[j] = []
searchCondition(response.data.rows[j].采购合同流水号).then(response0 => { searchCondition(response.data.rows[j].采购合同流水号).then(response0 => {
this.tableData1 = response.data.rows if (response0.data.length === 0) {
this.total1 = response.data.total this.tableData11[j].push(response0.data)
for (let i = 0; i < response0.data.length; i++) { document.getElementById(j).setAttribute('style', 'display:none')
if (response0.data[i].请款时间 !== null) { } else {
response0.data[i].请款时间 = response0.data[i].请款时间.substring(0, response0.data[i].请款时间.indexOf(' ')) for (let i = 0; i < response0.data.length; i++) {
this.tableData11[j].push(response0.data[i])
} }
this.tableData11[j].push(response0.data[i])
} }
}) })
} }
}).then(() => { this.tableData1 = response.data.rows
this.loading1 = false this.total1 = response.data.total
}) })
}, },
handleSizeChange1(val) { handleSizeChange1(val) {
@@ -416,6 +358,7 @@ export default {
}) })
}, },
cancelRequestFund(row) { // 取消请款 cancelRequestFund(row) { // 取消请款
console.log(row)
this.$confirm('确认取消请款吗?', '提示', { this.$confirm('确认取消请款吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
@@ -443,14 +386,17 @@ export default {
}, },
searchRequestTable() { // 查询请款表 searchRequestTable() { // 查询请款表
this.loading2 = true this.loading2 = true
if (this.startRequestDate === '' || this.startRequestDate === null || this.endRequestDate === '' || this.endRequestDate === null) { if ((this.startRequestDate === '' || this.startRequestDate === null) && (this.endRequestDate === '' || this.endRequestDate === null)) {
this.checkRequest = 0 this.checkRequest = 0
} else { this.checkRequest = 1 } } else if (this.startRequestDate !== '' && this.startRequestDate !== null && this.endRequestDate !== '' && this.endRequestDate !== null) {
this.checkRequest = 1
} else {
this.$message.error('请款时间区间有误')
this.loading2 = false
return
}
searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => { searchRequestTable(this.checkRequest, this.startRequestDate, this.endRequestDate).then(response => {
for (let j = 0; j < response.data.length; j++) { 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) { if (response.data[j].请款时间 !== null) {
response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' ')) response.data[j].请款时间 = response.data[j].请款时间.substring(0, response.data[j].请款时间.indexOf(' '))
} }

View File

@@ -25,7 +25,7 @@
</el-option> </el-option>
</el-select> </el-select>
<span>采购员:</span> <span>采购员:</span>
<el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;Buyer=0"/> <el-input v-model="buyerName" placeholder="请双击选择" size="small" clearable style="width:120px" @dblclick.native="initBuyer();dialogVisible2=true;submitDisable=true;buyer=0"/>
</el-row> </el-row>
<el-row style="margin-top: 10px"> <el-row style="margin-top: 10px">
<span>供应商:</span> <span>供应商:</span>