mirror of
https://github.com/shawncai/ERP.git
synced 2024-09-20 23:16:09 +08:00
4.21 修改采购订单问题若干
This commit is contained in:
parent
de85006a26
commit
fb39fc5240
|
@ -58,6 +58,9 @@ export function stockenterlist(query) {
|
||||||
if (query.supplierId !== '' && query.supplierId !== null && query.supplierId !== undefined) {
|
if (query.supplierId !== '' && query.supplierId !== null && query.supplierId !== undefined) {
|
||||||
params.append('supplierId', query.supplierId) // 你要传给后台的参数值 key/value
|
params.append('supplierId', query.supplierId) // 你要传给后台的参数值 key/value
|
||||||
}
|
}
|
||||||
|
if (query.isActive !== '' && query.isActive !== null && query.isActive !== undefined) {
|
||||||
|
params.append('isActive', query.isActive) // 你要传给后台的参数值 key/value
|
||||||
|
}
|
||||||
params.append('pageNum', query.pagenum) // 你要传给后台的参数值 key/value
|
params.append('pageNum', query.pagenum) // 你要传给后台的参数值 key/value
|
||||||
params.append('pageSize', query.pagesize) // 你要传给后台的参数值 key/value
|
params.append('pageSize', query.pagesize) // 你要传给后台的参数值 key/value
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -1969,6 +1969,7 @@ export default {
|
||||||
workCenterId: 'production center'
|
workCenterId: 'production center'
|
||||||
},
|
},
|
||||||
CheckReport: {
|
CheckReport: {
|
||||||
|
color: 'color',
|
||||||
checkItemId: 'inspection items',
|
checkItemId: 'inspection items',
|
||||||
checkContent: 'inspection standards',
|
checkContent: 'inspection standards',
|
||||||
checkTools: 'inspection tools',
|
checkTools: 'inspection tools',
|
||||||
|
|
|
@ -1975,6 +1975,7 @@ export default {
|
||||||
workCenterId: '生产中心'
|
workCenterId: '生产中心'
|
||||||
},
|
},
|
||||||
CheckReport: {
|
CheckReport: {
|
||||||
|
color: '颜色',
|
||||||
checkItemId: '检验项目',
|
checkItemId: '检验项目',
|
||||||
checkContent: '检验指标',
|
checkContent: '检验指标',
|
||||||
checkTools: '检验工具',
|
checkTools: '检验工具',
|
||||||
|
|
|
@ -1126,14 +1126,15 @@ export default {
|
||||||
checkMode: '1',
|
checkMode: '1',
|
||||||
checkType: '1',
|
checkType: '1',
|
||||||
checkDate: null,
|
checkDate: null,
|
||||||
checkResult: '1'
|
checkResult: '1',
|
||||||
|
checkPersonId: this.$store.getters.userId
|
||||||
}
|
}
|
||||||
this.judgequilty = null
|
this.judgequilty = null
|
||||||
this.inspectionPersonId = this.$store.getters.name
|
this.inspectionPersonId = this.$store.getters.name
|
||||||
this.supplierId = null
|
this.supplierId = null
|
||||||
this.workCenterId = null
|
this.workCenterId = null
|
||||||
this.produceManagerId = null
|
this.produceManagerId = null
|
||||||
this.checkPersonId = null
|
this.checkPersonId = this.$store.getters.name
|
||||||
this.getdatatime()
|
this.getdatatime()
|
||||||
},
|
},
|
||||||
// 保存操作
|
// 保存操作
|
||||||
|
|
|
@ -103,6 +103,11 @@
|
||||||
<span>{{ scope.row.productName }}</span>
|
<span>{{ scope.row.productName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('CheckReport.color')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.color }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column :label="$t('CheckReport.supplierId')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('CheckReport.supplierId')" :resizable="false" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.supplierName }}</span>
|
<span>{{ scope.row.supplierName }}</span>
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
:edit-rules="validRules"
|
:edit-rules="validRules"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
class="click-table1"
|
class="click-table1"
|
||||||
|
show-summary
|
||||||
stripe
|
stripe
|
||||||
border
|
border
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -162,6 +163,31 @@
|
||||||
</el-editable>
|
</el-editable>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- 合计信息 -->
|
||||||
|
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px;margin-bottom: 20px">
|
||||||
|
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</h2>
|
||||||
|
<div class="container" style="margin-top: 37px">
|
||||||
|
<el-form :inline="true" status-icon class="demo-ruleForm" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('SaleOrder.heji1')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allNumber" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('updates.sehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allTaxMoney" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('updates.hsjehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allIncludeTaxMoney" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
<!--操作-->
|
<!--操作-->
|
||||||
<div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99">
|
<div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99">
|
||||||
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
|
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||||
|
@ -394,6 +420,7 @@ export default {
|
||||||
val.row.costCategory = this.costs[i].costCategory
|
val.row.costCategory = this.costs[i].costCategory
|
||||||
val.row.subject = this.costs[i].subjectId
|
val.row.subject = this.costs[i].subjectId
|
||||||
val.row.subjectName = this.costs[i].subjectName
|
val.row.subjectName = this.costs[i].subjectName
|
||||||
|
val.row.unit = this.costs[i].unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -507,17 +534,12 @@ export default {
|
||||||
sums[3] = ''
|
sums[3] = ''
|
||||||
sums[4] = ''
|
sums[4] = ''
|
||||||
sums[5] = ''
|
sums[5] = ''
|
||||||
sums[6] = ''
|
sums[12] = ''
|
||||||
sums[10] = ''
|
sums[13] = ''
|
||||||
sums[15] = ''
|
this.allNumber = sums[6]
|
||||||
sums[18] = ''
|
|
||||||
sums[19] = ''
|
|
||||||
this.allNumber = sums[7]
|
|
||||||
this.allMoney = sums[12]
|
this.allMoney = sums[12]
|
||||||
this.allTaxMoney = sums[14]
|
this.allTaxMoney = sums[9]
|
||||||
this.allIncludeTaxMoney = sums[13]
|
this.allIncludeTaxMoney = sums[8]
|
||||||
this.allDiscountMoney = sums[16]
|
|
||||||
this.allMoneyMoveDiscount = sums[13] - sums[16]
|
|
||||||
return sums
|
return sums
|
||||||
},
|
},
|
||||||
getdiscountMoney(row) {
|
getdiscountMoney(row) {
|
||||||
|
|
|
@ -132,6 +132,7 @@
|
||||||
:edit-rules="validRules"
|
:edit-rules="validRules"
|
||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
class="click-table1"
|
class="click-table1"
|
||||||
|
show-summary
|
||||||
stripe
|
stripe
|
||||||
border
|
border
|
||||||
size="small"
|
size="small"
|
||||||
|
@ -160,6 +161,31 @@
|
||||||
</el-editable>
|
</el-editable>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<!-- 合计信息 -->
|
||||||
|
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px;margin-bottom: 20px">
|
||||||
|
<h2 ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</h2>
|
||||||
|
<div class="container" style="margin-top: 37px">
|
||||||
|
<el-form :inline="true" status-icon class="demo-ruleForm" label-width="130px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('SaleOrder.heji1')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allNumber" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('updates.sehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allTaxMoney" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item :label="$t('updates.hsjehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||||
|
<el-input v-model="allIncludeTaxMoney" style="width: 200px" disabled/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
<el-card class="box-card" style="position: fixed;width: 1010px;z-index: 100;height: 74px;bottom: 0;" shadow="never">
|
<el-card class="box-card" style="position: fixed;width: 1010px;z-index: 100;height: 74px;bottom: 0;" shadow="never">
|
||||||
<div class="buttons" style="float: right;padding-bottom: 10px">
|
<div class="buttons" style="float: right;padding-bottom: 10px">
|
||||||
<el-button @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
|
<el-button @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
|
||||||
|
@ -356,6 +382,7 @@ export default {
|
||||||
val.row.costCode = this.costs[i].costCode
|
val.row.costCode = this.costs[i].costCode
|
||||||
val.row.subject = this.costs[i].subjectId
|
val.row.subject = this.costs[i].subjectId
|
||||||
val.row.subjectName = this.costs[i].subjectName
|
val.row.subjectName = this.costs[i].subjectName
|
||||||
|
val.row.unit = this.costs[i].unit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -396,17 +423,12 @@ export default {
|
||||||
sums[3] = ''
|
sums[3] = ''
|
||||||
sums[4] = ''
|
sums[4] = ''
|
||||||
sums[5] = ''
|
sums[5] = ''
|
||||||
sums[6] = ''
|
sums[12] = ''
|
||||||
sums[10] = ''
|
sums[13] = ''
|
||||||
sums[15] = ''
|
this.allNumber = sums[6]
|
||||||
sums[18] = ''
|
|
||||||
sums[19] = ''
|
|
||||||
this.allNumber = sums[7]
|
|
||||||
this.allMoney = sums[12]
|
this.allMoney = sums[12]
|
||||||
this.allTaxMoney = sums[14]
|
this.allTaxMoney = sums[9]
|
||||||
this.allIncludeTaxMoney = sums[13]
|
this.allIncludeTaxMoney = sums[8]
|
||||||
this.allDiscountMoney = sums[16]
|
|
||||||
this.allMoneyMoveDiscount = sums[13] - sums[16]
|
|
||||||
return sums
|
return sums
|
||||||
},
|
},
|
||||||
getdiscountMoney(row) {
|
getdiscountMoney(row) {
|
||||||
|
|
|
@ -132,7 +132,7 @@
|
||||||
<h2 ref="fuzhu" class="form-name" >红字采购发票明细</h2>
|
<h2 ref="fuzhu" class="form-name" >红字采购发票明细</h2>
|
||||||
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
|
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
|
||||||
<el-button style="width: 130px" @click="handleAddSouce">{{ $t('updates.cydzxz') }}</el-button>
|
<el-button style="width: 130px" @click="handleAddSouce">{{ $t('updates.cydzxz') }}</el-button>
|
||||||
<my-enter :entercontrol.sync="entercontrol" :supp.sync="supp" @enter="enter" @enterinfo="enterinfo"/>
|
<my-invoice :entercontrol.sync="entercontrol" :supp.sync="supp" @enter="enter" @enterinfo="enterinfo"/>
|
||||||
<!-- <el-button :disabled="addpro" @click="handleAddproduct">{{ $t('Hmodule.tjsp') }}</el-button>-->
|
<!-- <el-button :disabled="addpro" @click="handleAddproduct">{{ $t('Hmodule.tjsp') }}</el-button>-->
|
||||||
<my-detail :control.sync="control" @product="productdetail"/>
|
<my-detail :control.sync="control" @product="productdetail"/>
|
||||||
<el-button type="danger" @click="$refs.editable.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
|
<el-button type="danger" @click="$refs.editable.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
|
||||||
|
@ -312,11 +312,12 @@ import MyLnquiry from './components/MyLnquiry'
|
||||||
import MyOrder from './components/MyOrder'
|
import MyOrder from './components/MyOrder'
|
||||||
import MyArrival from './components/MyArrival'
|
import MyArrival from './components/MyArrival'
|
||||||
import MyEnter from './components/MyEnter'
|
import MyEnter from './components/MyEnter'
|
||||||
|
import MyInvoice from './components/MyInvoice'
|
||||||
import MyRepository from './components/MyRepository'
|
import MyRepository from './components/MyRepository'
|
||||||
var _that
|
var _that
|
||||||
export default {
|
export default {
|
||||||
name: 'AddStockInvoice',
|
name: 'AddStockInvoice',
|
||||||
components: { MyRepository, MyArrival, MyOrder, MyLnquiry, MyDelivery, MyPlan, MyApply, MySupplier, MyDetail, MyEmp, MyEnter },
|
components: { MyRepository, MyArrival, MyOrder, MyLnquiry, MyDelivery, MyPlan, MyApply, MySupplier, MyDetail, MyEmp, MyEnter, MyInvoice },
|
||||||
data() {
|
data() {
|
||||||
const validatePass = (rule, value, callback) => {
|
const validatePass = (rule, value, callback) => {
|
||||||
console.log(this.handlePersonId)
|
console.log(this.handlePersonId)
|
||||||
|
|
|
@ -131,7 +131,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!--子件信息-->
|
<!--子件信息123-->
|
||||||
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px">
|
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px">
|
||||||
<div ref="fuzhu" class="form-name" >{{ $t('updates.cgfpmx') }}</div>
|
<div ref="fuzhu" class="form-name" >{{ $t('updates.cgfpmx') }}</div>
|
||||||
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
|
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
|
||||||
|
|
|
@ -55,7 +55,8 @@
|
||||||
align="center"/>
|
align="center"/>
|
||||||
<el-table-column :label="$t('public.id')" :resizable="false" fixed="left" align="center" min-width="150">
|
<el-table-column :label="$t('public.id')" :resizable="false" fixed="left" align="center" min-width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.number }}</span>
|
<span v-if="scope.row.judgeStat === 0" class="link-type" @click="handleEdit(scope.row)">{{ scope.row.number }}</span>
|
||||||
|
<span v-else class="link-type" @click="handleDetail(scope.row)">{{ scope.row.number }}</span>
|
||||||
</template>
|
</template>
|
||||||
<detail-list :detailcontrol.sync="detailvisible" :detaildata.sync="personalForm"/>
|
<detail-list :detailcontrol.sync="detailvisible" :detaildata.sync="personalForm"/>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
|
@ -267,6 +267,7 @@
|
||||||
<div class="buttons" style="margin-top: 20px;margin-left: 30px">
|
<div class="buttons" style="margin-top: 20px;margin-left: 30px">
|
||||||
<el-button type="primary" @click="handleEditok()">{{ $t('public.edit') }}</el-button>
|
<el-button type="primary" @click="handleEditok()">{{ $t('public.edit') }}</el-button>
|
||||||
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
|
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
|
||||||
|
<el-button type="info" @click="handleReview()">{{ $t('prompt.sh') }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -278,6 +279,7 @@ import { updatestockinvoice } from '@/api/StockInvoice'
|
||||||
import { getdeptlist } from '@/api/BasicSettings'
|
import { getdeptlist } from '@/api/BasicSettings'
|
||||||
import { searchStockCategory } from '@/api/StockCategory'
|
import { searchStockCategory } from '@/api/StockCategory'
|
||||||
import { searchCategory } from '@/api/Supplier'
|
import { searchCategory } from '@/api/Supplier'
|
||||||
|
import { updatestockinvoice2 } from '@/api/StockInvoice'
|
||||||
import MyEmp from './MyEmp'
|
import MyEmp from './MyEmp'
|
||||||
import MyDetail from './MyDetail'
|
import MyDetail from './MyDetail'
|
||||||
import MySupplier from './MySupplier'
|
import MySupplier from './MySupplier'
|
||||||
|
@ -434,7 +436,12 @@ export default {
|
||||||
receiptVisible2: false,
|
receiptVisible2: false,
|
||||||
list111: [],
|
list111: [],
|
||||||
// 批量操作
|
// 批量操作
|
||||||
moreaction: []
|
moreaction: [],
|
||||||
|
reviewParms: {
|
||||||
|
id: '',
|
||||||
|
judgePersonId: '',
|
||||||
|
judgeStat: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -456,6 +463,69 @@ export default {
|
||||||
_that = this
|
_that = this
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 审批操作
|
||||||
|
handleReview() {
|
||||||
|
this.reviewParms = {}
|
||||||
|
this.reviewParms.id = this.personalForm.id
|
||||||
|
this.reviewParms.judgePersonId = this.$store.getters.userId
|
||||||
|
this.$confirm(this.$t('prompt.qsh'), this.$t('prompt.sh'), {
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
confirmButtonText: this.$t('prompt.tg'),
|
||||||
|
cancelButtonText: this.$t('prompt.btg'),
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.reviewParms.judgeStat = 2
|
||||||
|
const parms = JSON.stringify(this.reviewParms)
|
||||||
|
updatestockinvoice2(parms).then(res => {
|
||||||
|
if (res.data.ret === 200) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: this.$t('prompt.shcg')
|
||||||
|
})
|
||||||
|
this.$emit('rest', true)
|
||||||
|
this.editVisible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(action => {
|
||||||
|
if (action === 'cancel') {
|
||||||
|
// 取消弹框
|
||||||
|
this.$confirm('是否确认审核不通过?', 'Warning', {
|
||||||
|
distinguishCancelAndClose: true,
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.reviewParms.judgeStat = 3
|
||||||
|
const parms = JSON.stringify(this.reviewParms)
|
||||||
|
updatestockinvoice2(parms).then(res => {
|
||||||
|
if (res.data.ret === 200) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: this.$t('prompt.shcg')
|
||||||
|
})
|
||||||
|
this.$emit('rest', true)
|
||||||
|
this.editVisible = false
|
||||||
|
} else {
|
||||||
|
this.$notify.error({
|
||||||
|
title: 'wrong',
|
||||||
|
message: res.data.msg,
|
||||||
|
offset: 100
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(action => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: action === 'cancel'
|
||||||
|
? '确认取消'
|
||||||
|
: '停留在当前页面'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// ================取消弹框结束
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 重置一下下拉
|
// 重置一下下拉
|
||||||
change() {
|
change() {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
|
|
|
@ -75,47 +75,58 @@
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@current-change="handleCurrentChange"
|
@current-change="handleCurrentChange"
|
||||||
@selection-change="handleSelectionChange">
|
@selection-change="handleSelectionChange">
|
||||||
<el-table-column :label="$t('public.id')" :resizable="false" fixed="left" align="center" min-width="150">
|
<el-table-column :reserve-selection="true" type="selection" min-width="55" align="center" />
|
||||||
|
<el-table-column :label="$t('Stockenter.id')" :resizable="false" fixed="left" prop="id" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span class="link-type">{{ scope.row.number }}</span>
|
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.id }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.sourceType')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.title')" :resizable="false" fixed="left" prop="title" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.sourceType | sourceTypeFilter }}</span>
|
<span>{{ scope.row.title }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.invoiceNumber')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.enterNumber')" :resizable="false" prop="sourceNumber" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.invoiceNumber }}</span>
|
<span>{{ scope.row.enterNumber }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.supplierId')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.deliveryPersonId')" :resizable="false" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.supplierName }}</span>
|
<span>{{ scope.row.deliveryPersonName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.isRed')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.acceptPersonId')" :resizable="false" prop="acceptPersonName" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.isRed | isRedFilter }}</span>
|
<span>{{ scope.row.acceptPersonName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.createDate')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.enterDeptId')" :resizable="false" prop="deliveryPersonName" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.createDate }}</span>
|
<span>{{ scope.row.deliveryPersonName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('StockInvoice.payDate')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.endPersonName')" :resizable="false" prop="endPersonName" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.payDate }}</span>
|
<span>{{ scope.row.enterPersonName }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('public.judgeStat')" :resizable="false" prop="judgeStat" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.endDate')" :resizable="false" prop="endDate" align="center" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.enterDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('Stockenter.summary')" :resizable="false" prop="stockEnterDetails" align="center" width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.summary }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('Stockenter.judgeStat')" :resizable="false" prop="judgeStat" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.judgeStat | judgeStatFilter }}</span>
|
<span>{{ scope.row.judgeStat | judgeStatFilter }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('public.receiptStat')" :resizable="false" align="center" min-width="150">
|
<el-table-column :label="$t('Stockenter.receiptStat')" :resizable="false" align="center" width="150">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
|
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -132,7 +143,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { stockenterlist } from '@/api/Stockenter'
|
import { stockenterlist } from '@/api/Stockenter'
|
||||||
import { getdeptlist } from '@/api/BasicSettings'
|
import { getdeptlist } from '@/api/BasicSettings'
|
||||||
import { stockInvoiceList } from '@/api/StockInvoice'
|
|
||||||
import waves from '@/directive/waves' // Waves directive
|
import waves from '@/directive/waves' // Waves directive
|
||||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||||
import MyRepository from './MyRepository'
|
import MyRepository from './MyRepository'
|
||||||
|
@ -171,16 +181,9 @@ export default {
|
||||||
},
|
},
|
||||||
sourceTypeFilter(status) {
|
sourceTypeFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
1: _that.$t('updates.cgdhd'),
|
1: _that.$t('updates.cgsq'),
|
||||||
2: _that.$t('Hmodule.Nosource'),
|
2: _that.$t('updates.cgxq'),
|
||||||
3: _that.$t('updates.cgrkd')
|
3: _that.$t('Hmodule.Nosource')
|
||||||
}
|
|
||||||
return statusMap[status]
|
|
||||||
},
|
|
||||||
isRedFilter(status) {
|
|
||||||
const statusMap = {
|
|
||||||
1: '否',
|
|
||||||
2: '是'
|
|
||||||
}
|
}
|
||||||
return statusMap[status]
|
return statusMap[status]
|
||||||
}
|
}
|
||||||
|
@ -246,10 +249,12 @@ export default {
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
// 采购申请查询加展示参数
|
// 采购申请查询加展示参数
|
||||||
getemplist: {
|
getemplist: {
|
||||||
pageNum: 1,
|
pagenum: 1,
|
||||||
pageSize: 10,
|
pagesize: 10,
|
||||||
|
judgeStat: 2,
|
||||||
repositoryId: this.$store.getters.repositoryId,
|
repositoryId: this.$store.getters.repositoryId,
|
||||||
regionIds: this.$store.getters.regionIds,
|
regionIds: this.$store.getters.regionIds,
|
||||||
|
isActive: 1,
|
||||||
supplierId: this.supp
|
supplierId: this.supp
|
||||||
},
|
},
|
||||||
visible2: {},
|
visible2: {},
|
||||||
|
@ -359,23 +364,23 @@ export default {
|
||||||
getlist() {
|
getlist() {
|
||||||
// 采购入库单列表数据
|
// 采购入库单列表数据
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
stockInvoiceList(this.getemplist).then(res => {
|
stockenterlist(this.getemplist).then(res => {
|
||||||
if (res.data.ret === 200) {
|
if (res.data.ret === 200) {
|
||||||
this.list = res.data.data.content.list
|
this.list = res.data.data.content.list
|
||||||
// for (let i = 0; i < this.list.length; i++) {
|
for (let i = 0; i < this.list.length; i++) {
|
||||||
// for (let j = 0; j < this.list[i].stockEnterDetailVos.length; j++) {
|
for (let j = 0; j < this.list[i].stockEnterDetailVos.length; j++) {
|
||||||
// if (this.list[i].stockEnterDetailVos[j].invoiceQuantity === this.list[i].stockEnterDetailVos[j].actualEnterQuantity) {
|
if (this.list[i].stockEnterDetailVos[j].invoiceQuantity === this.list[i].stockEnterDetailVos[j].actualEnterQuantity) {
|
||||||
// this.list[i].stockEnterDetailVos.splice(j, 1)
|
this.list[i].stockEnterDetailVos.splice(j, 1)
|
||||||
// j--
|
j--
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// for (let i = 0; i < this.list.length; i++) {
|
for (let i = 0; i < this.list.length; i++) {
|
||||||
// if (this.list[i].stockEnterDetailVos.length === 0) {
|
if (this.list[i].stockEnterDetailVos.length === 0) {
|
||||||
// this.list.splice(i, 1)
|
this.list.splice(i, 1)
|
||||||
// i--
|
i--
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
this.total = res.data.data.content.totalCount
|
this.total = res.data.data.content.totalCount
|
||||||
this.memoryChecked()
|
this.memoryChecked()
|
||||||
}
|
}
|
||||||
|
@ -457,7 +462,82 @@ export default {
|
||||||
// 确认添加数据
|
// 确认添加数据
|
||||||
async handleConfirm() {
|
async handleConfirm() {
|
||||||
this.employeeVisible = false
|
this.employeeVisible = false
|
||||||
this.$emit('enterinfo', this.choosedata)
|
console.log(this.choosedata)
|
||||||
|
// const enterdata = this.choosedata.stockEnterDetailVos
|
||||||
|
// const number = this.choosedata.enterNumber
|
||||||
|
const enterdata = []
|
||||||
|
for (const i in this.moreaction) {
|
||||||
|
for (let j = 0; j < this.moreaction[i].stockEnterDetailVos.length; j++) {
|
||||||
|
this.moreaction[i].stockEnterDetailVos[j].sourceNumber = this.moreaction[i].enterNumber
|
||||||
|
enterdata.push(this.moreaction[i].stockEnterDetailVos[j])
|
||||||
|
}
|
||||||
|
// this.moreaction[i].stockEnterDetailVos.sourceNumber = this.moreaction[i].enterNumber
|
||||||
|
// enterdata.push(this.moreaction[i].stockEnterDetailVos)
|
||||||
|
}
|
||||||
|
const enterDetail = enterdata.map(function(item) {
|
||||||
|
return {
|
||||||
|
productCode: item.productCode,
|
||||||
|
productName: item.productName,
|
||||||
|
productType: item.productType,
|
||||||
|
typeName: item.productType,
|
||||||
|
typeId: item.typeId,
|
||||||
|
unit: item.unit,
|
||||||
|
color: item.color,
|
||||||
|
arrivalQuantity: item.arrivalQuantity,
|
||||||
|
retreatQuantity: 0,
|
||||||
|
retreatReason: '',
|
||||||
|
sourceNumber: item.sourceNumber,
|
||||||
|
sourceSerialNumber: item.id,
|
||||||
|
remark: item.remark,
|
||||||
|
quantity: item.actualEnterQuantity,
|
||||||
|
quantity2: item.actualEnterQuantity,
|
||||||
|
price: item.enterPrice,
|
||||||
|
includeTaxPrice: (item.enterPrice * (1 + item.taxRate)).toFixed(2),
|
||||||
|
taxRate: item.taxRate,
|
||||||
|
money: item.money,
|
||||||
|
includeTaxMoney: item.includeTaxMoney,
|
||||||
|
taxMoney: item.taxMoney,
|
||||||
|
discountMoney: 0.0,
|
||||||
|
discountRate: 0.0,
|
||||||
|
orderNumber: item.orderNumber,
|
||||||
|
actualEnterQuantity: item.actualEnterQuantity,
|
||||||
|
invoiceQuantity: item.invoiceQuantity
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('enterDetail==============================>', enterDetail)
|
||||||
|
for (let i = 0; i < enterDetail.length; i++) {
|
||||||
|
for (let j = 0; j < this.checklistprop.length; j++) {
|
||||||
|
if (enterDetail[i].sourceNumber === this.checklistprop[j]) {
|
||||||
|
console.log('i======================>', enterDetail[i].sourceNumber)
|
||||||
|
// enterDetail.splice(i, 1)
|
||||||
|
// i--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const myenterDetail = enterDetail
|
||||||
|
const obj = {}
|
||||||
|
const processaction = this.moreaction.reduce((cur, next) => {
|
||||||
|
obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
|
||||||
|
return cur
|
||||||
|
}, [])
|
||||||
|
console.log('processaction', processaction)
|
||||||
|
const cancelid = []
|
||||||
|
console.log('添加标志=====================>', this.flagarr)
|
||||||
|
// checklistprop在flagarr有在moreaction没有说明取消,否则未取消
|
||||||
|
this.checklistprop.forEach(item => {
|
||||||
|
console.log(item)
|
||||||
|
var index = processaction.findIndex(myindex => myindex.enterNumber === item)
|
||||||
|
console.log('index', index)
|
||||||
|
console.log(this.flagarr.includes(item), !processaction.includes(item))
|
||||||
|
if (this.flagarr.includes(item) && index) {
|
||||||
|
cancelid.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('取消的id', cancelid)
|
||||||
|
console.log(myenterDetail)
|
||||||
|
this.$store.dispatch('getmyflagApproval', cancelid)
|
||||||
|
this.$emit('enter', myenterDetail)
|
||||||
|
this.$emit('enterinfo', this.moreaction)
|
||||||
}
|
}
|
||||||
// 仓库管理员选择结束
|
// 仓库管理员选择结束
|
||||||
}
|
}
|
||||||
|
|
484
src/views/StockInvoice/components/MyInvoice.vue
Normal file
484
src/views/StockInvoice/components/MyInvoice.vue
Normal file
|
@ -0,0 +1,484 @@
|
||||||
|
<template>
|
||||||
|
<el-dialog :visible.sync="employeeVisible" :entercontrol="entercontrol" :supp="supp" :close-on-press-escape="false" top="10px" title="选择采购入库单" append-to-body width="1100px" @close="$emit('update:entercontrol', false)">
|
||||||
|
<el-card class="box-card" style="margin-top: 15px;height: 60px;padding-left:0 " shadow="never">
|
||||||
|
<el-row>
|
||||||
|
<el-form ref="getemplist" :model="getemplist" style="margin-top: -9px">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="getemplist.title" :placeholder="$t('Stockenter.title')" clearable @keyup.enter.native="handleFilter"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3" style="margin-left: 5px">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="getemplist.enterNumber" :placeholder="$t('Stockenter.enterNumber')" clearable @keyup.enter.native="handleFilter"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3" style="margin-left: 20px">
|
||||||
|
<el-form-item>
|
||||||
|
<el-input v-model="deliveryPersonId" :placeholder="$t('Stockenter.deliveryPersonId')" clearable @keyup.enter.native="handleFilter" @focus="handlechooseDelivery" @clear="restFilter2"/>
|
||||||
|
</el-form-item>
|
||||||
|
<my-delivery :deliverycontrol.sync="deliverycontrol" @deliveryName="deliveryName"/>
|
||||||
|
</el-col>
|
||||||
|
<!--更多搜索条件-->
|
||||||
|
<!-- <el-col :span="3" style="margin-left: 30px">-->
|
||||||
|
<!-- <el-popover-->
|
||||||
|
<!-- v-model="visible2"-->
|
||||||
|
<!-- placement="bottom"-->
|
||||||
|
<!-- width="500"-->
|
||||||
|
<!-- trigger="click">-->
|
||||||
|
<!-- <el-select v-model="getemplist.enterDeptId" placeholder="请选择入库部门" clearable style="width: 40%;float: left;margin-left: 20px">-->
|
||||||
|
<!-- <el-option-->
|
||||||
|
<!-- v-for="(item, index) in depts"-->
|
||||||
|
<!-- :key="index"-->
|
||||||
|
<!-- :value="item.id"-->
|
||||||
|
<!-- :label="item.deptName"/>-->
|
||||||
|
<!-- </el-select>-->
|
||||||
|
<!-- <el-input v-model="enterRepositoryId" placeholder="请选择入库仓库" class="filter-item" clearable style="width: 40%;float: left;margin-left: 20px" @keyup.enter.native="handleFilter" @focus="handlechooseRep"/>-->
|
||||||
|
<!-- <my-repository :repositorycontrol.sync="repositorycontrol" @repositoryname="repositoryname"/>-->
|
||||||
|
<!-- <el-input v-model="acceptPersonId" :placeholder="$t('Stockenter.acceptPersonId')" class="filter-item" clearable style="width: 40%;float: left;margin-left: 20px;margin-top: 20px" @keyup.enter.native="handleFilter" @focus="handlechooseAccept"/>-->
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="date"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="-"-->
|
||||||
|
<!-- unlink-panels-->
|
||||||
|
<!-- start-placeholder="Start"-->
|
||||||
|
<!-- end-placeholder="End"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- style="margin-top: 20px;margin-left: 20px"/>-->
|
||||||
|
<!-- <div class="seachbutton" style="width: 100%;float: right;margin-top: 20px">-->
|
||||||
|
<!-- <el-button v-waves class="filter-item" type="primary" style="float: right" round @click="handleFilter">{{ $t('public.search') }}</el-button>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- <el-button v-waves slot="reference" type="primary" class="filter-item" style="width: 130px" @click="visible2 = !visible2">{{ $t('public.filter') }}<svg-icon icon-class="shaixuan" style="margin-left: 4px"/></el-button>-->
|
||||||
|
<!-- </el-popover>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="3" style="margin-left: 20px">
|
||||||
|
<!-- 搜索按钮 -->
|
||||||
|
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="box-card" style="margin-top: 15px" shadow="never">
|
||||||
|
<!-- 列表开始1.13 -->
|
||||||
|
<el-table
|
||||||
|
v-loading="listLoading"
|
||||||
|
ref="multipleTable"
|
||||||
|
:key="tableKey"
|
||||||
|
:data="list"
|
||||||
|
:row-key="getRowKeys"
|
||||||
|
border
|
||||||
|
fit
|
||||||
|
highlight-current-row
|
||||||
|
style="width: 100%;"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
@selection-change="handleSelectionChange">
|
||||||
|
<el-table-column :label="$t('public.id')" :resizable="false" fixed="left" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="link-type">{{ scope.row.number }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.sourceType')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.sourceType | sourceTypeFilter }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.invoiceNumber')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.invoiceNumber }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.supplierId')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.supplierName }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.isRed')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.isRed | isRedFilter }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.createDate')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.createDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('StockInvoice.payDate')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.payDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('public.judgeStat')" :resizable="false" prop="judgeStat" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.judgeStat | judgeStatFilter }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('public.receiptStat')" :resizable="false" align="center" min-width="150">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- 列表结束 -->
|
||||||
|
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
|
||||||
|
<!--修改开始=================================================-->
|
||||||
|
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-bottom: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
|
||||||
|
</el-card>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { stockenterlist } from '@/api/Stockenter'
|
||||||
|
import { getdeptlist } from '@/api/BasicSettings'
|
||||||
|
import { stockInvoiceList } from '@/api/StockInvoice'
|
||||||
|
import waves from '@/directive/waves' // Waves directive
|
||||||
|
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||||
|
import MyRepository from './MyRepository'
|
||||||
|
import MySupplier from './MySupplier'
|
||||||
|
import MyEmp from './MyEmp'
|
||||||
|
import MyDelivery from './MyDelivery'
|
||||||
|
import MyDetail from './MyDetail'
|
||||||
|
import DetailList from './DetailList'
|
||||||
|
var _that
|
||||||
|
export default {
|
||||||
|
directives: { waves },
|
||||||
|
components: { DetailList, Pagination, MyRepository, MySupplier, MyEmp, MyDelivery, MyDetail },
|
||||||
|
filters: {
|
||||||
|
judgeStatFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
0: _that.$t('updates.wsh'),
|
||||||
|
1: _that.$t('updates.shz'),
|
||||||
|
2: _that.$t('Hmodule.shtg'),
|
||||||
|
3: _that.$t('Hmodule.shbtg')
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
receiptStatFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: _that.$t('updates.zd'),
|
||||||
|
2: _that.$t('updates.zx'),
|
||||||
|
3: _that.$t('updates.jd')
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
stockTypeFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: '采购1'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
sourceTypeFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: _that.$t('updates.cgdhd'),
|
||||||
|
2: _that.$t('Hmodule.Nosource'),
|
||||||
|
3: _that.$t('updates.cgrkd')
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
},
|
||||||
|
isRedFilter(status) {
|
||||||
|
const statusMap = {
|
||||||
|
1: '否',
|
||||||
|
2: '是'
|
||||||
|
}
|
||||||
|
return statusMap[status]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
entercontrol: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
supp: {
|
||||||
|
type: Number,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
checklist: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 获取row的key值
|
||||||
|
getRowKeys(row) {
|
||||||
|
return row.id
|
||||||
|
},
|
||||||
|
// 选择框控制
|
||||||
|
employeeVisible: this.entercontrol,
|
||||||
|
// 类别获取参数
|
||||||
|
typeparms: {
|
||||||
|
pagenum: 1,
|
||||||
|
pagesize: 99999
|
||||||
|
},
|
||||||
|
// 入库仓库回显
|
||||||
|
enterRepositoryId: '',
|
||||||
|
// 仓库选择控制期
|
||||||
|
repositorycontrol: false,
|
||||||
|
// 验收人回显
|
||||||
|
acceptPersonId: '',
|
||||||
|
// 验收人控制框
|
||||||
|
accetpcontrol: false,
|
||||||
|
// 交货人回显
|
||||||
|
deliveryPersonId: '',
|
||||||
|
// 交货人控制框
|
||||||
|
deliverycontrol: false,
|
||||||
|
// 部门数据
|
||||||
|
depts: [],
|
||||||
|
// 采购员控制框
|
||||||
|
stockControl: false,
|
||||||
|
// 采购员回显
|
||||||
|
stockPersonId: '',
|
||||||
|
// 批量操作
|
||||||
|
moreaction: '',
|
||||||
|
// 加载操作控制
|
||||||
|
downloadLoading: false,
|
||||||
|
// 表格数据
|
||||||
|
list: [],
|
||||||
|
// 表格数据条数
|
||||||
|
total: 0,
|
||||||
|
// 表格识别
|
||||||
|
tableKey: 0,
|
||||||
|
// 加载表格
|
||||||
|
listLoading: true,
|
||||||
|
// 采购申请查询加展示参数
|
||||||
|
getemplist: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
repositoryId: this.$store.getters.repositoryId,
|
||||||
|
regionIds: this.$store.getters.regionIds,
|
||||||
|
supplierId: this.supp
|
||||||
|
},
|
||||||
|
visible2: {},
|
||||||
|
// 传给组件的数据
|
||||||
|
personalForm: {},
|
||||||
|
personalForm2: {},
|
||||||
|
// 修改控制组件数据
|
||||||
|
editVisible: false,
|
||||||
|
// 开始时间到结束时间
|
||||||
|
date: [],
|
||||||
|
checklistprop: this.checklist,
|
||||||
|
flagarr: [],
|
||||||
|
myarr: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
entercontrol() {
|
||||||
|
this.employeeVisible = this.entercontrol
|
||||||
|
this.getlist()
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.multipleTable.clearSelection()
|
||||||
|
}, 0)
|
||||||
|
this.flagarr = []
|
||||||
|
this.moreaction = []
|
||||||
|
},
|
||||||
|
supp() {
|
||||||
|
this.getemplist.supplierId = this.supp
|
||||||
|
this.getlist()
|
||||||
|
console.log(this.supp)
|
||||||
|
},
|
||||||
|
checklist() {
|
||||||
|
const mychecklistprop = this.checklist.map(item => {
|
||||||
|
return item.sourceNumber
|
||||||
|
})
|
||||||
|
this.checklistprop = Array.from(new Set(mychecklistprop))
|
||||||
|
console.log('this.checklistprop==============>', this.checklistprop)
|
||||||
|
// const needarr = this.$refs.multipleTable.selection
|
||||||
|
// const delearr = this.checklistprop
|
||||||
|
// const add = needarr.filter(item => !delearr.some(ele => ele === item.id))
|
||||||
|
// console.log('add', add)
|
||||||
|
// for (const i in this.$refs.multipleTable.selection) {
|
||||||
|
// for (const j in add) {
|
||||||
|
// if (this.$refs.multipleTable.selection[i].code === add[j].code) {
|
||||||
|
// this.$refs.multipleTable.selection.splice(i, 1)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// console.log('this.$refs.multipleTable.selection', this.$refs.multipleTable.selection)
|
||||||
|
// if (this.checklistprop) {
|
||||||
|
// this.checklistprop.forEach(row => {
|
||||||
|
// if (row) {
|
||||||
|
// this.select_orderId.push(row.productCode)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
beforeCreate() {
|
||||||
|
_that = this
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 默认选中
|
||||||
|
memoryChecked() {
|
||||||
|
console.log('我执行啦')
|
||||||
|
this.list.forEach((row, index) => {
|
||||||
|
if (this.checklistprop.includes(row.enterNumber)) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(row, true)
|
||||||
|
// myarr = []
|
||||||
|
this.myarr.push(row.enterNumber)
|
||||||
|
this.flagarr = Array.from(new Set(this.myarr))
|
||||||
|
console.log('this.flagarr=====================>', this.flagarr)
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(row, false)
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSelectionChange(rows) {
|
||||||
|
// console.log(val)
|
||||||
|
// this.moreaction = val
|
||||||
|
console.log('myrows==========>', rows)
|
||||||
|
const obj = {}
|
||||||
|
const processaction = rows.reduce((cur, next) => {
|
||||||
|
obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
|
||||||
|
return cur
|
||||||
|
}, [])
|
||||||
|
this.moreaction = processaction
|
||||||
|
console.log('this.moreaction===>', this.moreaction)
|
||||||
|
this.select_order_number = this.moreaction.length
|
||||||
|
this.select_orderId = []
|
||||||
|
if (rows) {
|
||||||
|
rows.forEach(row => {
|
||||||
|
if (row) {
|
||||||
|
this.select_orderId.push(row.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('this.select_orderId', this.select_orderId)
|
||||||
|
},
|
||||||
|
// 更新采购类型
|
||||||
|
updatecountry() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
getlist() {
|
||||||
|
// 采购入库单列表数据
|
||||||
|
this.listLoading = true
|
||||||
|
stockInvoiceList(this.getemplist).then(res => {
|
||||||
|
if (res.data.ret === 200) {
|
||||||
|
this.list = res.data.data.content.list
|
||||||
|
// for (let i = 0; i < this.list.length; i++) {
|
||||||
|
// for (let j = 0; j < this.list[i].stockEnterDetailVos.length; j++) {
|
||||||
|
// if (this.list[i].stockEnterDetailVos[j].invoiceQuantity === this.list[i].stockEnterDetailVos[j].actualEnterQuantity) {
|
||||||
|
// this.list[i].stockEnterDetailVos.splice(j, 1)
|
||||||
|
// j--
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// for (let i = 0; i < this.list.length; i++) {
|
||||||
|
// if (this.list[i].stockEnterDetailVos.length === 0) {
|
||||||
|
// this.list.splice(i, 1)
|
||||||
|
// i--
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
this.total = res.data.data.content.totalCount
|
||||||
|
this.memoryChecked()
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.listLoading = false
|
||||||
|
}, 0.5 * 100)
|
||||||
|
})
|
||||||
|
// 部门列表数据
|
||||||
|
getdeptlist().then(res => {
|
||||||
|
if (res.data.ret === 200) {
|
||||||
|
this.depts = res.data.data.content
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 清空搜索条件
|
||||||
|
restFilter() {
|
||||||
|
this.enterRepositoryId = ''
|
||||||
|
this.getemplist.enterRepositoryId = ''
|
||||||
|
},
|
||||||
|
restFilter2() {
|
||||||
|
this.deliveryPersonId = ''
|
||||||
|
this.getemplist.deliveryPersonId = ''
|
||||||
|
},
|
||||||
|
restFilter3() {
|
||||||
|
this.acceptPersonId = ''
|
||||||
|
this.getemplist.acceptPersonId = ''
|
||||||
|
},
|
||||||
|
// 搜索
|
||||||
|
handleFilter() {
|
||||||
|
this.getemplist.pagenum = 1
|
||||||
|
stockenterlist(this.getemplist).then(res => {
|
||||||
|
if (res.data.ret === 200) {
|
||||||
|
this.list = res.data.data.content.list
|
||||||
|
this.total = res.data.data.content.totalCount
|
||||||
|
this.memoryChecked()
|
||||||
|
// this.restFilter()
|
||||||
|
} else {
|
||||||
|
// this.restFilter()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 仓库列表focus事件触发
|
||||||
|
handlechooseRep() {
|
||||||
|
this.repositorycontrol = true
|
||||||
|
},
|
||||||
|
repositoryname(val) {
|
||||||
|
console.log(val)
|
||||||
|
this.enterRepositoryId = val.repositoryName
|
||||||
|
this.getemplist.enterRepositoryId = val.id
|
||||||
|
},
|
||||||
|
// 部门列表focus刷新
|
||||||
|
updatedept() {
|
||||||
|
this.getlist()
|
||||||
|
},
|
||||||
|
// 交货人foucs事件触发
|
||||||
|
handlechooseDelivery() {
|
||||||
|
this.deliverycontrol = true
|
||||||
|
},
|
||||||
|
deliveryName(val) {
|
||||||
|
this.deliveryPersonId = val.personName
|
||||||
|
this.getemplist.deliveryPersonId = val.id
|
||||||
|
},
|
||||||
|
// 验收人focus事件触发
|
||||||
|
handlechooseAccept() {
|
||||||
|
this.accetpcontrol = true
|
||||||
|
},
|
||||||
|
acceptName(val) {
|
||||||
|
this.acceptPersonId = val.personName
|
||||||
|
this.getemplist.acceptPersonId = val.id
|
||||||
|
},
|
||||||
|
// 新增数据
|
||||||
|
handleAdd() {
|
||||||
|
this.$router.push('/Stockenter/addstockenter')
|
||||||
|
},
|
||||||
|
// 选择主生产计划数据时的操作
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.choosedata = val
|
||||||
|
},
|
||||||
|
// 确认添加数据
|
||||||
|
async handleConfirm() {
|
||||||
|
this.employeeVisible = false
|
||||||
|
this.$emit('enterinfo', this.choosedata)
|
||||||
|
}
|
||||||
|
// 仓库管理员选择结束
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.ERP-container {
|
||||||
|
margin: 50px 30px;
|
||||||
|
}
|
||||||
|
.filter-item{
|
||||||
|
width: 140px;
|
||||||
|
}
|
||||||
|
.form-name{
|
||||||
|
font-size: 18px;
|
||||||
|
color: #373e4f;
|
||||||
|
margin-bottom: -20px;
|
||||||
|
margin-top: 30px;
|
||||||
|
}
|
||||||
|
.container{
|
||||||
|
margin-top: 2%;
|
||||||
|
border: 1px solid #eceff6;
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in a new issue