fix: 修改报表问题

This commit is contained in:
shawnzhang 2021-08-03 09:41:43 +08:00
parent 9e7030a8c3
commit a377ddf689
108 changed files with 2658 additions and 336 deletions

View file

@ -204,7 +204,7 @@ export function addInstallmentFirst(query) {
export function updateInstallmentFirst(query) {
var params = new URLSearchParams()
if (query.id) {
params.append('firstId', query.id) // 你要传给后台的参数值 key/value
params.append('id', query.id) // 你要传给后台的参数值 key/value
}
if (query.repositoryIds) {
params.append('repositoryIds', query.repositoryIds) // 你要传给后台的参数值 key/value
@ -238,6 +238,9 @@ export function installmentFirstList(query) {
if (query.repositoryId) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
if (query.typeId) {
params.append('typeId', query.typeId) // 你要传给后台的参数值 key/value
}
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
@ -247,3 +250,16 @@ export function installmentFirstList(query) {
data: params
})
}
// 删除分期首付设置
export function deleteInstallmentFirst(query) {
var params = new URLSearchParams()
if (query !== '' && query !== null) {
params.append('firstId', query) // 你要传给后台的参数值 key/value
}
return request({
url: '/installmentrate/deleteInstallmentFirst',
method: 'post',
data: params
})
}

View file

@ -320,8 +320,12 @@ export function adjustlist(query) {
}
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
if (query.regionIds !== '' && query.regionIds !== null && query.regionIds !== undefined) {
params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
}
if (query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
return request({
url: '/locationadjust/adjustlist',
method: 'post',

View file

@ -13,9 +13,9 @@ export default {
NewOutSouringAdjust: 'NewOutSouringAdjust',
ReviewPackage: 'ReviewPackage',
NewReviewPackage: 'NewReviewPackage',
moveCount: 'moveCount',
outSourceCount: 'outSourceCount',
outSourceDetail: 'outSourceDetail',
MoveCount: 'moveCount',
OutSourceCount: 'outSourceCount',
OutSourceDetail: 'outSourceDetail',
accessCount: 'accessCount',
batchTrack: 'Material batch tracking report',
productSendAndReceiveDetail: 'Material collection details',
@ -392,9 +392,9 @@ export default {
stockOrderExecute: 'purchase order execute status ',
inventorycount: 'inventory statistics',
inventoryCollect: 'stocks inventory summary report',
moveDetailList: 'stocks transfer detail report',
MoveDetailList: 'stocks transfer detail report',
inventoryFluid: 'stocks record',
productSendAndReceive: 'material receive and send summary',
ProductSendAndReceive: 'material receive and send summary',
inventorychangelist: 'inventory monthly report',
inventorydetaillist: 'stock details',
SaleReport: 'sales report',

View file

@ -13,9 +13,9 @@ export default {
NewOutSouringAdjust: '新建外包工厂调价单',
ReviewPackage: '审核套餐包',
NewReviewPackage: '新建审核套餐包',
moveCount: '调拨汇总表',
outSourceCount: '委外出入库汇总',
outSourceDetail: '委外出入库明细',
MoveCount: '调拨汇总表',
OutSourceCount: '委外出入库汇总',
OutSourceDetail: '委外出入库明细',
accessCount: '领料汇总',
batchTrack: '物料批次跟踪报表',
productSendAndReceiveDetail: '物料收发明细',
@ -392,9 +392,9 @@ export default {
stockOrderExecute: '采购订单执行情况表',
inventorycount: '库存统计',
inventoryCollect: '商品库存汇总表',
moveDetailList: '调拨明细报表',
MoveDetailList: '调拨明细报表',
inventoryFluid: '商品库存流水表',
productSendAndReceive: '物料收发汇总',
ProductSendAndReceive: '物料收发汇总',
inventorychangelist: '库存月报表',
inventorydetaillist: '商品库存明细表',
SaleReport: '销售统计',
@ -4680,6 +4680,7 @@ export default {
shenghcang: '生产类型',
feishengchanleixing: '非生产类型',
weishuijine: '未税金额',
caigoufapiaodanjubianhao: '采购发票单据编号'
caigoufapiaodanjubianhao: '采购发票单据编号',
zuidishoufu: '最低首付'
}
}

View file

@ -3225,16 +3225,16 @@ export const asyncRouterMap = [
meta: { title: 'inventoryCollect', noCache: false, roles: ['311-312-318-4'] }
},
{
path: 'moveDetailList',
path: 'MoveDetailList',
component: () => import('@/views/inventorycount2/moveDetailList'),
name: 'moveDetailList',
meta: { title: 'moveDetailList', noCache: false, roles: ['311-312-319-4'] }
name: 'MoveDetailList',
meta: { title: 'MoveDetailList', noCache: false, roles: ['311-312-319-4'] }
},
{
path: 'moveCount',
path: 'MoveCount',
component: () => import('@/views/inventorycount2/moveCount'),
name: 'moveCount',
meta: { title: 'moveCount', noCache: false, roles: ['311-312-405-4'] }
name: 'MoveCount',
meta: { title: 'MoveCount', noCache: false, roles: ['311-312-405-4'] }
},
{
path: 'inventoryFluid',
@ -3243,10 +3243,10 @@ export const asyncRouterMap = [
meta: { title: 'inventoryFluid', noCache: false, roles: ['311-312-320-4'] }
},
{
path: 'productSendAndReceive',
path: 'ProductSendAndReceive',
component: () => import('@/views/inventorycount2/productSendAndReceive'),
name: 'productSendAndReceive',
meta: { title: 'productSendAndReceive', noCache: false, roles: ['311-312-321-4'] }
name: 'ProductSendAndReceive',
meta: { title: 'ProductSendAndReceive', noCache: false, roles: ['311-312-321-4'] }
},
// {
// path: 'wuxiinventorychangelist',
@ -3291,16 +3291,16 @@ export const asyncRouterMap = [
meta: { title: 'productSendAndReceiveDetail', noCache: false, roles: ['311-312-400-4'] }
},
{
path: 'outSourceDetail',
path: 'OutSourceDetail',
component: () => import('@/views/inventorycount2/outSourceDetail'),
name: 'outSourceDetail',
meta: { title: 'outSourceDetail', noCache: false, roles: ['311-312-402-4'] }
name: 'OutSourceDetail',
meta: { title: 'OutSourceDetail', noCache: false, roles: ['311-312-402-4'] }
},
{
path: 'outSourceCount',
path: 'OutSourceCount',
component: () => import('@/views/inventorycount2/outSourceCount'),
name: 'outSourceCount',
meta: { title: 'outSourceCount', noCache: false, roles: ['311-312-403-4'] }
name: 'OutSourceCount',
meta: { title: 'OutSourceCount', noCache: false, roles: ['311-312-403-4'] }
}
]
},

View file

@ -174,7 +174,7 @@
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview(scope.row)">
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>

View file

@ -94,7 +94,7 @@
<template slot-scope="scope">
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.changeNumber }}</span>
</template>
<detail-list :detailcontrol.sync="detailvisible" :detaildata.sync="personalForm"/>
<detail-list :detailcontrol.sync="detailvisible" :detaildata.sync="personalForm" @rest="refreshlist"/>
</el-table-column>
<el-table-column :label="$t('ChangeCount.title')" :resizable="false" fixed="left" align="center" min-width="150">
<template slot-scope="scope">
@ -160,7 +160,6 @@
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="230">
<template slot-scope="scope">
<el-button v-permission2="['200-204-3', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&scope.row.receiptStat === 1" :key="scope.row.id + Math.random()" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-show="isReview(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview(scope.row)"/>
<el-button v-permission2="['200-204-2', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :key="scope.row.id + Math.random()" :title="$t('updates.sc')" scope-row-create-person-id- size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
</template>
</el-table-column>

View file

@ -181,6 +181,12 @@
</el-row>
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>
</div>
</el-card>
</div>
</el-dialog>
@ -188,6 +194,8 @@
<script>
var _that
import { updatechange2 } from '@/api/ChangeCount'
export default {
filters: {
sourceTypeFilter(status) {
@ -256,6 +264,76 @@ export default {
_that = this
},
methods: {
//
isReview() {
if (this.personalForm.approvalUseVos && this.personalForm.approvalUseVos.length !== 0) {
const approvalUse = this.personalForm.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
console.log(approvalUse[approvalUse.length - 1].stepHandler)
console.log(index)
console.log('index', index)
if (index > -1 && (this.personalForm.judgeStat === 1 || this.personalForm.judgeStat === 0)) {
return true
}
}
},
//
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)
updatechange2(parms).then(res => {
if (res.data.ret === 200) {
this.$message({
type: 'success',
message: this.$t('prompt.shcg')
})
this.editVisible = false
this.$emit('rest', true)
}
})
}).catch(action => {
if (action === 'cancel') {
//
this.$confirm('comfirm not approved?', 'Warning', {
distinguishCancelAndClose: true,
confirmButtonText: 'confirm',
cancelButtonText: 'cancel'
})
.then(() => {
this.reviewParms.judgeStat = 3
const parms = JSON.stringify(this.reviewParms)
updatechange2(parms).then(res => {
if (res.data.ret === 200) {
this.$message({
type: 'success',
message: this.$t('prompt.shcg')
})
this.editVisible = false
this.$emit('rest', true)
}
})
})
.catch(action => {
this.$message({
type: 'info',
message: action === 'cancel'
? 'confirm'
: 'stay this page'
})
})
// ================
}
})
},
handlecancel() {
this.editVisible = false
}

View file

@ -143,6 +143,7 @@
<el-button v-permission2="['227-233-3', scope.row.createPersonId]" v-if="scope.row.judgeStat === 0" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-permission2="['227-233-2', scope.row.createPersonId]" v-if="scope.row.judgeStat === 0" :title="$t('updates.sc')" size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
<el-button v-permission="['227-233-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['227-233-17']" v-show="isReview3(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fjd')" type="success" size="mini" icon="el-icon-back" circle @click="handleReview3(scope.row)"/>
</template>
</el-table-column>
@ -294,6 +295,36 @@ export default {
_that = this
},
methods: {
//
isReview3(row) {
// console.log(row)
if (row.receiptStat === 3) {
return true
}
},
//
handleReview3(row) {
this.reviewParms = {}
this.reviewParms.id = row.id
this.reviewParms.endPersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfjd'), this.$t('prompt.fjd'), {
distinguishCancelAndClose: true,
confirmButtonText: this.$t('prompt.fjd'),
type: 'warning'
}).then(() => {
this.reviewParms.receiptStat = 2
const parms = JSON.stringify(this.reviewParms)
updatecheckfail2(parms).then(res => {
if (res.data.ret === 200) {
this.$message({
type: 'success',
message: this.$t('prompt.fjdcg')
})
this.getlist()
}
})
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -262,7 +262,7 @@ export default {
checkResult: 2,
pageNum: 1,
pageSize: 50,
judgeStat: 2,
// judgeStat: 2,
repositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
isActive: 1

View file

@ -256,8 +256,8 @@ export default {
}, 100)
},
mounted() {
this.getlist()
this.getCategory()
// this.getlist()
// this.getCategory()
// this.getrepos()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140

View file

@ -88,7 +88,7 @@
@selection-change="handleSelectionChange">
<el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index"/>
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<el-editable-column :edit-render="{name: 'ElSelect',type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="margin-left: 18px;width: 100%;margin-bottom: 0" @visible-change="updatebatch($event,scope)">
<el-option

View file

@ -700,7 +700,7 @@
import { validateEmail } from '@/utils/validate'
import '@/directive/noMoreClick/index.js'
import { addinstallmentapply, confirmPhone, confirmAddress, confirmName } from '@/api/InstallmentApply'
import { ratelist } from '@/api/Installmentrate'
import { ratelist, installmentFirstList } from '@/api/Installmentrate'
import { adjustlist } from '@/api/AdjustPrice'
import { getprovincelist, getcitylist, existList, vehicleInfo } from '@/api/public'
import MyEmp from './components/MyEmp'
@ -837,7 +837,7 @@ export default {
const validisnumber = (rule, value, callback) => {
console.log('value', value)
if (value === null || value === undefined || value === '') {
callback()
callback(new Error('phone number is wrong'))
}
if (value !== null && value !== undefined && value !== '' && (this.$store.getters.useCountry === 1 || this.$store.getters.useCountry === 2)) {
var re = /^0?0[3|4|5|6|7|8|9][0-9]\d{8}$/
@ -865,7 +865,7 @@ export default {
const validisnumber2 = (rule, value, callback) => {
console.log('value', value)
if (value === null || value === undefined || value === '') {
callback()
callback(new Error('phone number is wrong'))
}
if (value !== null && value !== undefined && value !== '' && (this.$store.getters.useCountry === 1 || this.$store.getters.useCountry === 2)) {
var re = /^0?0[3|4|5|6|7|8|9][0-9]\d{8}$/
@ -2048,7 +2048,20 @@ export default {
}, 5000)
},
//
handlesave() {
async handlesave() {
const parms3 = {
repositoryId: this.personalForm.saleRepositoryId,
typeId: this.productForm.typeId,
pageNum: 1,
pageSize: 10
}
const firstMoneyResult = await installmentFirstList(parms3)
console.log('firstMoneyResult', firstMoneyResult)
// eslint-disable-next-line prefer-const
let installmentFirstmoney = 0
if (firstMoneyResult.data.data.content.list.length !== 0) {
installmentFirstmoney = firstMoneyResult.data.data.content.list[0].lowerMoney
}
if (Number(this.personalForm.firstMoney) === 0) {
this.$notify.error({
title: 'wrong',
@ -2066,7 +2079,7 @@ export default {
return false
}
if ((this.$store.getters.useCountry === '5' || this.$store.getters.useCountry === 5) && Number(this.personalForm.firstMoney) < 200) {
if ((this.$store.getters.useCountry === '5' || this.$store.getters.useCountry === 5) && Number(this.personalForm.firstMoney) < installmentFirstmoney) {
this.$notify.error({
title: 'wrong',
message: 'the down payment is wrong',
@ -2151,6 +2164,15 @@ export default {
})
return false
}
if (Number(this.personalForm.firstMoney) < installmentFirstmoney) {
this.$notify.error({
title: 'wrong',
message: 'the down payment is wrong',
offset: 100
})
return false
}
}
console.log(this.personalForm)

View file

@ -886,6 +886,7 @@ export default {
console.log(res.data.data.content.list[0])
this.editVisible = true
this.personalForm = Object.assign({}, res.data.data.content.list[0])
this.personalForm.isInvestigation = row.isInvestigation
this.personalForm.sourceType = String(res.data.data.content.list[0].sourceType)
if (res.data.data.content.list[0].workType !== null) {
this.personalForm.workType = String(res.data.data.content.list[0].workType)
@ -929,6 +930,7 @@ export default {
console.log(res.data.data.content.list[0])
this.detailvisible = true
this.personalForm = Object.assign({}, res.data.data.content.list[0])
this.personalForm.isInvestigation = row.isInvestigation
}
})
},

View file

@ -636,7 +636,7 @@
import { updateapply } from '@/api/InstallmentApply'
import { getprovincelist, getcitylist, existList, vehicleInfo } from '@/api/public'
import { adjustlist } from '@/api/AdjustPrice'
import { ratelist } from '@/api/Installmentrate'
import { ratelist, installmentFirstList } from '@/api/Installmentrate'
import MyEmp from './MyEmp'
import MyDetail from './MyDetail'
import MyMater from './MyMater'
@ -1632,7 +1632,20 @@ export default {
},
//
//
handleEditok() {
async handleEditok() {
const parms3 = {
repositoryId: this.personalForm.saleRepositoryId,
typeId: this.productForm.typeId,
pageNum: 1,
pageSize: 10
}
const firstMoneyResult = await installmentFirstList(parms3)
console.log('firstMoneyResult', firstMoneyResult)
// eslint-disable-next-line prefer-const
let installmentFirstmoney = 0
if (firstMoneyResult.data.data.content.list.length !== 0) {
installmentFirstmoney = firstMoneyResult.data.data.content.list[0].lowerMoney
}
this.personalForm.modifyPersonId = this.$store.getters.userId
if (Number(this.personalForm.firstMoney) === 0) {
this.$notify.error({
@ -1643,7 +1656,7 @@ export default {
return false
}
if ((this.$store.getters.useCountry === '5' || this.$store.getters.useCountry === 5) && Number(this.personalForm.firstMoney) < 200) {
if ((this.$store.getters.useCountry === '5' || this.$store.getters.useCountry === 5) && Number(this.personalForm.firstMoney) < installmentFirstmoney) {
this.$notify.error({
title: 'wrong',
message: 'the down payment is wrong',
@ -1728,6 +1741,15 @@ export default {
})
return false
}
if (Number(this.personalForm.firstMoney) < installmentFirstmoney) {
this.$notify.error({
title: 'wrong',
message: 'the down payment is wrong',
offset: 100
})
return false
}
}
if (this.productForm.productCode === null || this.productForm.productCode === undefined || this.productForm.productCode === '') {

View file

@ -0,0 +1,284 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :depotcontrol="depotcontrol" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:depotcontrol', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option :label="$t('updates.ty')" value="1"/>
<el-option :label="$t('updates.qy')" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
:placeholder="$t('Hmodule.xzqy')"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;float: right" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
ref="table"
:key="tableKey"
:data="list"
:height="tableHeight"
size="small"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange">
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
// eslint-disable-next-line no-unused-vars
var _that
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
depotcontrol: {
type: Boolean,
default: false
}
},
data() {
return {
tableHeight: 200,
//
choosedata: '',
//
repositoryVisible: this.depotcontrol,
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
depotcontrol() {
this.repositoryVisible = this.depotcontrol
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 180
}, 100)
}
},
beforeCreate() {
_that = this
},
methods: {
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
} else {
this.$notify.error({
title: 'wrong',
message: 'wrong',
offset: 100
})
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('depotname', this.choosedata)
this.repositoryVisible = false
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,309 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol="repositorycontrol" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option :label="$t('updates.qy')" value="1"/>
<el-option :label="$t('updates.ty')" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
:placeholder="$t('Hmodule.xzqy')"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;float: right" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
ref="multipleTable"
:height="tableHeight"
:key="tableKey"
:data="list"
:row-key="getRowKeys"
size="small"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange"
@selection-change="handleSelectionChange">
<el-table-column
:reserve-selection="true"
type="selection"
width="55"/>
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
// eslint-disable-next-line no-unused-vars
var _that
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
tableHeight: 200,
getRowKeys(row) {
return row.id
},
//
moreaction: '',
//
choosedata: '',
//
repositoryVisible: this.repositorycontrol,
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.multipleTable.$el.offsetTop - 180
}, 100)
}
},
beforeCreate() {
_that = this
},
methods: {
//
handleSelectionChange(rows) {
console.log('rows', rows)
this.moreaction = rows
// this.select_order_number = this.moreaction.length
// this.select_orderId = []
// if (rows) {
// rows.forEach(row => {
// if (row) {
// this.select_orderId.push(row.id)
// }
// })
// }
},
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
} else {
this.$notify.error({
title: 'wrong',
message: 'wrong',
offset: 100
})
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname', this.moreaction)
this.repositoryVisible = false
this.$refs.multipleTable.clearSelection()
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -0,0 +1,309 @@
<template>
<el-dialog :visible.sync="repositoryVisible" :repositorycontrol="repositorycontrol" :close-on-press-escape="false" top="10px" title="选择仓库" append-to-body @close="$emit('update:repositorycontrol', false)">
<div class="filter-container">
<!-- 搜索条件栏目 -->
<el-input v-model="getemplist.id" :placeholder="$t('Repository.id')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.repositoryName" :placeholder="$t('Repository.repositoryname')" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-select v-model="getemplist.type" :value="getemplist.type" :placeholder="$t('Repository.type2')" class="filter-item" clearable>
<el-option
v-for="(item, index) in types"
:key="index"
:value="item.id"
:label="item.categoryName"
/>
</el-select>
<el-select v-model="getemplist.iseffective" :value="getemplist.iseffective" :placeholder="$t('Repository.iseffective')" class="filter-item" clearable>
<el-option :label="$t('updates.qy')" value="1"/>
<el-option :label="$t('updates.ty')" value="2"/>
</el-select>
<el-cascader
:options="regions"
:props="props"
v-model="getemplistregions"
:show-all-levels="false"
:placeholder="$t('Hmodule.xzqy')"
change-on-select
filterable
clearable
class="filter-item"
/>
<el-select v-model="getemplist.countyrId" placeholder="请选择国家" class="filter-item" clearable>
<el-option
v-for="(item, index) in nations"
:key="index"
:label="item.name"
:value="item.id"/>
</el-select>
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" style="width: 86px" @click="handleFilter">{{ $t('public.search') }}</el-button>
<!-- 新建操作 -->
<el-button v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px;float: right" @click="handleAdd">{{ $t('public.add') }}</el-button>
</div>
<!-- 列表开始 -->
<el-table
v-loading="listLoading"
ref="multipleTable"
:height="tableHeight"
:key="tableKey"
:data="list"
:row-key="getRowKeys"
size="small"
border
fit
highlight-current-row
style="width: 100%;"
@current-change="handleCurrentChange"
@selection-change="handleSelectionChange">
<el-table-column
:reserve-selection="true"
type="selection"
width="55"/>
<el-table-column :label="$t('Repository.id')" :resizable="false" prop="id" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.repositoryname')" :resizable="false" prop="repositoryName" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.repositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.type2')" :resizable="false" prop="categoryName" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.categoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.iseffective')" :resizable="false" prop="stat" align="center" width="230">
<template slot-scope="scope">
<span>{{ scope.row.stat | iseffectiveFilter }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.managerPeople')" :resizable="false" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.managerName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('Repository.regionId')" :resizable="false" prop="regionName" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.regionName }}</span>
</template>
</el-table-column>
</el-table>
<!-- 列表结束 -->
<el-button v-waves class="filter-item" type="success" style="width: 100px;float: left;margin-top: 10px" @click="handleConfirm">{{ $t('Hmodule.sure') }}</el-button>
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pagenum" :limit.sync="getemplist.pagesize" @pagination="getlist" />
</el-dialog>
</template>
<script>
import { regionlist, getcountrylist } from '@/api/public'
import { searchRepCategory, searchRepository2 } from '@/api/Repository'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
// eslint-disable-next-line no-unused-vars
var _that
export default {
directives: { waves },
components: { Pagination },
filters: {
iseffectiveFilter(status) {
const statusMap = {
1: '启用',
2: '停用'
}
return statusMap[status]
},
genderFilter(status) {
const statusMap = {
1: '男',
2: '女'
}
return statusMap[status]
}
},
props: {
repositorycontrol: {
type: Boolean,
default: false
}
},
data() {
return {
tableHeight: 200,
getRowKeys(row) {
return row.id
},
//
moreaction: '',
//
choosedata: '',
//
repositoryVisible: this.repositorycontrol,
//
types: [],
//
nations: [],
//
downloadLoading: false,
//
list: [],
//
total: 0,
//
tableKey: 0,
//
listLoading: true,
//
getemplist: {
repositoryName: '',
type: '',
iseffective: '',
regionId: '',
countyrId: '',
id: '',
stat: 1,
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
pagenum: 1,
pagesize: 10
},
//
depts: [],
//
props: {
value: 'id',
label: 'regionName',
children: 'regionListVos'
},
//
regions: [],
getemplistregions: [],
getemplistregions0: []
}
},
watch: {
repositorycontrol() {
this.repositoryVisible = this.repositorycontrol
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.multipleTable.$el.offsetTop - 180
}, 100)
}
},
beforeCreate() {
_that = this
},
methods: {
//
handleSelectionChange(rows) {
console.log('rows', rows)
this.moreaction = rows
// this.select_order_number = this.moreaction.length
// this.select_orderId = []
// if (rows) {
// rows.forEach(row => {
// if (row) {
// this.select_orderId.push(row.id)
// }
// })
// }
},
getlist() {
//
getcountrylist().then(res => {
if (res.data.ret === 200) {
this.nations = res.data.data.content
}
})
//
this.listLoading = true
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
}
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)
})
//
searchRepCategory().then(res => {
if (res.data.ret === 200) {
console.log(res)
this.types = res.data.data.content.list
}
})
//
regionlist().then(res => {
if (res.data.ret === 200) {
this.regions = this.tranKTree(res.data.data.content)
}
})
},
//
handleFilter() {
this.getemplist.pagenum = 1
this.getemplist.regionId = this.getemplistregions[this.getemplistregions.length - 1]
console.log(this.getemplist)
searchRepository2(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
this.repositoryVisible = true
} else {
this.$notify.error({
title: 'wrong',
message: 'wrong',
offset: 100
})
}
})
},
//
handleAdd() {
this.$router.push('/Repository/NewRepository')
this.repositoryVisible = false
},
//
tranKTree(arr) {
if (!arr || !arr.length) return
return arr.map(item => ({
id: item.id,
regionName: item.regionName,
regionListVos: this.tranKTree(item.regionListVos)
}))
},
//
handleConfirm() {
this.$emit('repositoryname4', this.moreaction)
this.repositoryVisible = false
this.$refs.multipleTable.clearSelection()
},
//
handleCurrentChange(val) {
this.choosedata = val
}
}
}
</script>
<style scoped>
.ERP-container {
margin: 50px 30px;
}
.filter-item{
width: 140px;
margin-left: 20px;
}
.form-name{
font-size: 18px;
color: #373e4f;
margin-bottom: -20px;
margin-top: 30px;
}
.container{
margin-top: 2%;
border: 1px solid #eceff6;
}
</style>

View file

@ -2,11 +2,17 @@
<div class="ERP-container">
<el-card :body-style=" { padding: '5px' }" class="box-card" style="margin-top: 5px" shadow="never">
<el-input v-model="getemplist.count" :placeholder="$t('updates.fqqs')" size="small" clearable class="filter-item" @keyup.enter.native="handleFilter"/>
<el-input v-model="moveInRepository" :placeholder="$t('Storagemove.repostiryName')" size="small" class="filter-item" clearable @clear="restFilter" @keyup.enter.native="handleFilter" @focus="handlechooseDep"/>
<el-select v-model="getemplist.stat" :value="getemplist.stat" :placeholder="$t('updates.stat')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter">
<el-option :label="$t('updates.qy')" value="1"/>
<el-option :label="$t('updates.ty')" value="2"/>
<my-depot :depotcontrol.sync="depotcontrol" @depotname="depotname"/>
<el-select v-model="getemplist.typeId" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter">
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
<!-- 搜索按钮 -->
@ -24,27 +30,49 @@
<el-dropdown-item style="text-align: left" command="delete"><svg-icon icon-class="shanchu" style="width: 40px"/>{{ $t('public.delete') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- 表格导出操作 -->
<el-button v-permission="['200-250-251-6']" v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
<!-- 打印操作 -->
<!-- <el-button v-permission="['200-250-251-7']" v-waves size="small" class="filter-item2" icon="el-icon-printer" style="width: 86px" @click="handlePrint">{{ $t('public.print') }}</el-button> -->
<!-- 新建操作 -->
<el-button v-permission="['200-250-251-1']" v-waves size="small" class="filter-item2" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
<el-dialog :visible.sync="categoryVisible" title="新建分期利息规则设置" class="normal" width="600px" center>
<el-dialog :visible.sync="categoryVisible" title="首付设置" class="normal" width="600px" center>
<el-form ref="addCategoryForm" :rules="addCategoryFormRules" :model="addCategoryForm" class="demo-ruleForm" style="margin: 0 auto; width: 400px">
<el-form-item :label="$t('InstallmentrateList.installmentCount')" label-width="100px" prop="installmentCount">
<el-input v-model="addCategoryForm.installmentCount" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('InstallmentrateList.rate') + '%'" label-width="100px" prop="rate">
<el-input v-model="addCategoryForm.rate" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('InstallmentrateList.isEffective')" label-width="100px" prop="isEffective">
<el-select v-model="addCategoryForm.isEffective" placeholder="请选择状态" style="width: 100%">
<el-option :label="$t('updates.qy')" value="1"/>
<el-option :label="$t('updates.ty')" value="2"/>
<el-form-item :label="$t('Product.typeid')" label-width="100px" prop="typeId">
<el-select v-model="addCategoryForm.typeId" placeholder="请选择型号" style="width: 100%">
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('update4.zuidishoufu')" label-width="100px" prop="lowerMoney">
<el-input v-model="addCategoryForm.lowerMoney" />
</el-form-item>
</el-form>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
<el-button @click="handlerepository">{{ $t('updates.tj') }}</el-button>
<my-repository2 :repositorycontrol.sync="repositorycontrol2" @repositoryname="repositoryname2"/>
<el-button type="danger" @click="$refs.editable2.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
</div>
<div >
<el-editable
ref="editable2"
:data.sync="list3"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
height="400"
size="small"
style="width: 100%">
<el-editable-column type="selection" width="55" align="center" fixed="left"/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('updates.mdmc')" prop="repositoryName" align="center" min-width="150px"/>
</el-editable>
</div>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
@ -77,24 +105,25 @@
<span>{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('InstallmentrateList.installmentCount')" :resizable="false" align="center" min-width="250">
<el-table-column :label="$t('Storagemove.repostiryName')" :resizable="false" align="center" min-width="250">
<template slot-scope="scope">
<span>{{ scope.row.installmentCount }}</span>
<span>{{ scope.row.repositoryNames }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('InstallmentrateList.rate') + '%'" :resizable="false" align="center" min-width="350">
<el-table-column :label="$t('update4.zuidishoufu')" :resizable="false" align="center" min-width="250">
<template slot-scope="scope">
<span>{{ (scope.row.rate*100).toFixed(0) }}</span>
<span>{{ scope.row.lowerMoney }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('InstallmentrateList.isEffective')" :resizable="false" align="center" min-width="250">
<el-table-column :label="$t('Product.typeid')" :resizable="false" align="center" min-width="350">
<template slot-scope="scope">
<span>{{ scope.row.isEffective | isEffectiveFilter }}</span>
<span>{{ scope.row.typeName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('InstallmentrateList.createPersonName')" :resizable="false" align="center" min-width="250">
<template slot-scope="scope">
<span>{{ scope.row.createPersonName }}</span>
<span>{{ scope.row.createName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="230">
@ -109,19 +138,44 @@
<!--修改开始=================================================-->
<el-dialog :visible.sync="editcategoryVisible" :title="$t('updates.xgfqlx')" class="normal" width="600px" center>
<el-form ref="editCategoryForm" :rules="editCategoryFormRules" :model="editCategoryForm" class="demo-ruleForm" style="margin: 0 auto; width: 400px">
<el-form-item :label="$t('InstallmentrateList.installmentCount')" label-width="100px" prop="installmentCount">
<el-input v-model="editCategoryForm.installmentCount" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('InstallmentrateList.rate') + '%'" label-width="100px" prop="rate">
<el-input v-model="editCategoryForm.rate" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('InstallmentrateList.isEffective')" label-width="100px" prop="isEffective">
<el-select v-model="editCategoryForm.isEffective" placeholder="请选择状态" style="width: 100%">
<el-option :label="$t('updates.qy')" value="1"/>
<el-option :label="$t('updates.ty')" value="2"/>
<el-form-item :label="$t('Product.typeid')" label-width="100px" prop="typeId">
<el-select v-model="editCategoryForm.typeId" placeholder="请选择型号" style="width: 100%">
<el-option
v-for="(item, index) in types"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('update4.zuidishoufu')" label-width="100px" prop="lowerMoney">
<el-input v-model="editCategoryForm.lowerMoney" />
</el-form-item>
</el-form>
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
<el-button @click="handlerepository4">{{ $t('updates.tj') }}</el-button>
<my-repository4 :repositorycontrol.sync="repositorycontrol4" @repositoryname4="repositoryname4"/>
<el-button type="danger" @click="$refs.editable2.removeSelecteds()">{{ $t('Hmodule.delete') }}</el-button>
</div>
<div >
<el-editable
ref="editable4"
:data.sync="list4"
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
stripe
border
height="400"
size="small"
style="width: 100%">
<el-editable-column type="selection" width="55" align="center" fixed="left"/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('updates.mdmc')" prop="repositoryName" align="center" min-width="150px"/>
</el-editable>
</div>
</el-card>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleOk()">{{ $t('public.edit') }}</el-button>
<el-button type="danger" @click="handleNo()">{{ $t('Hmodule.cancel') }}</el-button>
@ -133,18 +187,23 @@
</template>
<script>
import { ratelist, addinstallmentrate, updateinstallmentrate, deleterate } from '@/api/Installmentrate'
import { installmentFirstList, addInstallmentFirst, updateInstallmentFirst, deleteInstallmentFirst } from '@/api/Installmentrate'
import { searchEmpCategory2 } from '@/api/Product'
import waves from '@/directive/waves' // Waves directive
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
import permission from '@/directive/permission/index.js' //
import permission2 from '@/directive/permission2/index.js' //
import checkPermission from '@/utils/permission' //
import MyRepository2 from './components/MyRepository3'
import MyRepository4 from './components/MyRepository4'
import MyDepot from './components/MyDepot'
var _that
export default {
name: 'FirstMoneySetting',
directives: { waves, permission, permission2 },
components: { Pagination },
components: { Pagination, MyRepository2, MyRepository4, MyDepot },
filters: {
isEffectiveFilter(status) {
const statusMap = {
@ -156,6 +215,14 @@ export default {
},
data() {
return {
moveInRepository: '',
depotcontrol: false,
list4: [],
repositorycontrol4: false,
//
types: [],
list3: [],
repositorycontrol2: false,
tableHeight: 200,
//
@ -164,19 +231,18 @@ export default {
categoryVisible: false,
//
addCategoryForm: {
createPersonId: this.$store.getters.userId,
countryId: 1
createId: this.$store.getters.userId,
countryId: 1,
lowerMoney: '',
typeId: ''
},
//
addCategoryFormRules: {
installmentCount: [
{ required: true, message: '请输入分期期数', trigger: 'blur' }
lowerMoney: [
{ required: true, message: '请输入最低首付', trigger: 'blur' }
],
rate: [
{ required: true, message: '请输入客户利率', trigger: 'blur' }
],
isEffective: [
{ required: true, message: '请选择状态', trigger: 'change' }
typeId: [
{ required: true, message: '请选择车辆型号', trigger: 'change' }
]
},
//
@ -188,14 +254,11 @@ export default {
},
//
editCategoryFormRules: {
installmentCount: [
{ required: true, message: '请输入分期期数', trigger: 'blur' }
lowerMoney: [
{ required: true, message: '请输入最低首付', trigger: 'blur' }
],
rate: [
{ required: true, message: '请输入客户利率', trigger: 'blur' }
],
isEffective: [
{ required: true, message: '请选择状态', trigger: 'change' }
typeId: [
{ required: true, message: '请选择车辆型号', trigger: 'change' }
]
},
//
@ -210,16 +273,15 @@ export default {
listLoading: true,
//
getemplist: {
categoryname: '',
type: '',
iseffective: '',
pagenum: 1,
pagesize: 10
repositoryId: '',
pageNum: 1,
pageSize: 10
}
}
},
activated() {
this.getlist()
this.getTypes()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
@ -234,6 +296,79 @@ export default {
_that = this
},
methods: {
//
restFilter() {
this.moveInRepository = ''
this.getemplist.repositoryId = ''
},
// focus
handlechooseDep() {
this.depotcontrol = true
},
depotname(val) {
this.moveInRepository = val.repositoryName
this.getemplist.repositoryId = val.id
},
handlerepository4() {
this.repositorycontrol4 = true
},
repositoryname4(val) {
const nowlistdata = this.$refs.editable4.getRecords()
console.log('nowlistdata', nowlistdata)
const alldata = [...val, ...nowlistdata]
const filterdata = this.uniqueArray(alldata, 'id')
this.list4 = filterdata
console.log('this.list4 ======> ', this.list4)
this.editCategoryForm.repositoryIds = this.list4.map(item => {
return item.id
}).join(',')
this.editCategoryForm.repositoryNames = this.list4.map(item => {
return item.repositoryName
}).join(',')
},
uniqueArray(array, key) {
var result = [array[0]]
for (var i = 1; i < array.length; i++) {
var item = array[i]
var repeat = false
for (var j = 0; j < result.length; j++) {
if (item[key] === result[j][key]) {
repeat = true
break
}
}
if (!repeat) {
result.push(item)
}
}
return result
},
repositoryname2(val) {
const nowlistdata = this.$refs.editable2.getRecords()
const alldata = [...val, ...nowlistdata]
const filterdata = this.uniqueArray(alldata, 'id')
this.list3 = filterdata
console.log('this.list3 ======> ', this.list3)
this.addCategoryForm.repositoryIds = this.list3.map(item => {
return item.id
}).join(',')
this.addCategoryForm.repositoryNames = this.list3.map(item => {
return item.repositoryName
}).join(',')
},
getTypes() {
//
searchEmpCategory2(2).then(res => {
if (res.data.ret === 200) {
this.types = res.data.data.content.list
}
})
},
handlerepository() {
this.repositorycontrol2 = true
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)
@ -243,12 +378,10 @@ export default {
getlist() {
//
this.listLoading = true
ratelist(this.getemplist).then(res => {
installmentFirstList(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
console.log('列表出错')
}
setTimeout(() => {
this.listLoading = false
@ -258,12 +391,10 @@ export default {
//
handleFilter() {
this.getemplist.pagenum = 1
ratelist(this.getemplist).then(res => {
installmentFirstList(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
} else {
console.log('搜索出错')
}
})
},
@ -280,7 +411,7 @@ export default {
cancelButtonText: this.$t('prompt.qx'),
type: 'warning'
}).then(() => {
deleterate(ids, this.$store.getters.userId).then(res => {
deleteInstallmentFirst(ids, this.$store.getters.userId).then(res => {
if (res.data.ret === 200 || res.data.ret === 100) {
this.$notify({
title: this.$t('prompt.sccg'),
@ -311,7 +442,7 @@ export default {
cancelButtonText: this.$t('prompt.qx'),
type: 'warning'
}).then(() => {
deleterate(row.id, this.$store.getters.userId).then(res => {
deleteInstallmentFirst(row.id, this.$store.getters.userId).then(res => {
if (res.data.ret === 200 || res.data.ret === 100) {
this.$notify({
title: this.$t('prompt.sccg'),
@ -334,14 +465,27 @@ export default {
})
})
},
//
handleEdit(row) {
console.log(row)
this.editcategoryVisible = true
this.editCategoryForm = Object.assign({}, row)
this.editCategoryForm.type = String(row.type)
this.editCategoryForm.isEffective = String(row.isEffective)
this.editCategoryForm.rate = row.rate * 100
const repoNames = row.repositoryNames.split(',')
const repoIds = row.repositoryIds.split(',')
const settingArr = []
for (const i in repoNames) {
for (const j in repoIds) {
if (i === j) {
const obj = {}
obj.repositoryName = repoNames[i]
obj.id = Number(repoIds[j])
settingArr.push(obj)
}
}
}
this.list4 = settingArr
console.log('settingArr', settingArr)
},
//
handleNo() {
@ -351,11 +495,7 @@ export default {
handleOk() {
this.$refs.editCategoryForm.validate((valid) => {
if (valid) {
if (this.editCategoryForm.rate !== null || this.editCategoryForm.rate !== '' || this.editCategoryForm.rate !== undefined) {
this.editCategoryForm.rate = (this.editCategoryForm.rate / 100).toFixed(6)
}
const parms = JSON.stringify(this.editCategoryForm)
updateinstallmentrate(parms).then(res => {
updateInstallmentFirst(this.editCategoryForm).then(res => {
if (res.data.ret === 200) {
this.$notify({
title: 'successful',
@ -364,6 +504,7 @@ export default {
offset: 100
})
this.getlist()
this.$refs.editCategoryForm.clearValidate()
this.$refs.editCategoryForm.resetFields()
this.editcategoryVisible = false
@ -401,11 +542,7 @@ export default {
console.log(this.addCategoryForm)
this.$refs.addCategoryForm.validate((valid) => {
if (valid) {
if (this.addCategoryForm.rate !== null || this.addCategoryForm.rate !== '' || this.addCategoryForm.rate !== undefined) {
this.addCategoryForm.rate = (this.addCategoryForm.rate / 100).toFixed(6)
}
const parms = JSON.stringify(this.addCategoryForm)
addinstallmentrate(parms).then(res => {
addInstallmentFirst(this.addCategoryForm).then(res => {
if (res.data.ret === 200) {
this.$notify({
title: 'successful',
@ -414,6 +551,7 @@ export default {
offset: 100
})
this.getlist()
this.$refs.editable2.clear()
this.$refs.addCategoryForm.clearValidate()
this.$refs.addCategoryForm.resetFields()
this.restAddCategoryForm()

View file

@ -81,9 +81,9 @@
@selection-change="handleSelectionChange2">
<el-editable-column type="selection" width="55" align="center"/>
<el-editable-column label="编号" width="55" align="center" type="index" />
<el-editable-column :edit-render="{type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 200px" @visible-change="updatebatch2($event,scope)">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" clearable style="width: 200px" @visible-change="updatebatch2($event,scope)">
<el-option
v-for="item in locationlist2"
:key="item.id"
@ -128,7 +128,7 @@
<el-editable-column label="编号" width="55" align="center" type="index" />
<el-editable-column :edit-render="{name: 'ElSelect',type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable clearable style="width: 200px" @visible-change="updatebatch($event,scope)">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" clearable style="width: 200px" @visible-change="updatebatch($event,scope)">
<el-option
v-for="item in locationlist"
:key="item.id"
@ -139,7 +139,7 @@
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElSelect',type: 'default'}" :label="$t('Hmodule.pc')" prop="batch" align="center" width="200px">
<template slot-scope="scope">
<el-select v-model="scope.row.batch" :value="scope.row.batch" :placeholder="$t('Hmodule.xcpc')" filterable clearable style="width: 200px" @visible-change="updatebatch2($event,scope)">
<el-select v-model="scope.row.batch" :value="scope.row.batch" :placeholder="$t('Hmodule.xcpc')" clearable style="width: 200px" @visible-change="updatebatch2($event,scope)">
<el-option
v-for="(item, index) in batchlist"
:key="index"

View file

@ -633,7 +633,7 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -664,7 +664,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -95,11 +95,11 @@
border
size="small"
style="width: 100%">
<el-editable-column :label="$t('Hmodule.xh')" fixed="left" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('Hmodule.xh')" fixed="left" min-width="55" align="center" type="index" />
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" fixed="left" align="center" />
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed="left" align="center" />
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px"/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" />
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" fixed/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" />
<el-editable-column :label="$t('updates.shuli')" prop="quantity" align="center" />
<el-editable-column :label="$t('Hmodule.enterQuantity')" prop="enterQuantity" align="center" min-width="150px"/>

View file

@ -51,13 +51,13 @@
border
size="small"
style="width: 100%">
<el-editable-column type="selection" width="85" align="center"/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px"/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column type="selection" width="85" align="center" fixed/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index" fixed/>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="150px" />
<el-editable-column :label="$t('update4.oldPrice')" prop="oldPrice" align="center" min-width="150px"/>
<el-editable-column :label="$t('update4.newPrice')" prop="newPrice" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.oldIncludeTaxPrice')" prop="oldIncludeTaxPrice" align="center" min-width="150px"/>

View file

@ -117,11 +117,11 @@
size="small"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-editable-column type="selection" width="85" align="center"/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px"/>
<el-editable-column type="selection" width="85" align="center" fixed/>
<el-editable-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index" fixed/>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="150px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px">

View file

@ -240,6 +240,9 @@ export default {
],
accountType: [
{ required: true, message: '请选择账户类型', trigger: 'change' }
],
customerType: [
{ required: true, message: '请选择客户类型', trigger: 'change' }
]
},
//

View file

@ -217,7 +217,8 @@ export default {
type: '',
pagenum: 1,
pagesize: 10,
repositoryid: '',
repositoryid: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionIds,
source: ''
},
//

View file

@ -114,7 +114,7 @@
</el-table-column>
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="230">
<template slot-scope="scope">
<el-button v-permission2="['171-172-3', scope.row.createPersonId]" v-if="scope.row.judgeStat === 0" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<!-- <el-button v-permission2="['171-172-3', scope.row.createPersonId]" v-if="scope.row.judgeStat === 0" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/> -->
<el-button v-permission="['171-172-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['171-172-16']" v-show="isReview2(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.jd')" type="success" size="mini" icon="el-icon-check" circle @click="handleReview2(scope.row)"/>
<el-button v-permission="['171-172-17']" v-show="isReview3(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fjd')" type="success" size="mini" icon="el-icon-back" circle @click="handleReview3(scope.row)"/>
@ -125,7 +125,7 @@
<!-- 列表结束 -->
<pagination v-show="total>0" :total="total" :page.sync="getemplist.pageNum" :limit.sync="getemplist.pageSize" @pagination="getlist" />
<!--修改开始=================================================-->
<!-- <my-dialog :editcontrol.sync="editVisible" :editdata.sync="personalForm" @rest="refreshlist"/>-->
<!-- <my-dialog :editcontrol.sync="editVisible" :editdata.sync="personalForm" @rest="refreshlist"/> -->
<!--修改结束=================================================-->
</el-card>
</div>

View file

@ -193,7 +193,7 @@
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalFormreceiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>

View file

@ -303,7 +303,7 @@ export default {
}, 100)
},
mounted() {
this.getlist()
// this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
@ -458,21 +458,22 @@ export default {
if (res.data.ret === 200) {
this.list = res.data.data.content.list
this.total = res.data.data.content.totalCount
const list = res.data.data.content.list
const listdata = res.data.data.content.list.map(item => {
return item.recyclingDetailVos
})
const detaildata = [].concat.apply([], listdata)
for (const i in list) {
for (const j in detaildata) {
if (list[i].id === detaildata[j].recyclingId) {
list[i].productCode = detaildata[j].productCode
list[i].productTypeName = detaildata[j].productType
list[i].productCategoryName = detaildata[j].productCategory
}
}
}
// const list = res.data.data.content.list
// const listdata = res.data.data.content.list.map(item => {
// return item.recyclingDetailVos
// })
// const detaildata = [].concat.apply([], listdata)
// for (const i in list) {
// for (const j in detaildata) {
// if (list[i].id === detaildata[j].recyclingId) {
// list[i].productCode = detaildata[j].productCode
// list[i].productTypeName = detaildata[j].productType
// list[i].productCategoryName = detaildata[j].productCategory
// }
// }
// }
}
this.listLoading = false
setTimeout(() => {
this.listLoading = false
}, 0.5 * 100)

View file

@ -899,7 +899,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handleExceed(files, fileList) {

View file

@ -764,6 +764,9 @@ export default {
this.editVisible = true
this.personalForm = Object.assign({}, res.data.data.content.list[0])
this.personalForm.sourceType = String(res.data.data.content.list[0].sourceType)
this.personalForm.InvestigationResult = row.InvestigationResult
this.personalForm.isSecondApply = row.isSecondApply
if (res.data.data.content.list[0].currency !== null) {
this.personalForm.currency = String(res.data.data.content.list[0].currency)
}
@ -807,6 +810,8 @@ export default {
if (res.data.ret === 200) {
this.detailvisible = true
this.personalForm = Object.assign({}, res.data.data.content.list[0])
this.personalForm.InvestigationResult = row.InvestigationResult
this.personalForm.isSecondApply = row.isSecondApply
}
})
},

View file

@ -501,6 +501,7 @@ export default {
if (this.personalForm.approvalUseVos && this.personalForm.approvalUseVos.length !== 0) {
const approvalUse = this.personalForm.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
console.log('123=====> ', this.personalForm.InvestigationResult, this.personalForm.isSecondApply, index)
if (index > -1 && (this.personalForm.judgeStat === 1 || this.personalForm.judgeStat === 0)) {
if (this.personalForm.InvestigationResult === 1 && this.personalForm.isSecondApply === 1) {
return true
@ -515,9 +516,9 @@ export default {
}
},
//
handleReview(row) {
handleReview() {
this.reviewParms = {}
this.reviewParms.id = row.id
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,
@ -583,7 +584,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handleprint() {

View file

@ -819,7 +819,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handleExceed(files, fileList) {

View file

@ -816,7 +816,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
isEdit2(row) {

View file

@ -417,7 +417,7 @@
</el-form>
</div>
<div class="buttons">
<el-button v-show="isJudgeReview()" type="warning" size="mini" @click="handleReview(scope.row)">{{ $t('updates.spi') }}</el-button>
<el-button v-show="isJudgeReview()" type="warning" size="mini" @click="handleReview()">{{ $t('updates.spi') }}</el-button>
<el-button v-permission="['54-57-22']" v-show="personalForm.judgeStat === 2&& personalForm.flag===1" type="primary" style="width: 107px" @click="handleMyReceipt1()"><span style="margin-left: -15px;">{{ $t('newupd.qqq') }}</span></el-button>
<el-button v-permission="['54-57-23']" v-show="personalForm.judgeStat === 2&&personalForm.flag!==3" type="primary" style="width: 107px" @click="handleMyReceipt5()"><span style="margin-left: -15px;">{{ $t('newupd.www') }}</span></el-button>
<el-button v-permission="['54-57-24']" v-show="personalForm.judgeStat === 2&&personalForm.flag!==3" type="primary" style="width: 107px" @click="handleMyReceipt3()"><span style="margin-left: -15px;">{{ $t('newupd.eee') }}</span></el-button>
@ -679,7 +679,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getsaleOutLis() {
@ -802,7 +801,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -283,7 +283,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getsaleOutLis() {
@ -406,7 +405,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -679,7 +679,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//

View file

@ -293,7 +293,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//

View file

@ -1242,7 +1242,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
async detailproduct(val) {

View file

@ -1117,7 +1117,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
detailproduct(val) {

View file

@ -1101,7 +1101,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
unique(arr) {

View file

@ -894,7 +894,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//
@ -1002,7 +1001,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -1215,7 +1215,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
detailproduct(val) {

View file

@ -1262,7 +1262,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getdiffprice() {

View file

@ -1182,7 +1182,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getdiffprice() {

View file

@ -300,7 +300,7 @@
circle
@click="handleDelete(scope.row)"
/>
<el-button v-permission="['54-61-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['54-61-76']" v-show="isReview4(scope.row)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
</template>
</el-table-column>
</el-table>

View file

@ -894,7 +894,7 @@ export default {
row.taxMoney = row.salePrice * row.returnQuantity * (row.taxRate / 100)
row.money = (row.salePrice * row.returnQuantity + Number(row.taxMoney)).toFixed(6)
row.includeTaxMoney = (row.salePrice * row.returnQuantity + Number(row.salePrice * row.returnQuantity * (row.taxRate / 100))).toFixed(6)
row.discountMoney = (row.salePrice * row.quantity * (1 - row.discount / 100)).toFixed(6)
row.discountMoney = (row.salePrice * row.returnQuantity * (1 - row.discount / 100)).toFixed(6)
return row.returnQuantity
}

View file

@ -274,7 +274,7 @@
</el-form>
</div>
<div>
<el-button v-show="isReview( )&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :loading="sploading" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview(scope.row)">
<el-button v-show="isReview( )&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :loading="sploading" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>

View file

@ -143,7 +143,7 @@
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="230">
<template slot-scope="scope">
<el-button v-permission2="['104-105-3', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&scope.row.receiptStat === 1" :key="scope.row.id + Math.random()" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-permission="['104-105-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['104-105-76']" v-show="isReview4(scope.row)&&( scope.row.receiptStat === 2)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['104-105-16']" v-show="isReview2(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.jd')" type="success" size="mini" icon="el-icon-check" circle @click="handleReview2(scope.row)"/>
<el-button v-permission="['104-105-17']" v-show="isReview3(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fjd')" type="success" size="mini" icon="el-icon-back" circle @click="handleReview3(scope.row)"/>
<el-button v-permission2="['104-105-2', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :key="scope.row.id + Math.random()" :title="$t('updates.sc')" scope-row-create-person-id- size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
@ -308,7 +308,7 @@ export default {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
this.getlist()
// this.getlist()
},
beforeCreate() {
_that = this

View file

@ -192,7 +192,9 @@
</el-form>
</div>
<div>
<el-button v-show="isReview( )&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview()"/>
<el-button v-show="isReview( )&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>
</div>
</el-card>

View file

@ -520,6 +520,7 @@ export default {
delete this.personalForm.judgeStat
delete this.personalForm.receiptStat
delete this.personalForm.stockApplyDetailVos
delete this.personalForm.approvalUseVos
this.personalForm.repositoryId = this.$store.getters.repositoryId
this.personalForm.regionId = this.$store.getters.regionId
this.personalForm.createPersonId = this.$store.getters.userId

View file

@ -547,7 +547,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handlechooseRep() {

View file

@ -124,6 +124,21 @@
<span>{{ scope.row.unit }}</span>
</template>
</el-table-column> -->
<el-table-column :label="$t('StockArrival.arrivalDate')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.arrivalDate }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('collectAndPayDetail.cgck')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.arrivalRepositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('update4.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('StockArrival.stockTypeId')" :resizable="false" align="center" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.stockTypeName }}</span>
@ -172,7 +187,7 @@
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="600">
<template slot-scope="scope">
<el-button v-permission2="['104-116-3', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&scope.row.receiptStat === 1" :key="scope.row.id + Math.random()" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-permission="['104-116-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['104-116-76']" v-show="isReview4(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-permission="['104-116-16']" v-show="isReview2(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.jd')" type="success" size="mini" icon="el-icon-check" circle @click="handleReview2(scope.row)"/>
<el-button v-permission="['104-116-17']" v-show="isReview3(scope.row)&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :title="$t('updates.fjd')" type="success" size="mini" icon="el-icon-back" circle @click="handleReview3(scope.row)"/>
<el-button v-permission2="['104-116-2', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" :key="scope.row.id + Math.random()" :title="$t('updates.sc')" scope-row-create-person-id- size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
@ -365,7 +380,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getinformation() {

View file

@ -484,7 +484,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//
@ -749,7 +748,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -496,7 +496,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handlechooseRep() {

View file

@ -452,8 +452,8 @@ export default {
console.log('row', row)
const param = {}
param.supplierId = row.supplierId
param.beginTime = this.date[0]
param.endTime = this.date[1]
param.beginTime = this.date ? this.date[0] : ''
param.endTime = this.date ? this.date[1] : ''
this.$store.dispatch('getempcontract', param)
this.$router.push('/StockOrder/StockOrderList')
},

View file

@ -473,13 +473,13 @@ export default {
//
handleDetail(row) {
console.log(row)
const query_params = {
id: row.supplierId,
name: row.supplierName,
beginTime: this.date[0] || '',
endTime: this.date[1] || ''
}
this.$router.push({ path: '/StockOrder/StockOrderList', query: { arry: query_params }})
const param = {}
param.supplierId = row.supplierId
param.beginTime = this.date ? this.date[0] : ''
param.endTime = this.date ? this.date[1] : ''
this.$store.dispatch('getempcontract', param)
this.$router.push('/StockOrder/StockOrderList')
},
//
isReview(row) {

View file

@ -248,16 +248,16 @@ export default {
if (this.getemplist.type === '1') {
const param = {}
param.supplierId = row.id
param.beginTime = this.date[0]
param.endTime = this.date[1]
param.beginTime = this.date ? this.date[0] : ''
param.endTime = this.date ? this.date[1] : ''
this.$store.dispatch('getempcontract', param)
this.$router.push('/StockOrder/StockOrderList')
}
if (this.getemplist.type === '2') {
const param = {}
param.stockPersonId = row.id
param.beginTime = this.date[0]
param.endTime = this.date[1]
param.beginTime = this.date ? this.date[0] : ''
param.endTime = this.date ? this.date[1] : ''
this.$store.dispatch('getempcontract', param)
this.$router.push('/StockOrder/StockOrderList')
}

View file

@ -260,7 +260,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
clickRow(val) {

View file

@ -43,7 +43,10 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
@ -234,6 +237,41 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]

View file

@ -420,7 +420,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -999,7 +999,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
getdiscountreduceMoney(row) {

View file

@ -214,7 +214,7 @@
</el-editable-column>
<el-editable-column :label="$t('updates.hsj')" prop="includeTaxPrice" align="center" min-width="170px">
<template slot-scope="scope">
<p v-show="jundgeprice()">{{ (scope.row.includeTaxPrice).toFixed(6) }}</p>
<p v-show="jundgeprice()">{{ Number(scope.row.includeTaxPrice).toFixed(6) }}</p>
</template>
<!-- <template slot-scope="scope">
<el-input-number
@ -640,7 +640,7 @@ export default {
})
}))
// console.log('moreSourceData', moreSourceData)
console.log('moreSourceData', moreSourceData)
// eslint-disable-next-line prefer-const
let newarr = []
for (const i in moreSourceData) {
@ -835,7 +835,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
getcurrency() {

View file

@ -516,7 +516,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//

View file

@ -236,7 +236,7 @@
</el-editable-column>
<el-editable-column :label="$t('updates.hsj')" prop="includeTaxPrice" align="center" min-width="170px">
<template slot-scope="scope">
<p v-show="jundgeprice()">{{ (scope.row.includeTaxPrice).toFixed(6) }}</p>
<p v-show="jundgeprice()">{{ Number(scope.row.includeTaxPrice).toFixed(6) }}</p>
</template>
<!-- <template slot-scope="scope">
<el-input-number
@ -248,7 +248,7 @@
</el-editable-column>
<el-editable-column :label="$t('updates.sl')" prop="taxRate" align="center" min-width="170px">
<template slot-scope="scope">
<p v-show="jundgeprice()">{{ (scope.row.taxRate).toFixed(2) }}</p>
<p v-show="jundgeprice()">{{ Number(scope.row.taxRate).toFixed(2) }}</p>
</template>
<!-- <template slot-scope="scope">
<el-input-number
@ -1394,7 +1394,7 @@ export default {
delete elem.includeTaxPrice
}
if (elem.includeTaxPrice !== null || elem.includeTaxPrice !== '' || elem.includeTaxPrice !== undefined) {
elem.includeTaxPrice = (elem.includeTaxPrice).toFixed(6)
elem.includeTaxPrice = Number(elem.includeTaxPrice).toFixed(6)
}
if (elem.taxRate === null || elem.taxRate === '' || elem.taxRate === undefined) {
delete elem.taxRate

View file

@ -511,6 +511,7 @@ export default {
// this.moreaction[i].stockEnterDetailVos.sourceNumber = this.moreaction[i].enterNumber
// enterdata.push(this.moreaction[i].stockEnterDetailVos)
}
console.log('enterdata', enterdata)
const enterDetail = enterdata.map(function(item) {
return {
productCode: item.productCode,

View file

@ -174,6 +174,7 @@
:edit-config="{ showIcon: true, showStatus: true}"
:edit-rules="validRules"
class="click-table1"
height="600"
stripe
border
size="small"
@ -790,7 +791,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
handlechooseRep() {

View file

@ -170,17 +170,27 @@
<el-table-column
type="selection"
width="40"/>
<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" sortable>
<template slot-scope="scope">
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.orderNumber }}</span>
</template>
<detail-list :detailcontrol.sync="detailvisible" :detaildata.sync="personalFormdetail" @rest="refreshlist"/>
</el-table-column>
<el-table-column :label="$t('StockOrder.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('StockOrder.title')" :resizable="false" fixed="left" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.title }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('updates.dhrq')" :resizable="false" align="center" min-width="150" sortable>
<template slot-scope="scope">
<span>{{ scope.row.arrivalDate }}</span>
</template>
</el-table-column>
<!-- <el-table-column :label="$t('StockArrival.presentdata')" :resizable="false" fixed="left" align="center" min-width="300">
<template slot-scope="scope">
<span>{{ scope.row.productName }}</span>
@ -226,11 +236,7 @@
<span>{{ scope.row.stockPersonName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockOrder.supplierId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.supplierName }}</span>
</template>
</el-table-column>
<!-- <el-table-column v-if="jundgeprice()" :label="$t('StockOrder.allMoney')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.allMoney }}</span>
@ -465,7 +471,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
getinformation() {
@ -492,7 +497,7 @@ export default {
//
handleReview4(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentId
this.reviewParms.id = row.id
this.reviewParms.judgePersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfsp'), this.$t('prompt.fsp'), {
distinguishCancelAndClose: true,
@ -535,7 +540,7 @@ export default {
//
handleReview3(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentId
this.reviewParms.id = row.id
this.reviewParms.endPersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfjd'), this.$t('prompt.fjd'), {
distinguishCancelAndClose: true,
@ -571,7 +576,7 @@ export default {
//
handleReview2(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentId
this.reviewParms.id = row.id
this.reviewParms.endPersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qjd'), this.$t('prompt.jd'), {
distinguishCancelAndClose: true,
@ -918,7 +923,7 @@ export default {
//
handleReview(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentId
this.reviewParms.id = row.id
this.reviewParms.judgePersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qsh'), this.$t('prompt.sh'), {
distinguishCancelAndClose: true,
@ -983,7 +988,7 @@ export default {
//
//
handleCommand(command) {
const ids = this.moreaction.map(item => item.parentId).join()
const ids = this.moreaction.map(item => item.id).join()
if (command === 'delete') {
this.$confirm(this.$t('prompt.scts'), this.$t('prompt.ts'), {
confirmButtonText: this.$t('prompt.qd'),
@ -1021,7 +1026,7 @@ export default {
cancelButtonText: this.$t('prompt.qx'),
type: 'warning'
}).then(() => {
deletestockorder(row.parentId, this.$store.getters.userId).then(res => {
deletestockorder(row.id, this.$store.getters.userId).then(res => {
if (res.data.ret === 200 || res.data.ret === 100) {
this.$notify({
title: this.$t('prompt.sccg'),

View file

@ -103,6 +103,8 @@
:edit-config="{ showIcon: true, showStatus: true}"
class="click-table1"
border
height="600"
size="small"
style="width: 100%">
<el-editable-column :label="$t('Hmodule.xh')" fixed="left" min-width="55" align="center" type="index"/>
@ -425,7 +427,7 @@ export default {
//
handleReview() {
this.reviewParms = {}
this.reviewParms.id = this.personalForm.parentId
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,
@ -492,7 +494,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
cutnull(data) {
@ -531,7 +532,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -170,6 +170,8 @@
:summary-method="getSummaries"
class="click-table1"
show-summary
height="600"
stripe
border
size="small"
@ -540,7 +542,6 @@ export default {
this.stockPersonId = this.personalForm.stockPersonName
this.signPersonId = this.personalForm.signPersonName
this.stockRepositoryId = this.personalForm.stockRepositoryName
this.personalForm.id = this.personalForm.parentId
this.list2 = this.personalForm.stockOrderDetailVos
this.changeRate()
},
@ -563,7 +564,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
handlechooseRep() {

View file

@ -99,6 +99,17 @@
<span>{{ scope.row.planPersonName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('collectAndPayDetail.cgck')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.planRepositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('update4.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('StockPlan.allMoney')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.allMoney }}</span>
@ -295,7 +306,7 @@ export default {
}, 100)
},
mounted() {
this.getlist()
// this.getlist()
this.getdatatime()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
@ -359,7 +370,7 @@ export default {
//
handleReview4(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentid
this.reviewParms.id = row.id
this.reviewParms.judgePersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfsp'), this.$t('prompt.fsp'), {
distinguishCancelAndClose: true,
@ -402,7 +413,7 @@ export default {
//
handleReview3(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentid
this.reviewParms.id = row.id
this.reviewParms.endPersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfjd'), this.$t('prompt.fjd'), {
distinguishCancelAndClose: true,
@ -438,7 +449,7 @@ export default {
//
handleReview2(row) {
this.reviewParms = {}
this.reviewParms.id = row.parentid
this.reviewParms.id = row.id
this.reviewParms.endPersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qjd'), this.$t('prompt.jd'), {
distinguishCancelAndClose: true,
@ -744,7 +755,7 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
this.reviewParms = {}
this.reviewParms.id = row.parentid
this.reviewParms.id = row.id
this.reviewParms.judgePersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qsh'), this.$t('prompt.sh'), {
distinguishCancelAndClose: true,
@ -932,7 +943,7 @@ export default {
//
//
handleCommand(command) {
const ids = this.moreaction.map(item => item.parentid).join()
const ids = this.moreaction.map(item => item.id).join()
if (command === 'delete') {
this.$confirm(this.$t('prompt.scts'), this.$t('prompt.ts'), {
confirmButtonText: this.$t('prompt.qd'),
@ -970,7 +981,7 @@ export default {
cancelButtonText: this.$t('prompt.qx'),
type: 'warning'
}).then(() => {
deletestockplan(row.parentid, this.$store.getters.userId).then(res => {
deletestockplan(row.id, this.$store.getters.userId).then(res => {
if (res.data.ret === 200 || res.data.ret === 100) {
this.$notify({
title: this.$t('prompt.sccg'),

View file

@ -199,8 +199,9 @@
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview()"/>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>
</div>
</el-card>
</div>
@ -289,6 +290,7 @@ export default {
}
}
this.somedate = this.personalForm.planDate
console.log('this.personalForm', this.detaildata)
}
},
beforeCreate() {
@ -308,7 +310,6 @@ export default {
},
// 123
handleReview() {
var _that = this
const loading = this.$loading({
lock: true,
text: 'Loading',
@ -316,7 +317,8 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
})
this.reviewParms = {}
this.reviewParms.id = this.personalForm.parentid
console.log('this.personalForm ======> ', _that.personalForm)
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,
@ -325,6 +327,7 @@ export default {
type: 'warning'
}).then(() => {
this.reviewParms.judgeStat = 2
console.log('reviewParms', this.reviewParms)
const parms = JSON.stringify(this.reviewParms)
// console.log('row', row)
@ -548,7 +551,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -329,7 +329,7 @@ export default {
this.planPersonId = this.personalForm.planPersonName
this.stockPersonId = this.personalForm.stockPersonName
this.planRepositoryId = this.personalForm.planRepositoryName
this.personalForm.id = this.personalForm.parentid
// this.personalForm.id = this.personalForm.parentid
this.personalForm.sourceType = String(this.personalForm.sourceType)
if (this.personalForm.sourceType === '1' || this.personalForm.sourceType === '2') {
this.addsouce = false

View file

@ -196,6 +196,17 @@
<el-editable-column :label="$t('updates.ys')" fixed="left" prop="color" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.dhsl')" prop="arrivalQuantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="200">
<template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.batch" :value="scope.row.batch" :placeholder="$t('Hmodule.xcpc')" filterable style="margin-left: 18px;width: 100%;margin-bottom: 0; padding: 0 20px" @visible-change="updatebatch2($event,scope)">
<el-option
v-for="(item, index) in batchlist"
:key="index"
:value="item"
:label="item"/>
</el-select>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible', events: {change: jungleNumbers}}" :label="$t('updates.thsl')" prop="retreatQuantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('updates.thyy')" prop="retreatReason" align="center" min-width="170px"/>
<el-editable-column :label="$t('Hmodule.dj')" prop="price" align="center" min-width="170px">
@ -320,7 +331,7 @@
<script>
import '@/directive/noMoreClick/index.js'
import { querytax } from '@/api/StockOrder'
import { countlist, getRate } from '@/api/public'
import { countlist, getRate, batchlist } from '@/api/public'
import { createstockArrival } from '@/api/StockRetreat'
import { getdeptlist } from '@/api/BasicSettings'
import { searchStockCategory } from '@/api/StockCategory'
@ -337,6 +348,7 @@ import MyArrival from './components/MyArrival'
import MyRepository from './components/MyRepository'
import MyRetreat from './components/MyRetreat'
import MyEnter from './components/MyEnter'
var _that
export default {
name: 'AddStockRetreat',
@ -366,6 +378,14 @@ export default {
callback()
}
}
const validatePass5 = (rule, value, callback) => {
console.log(this.supplierId)
if (this.personalForm.retreatRepositoryId === undefined || this.personalForm.retreatRepositoryId === null || this.personalForm.retreatRepositoryId === '') {
callback(new Error('请选择退货门店'))
} else {
callback()
}
}
const validatePass3 = (rule, value, callback) => {
if (this.personalForm.sourceNumber === undefined || this.personalForm.sourceNumber === null || this.personalForm.sourceNumber === '') {
callback(new Error('请选择源单编号'))
@ -384,7 +404,7 @@ export default {
//
retreatPerson: '',
//
retreatRepositoryId: this.$store.getters.repositoryName,
retreatRepositoryId: '',
//
repositorycontrol: false,
//
@ -449,7 +469,7 @@ export default {
isVat: 1,
sourceType: '1',
retreatDate: null,
retreatRepositoryId: this.$store.getters.repositoryId,
retreatRepositoryId: '',
currencyId: '3',
exchangeRate: '1.0000'
},
@ -477,7 +497,7 @@ export default {
{ required: true, message: '请选择采购类别', trigger: 'change' }
],
retreatRepositoryId: [
{ required: true, validator: validatePass, trigger: 'focus' }
{ required: true, validator: validatePass5, trigger: 'focus' }
]
},
//
@ -488,7 +508,8 @@ export default {
receiptVisible2: false,
list111: [],
//
moreaction: []
moreaction: [],
batchlist: []
}
},
watch: {
@ -531,6 +552,16 @@ export default {
_that = this
},
methods: {
updatebatch2(event, scope) {
if (event === true) {
const parms3 = scope.row.productCode
batchlist(this.personalForm.retreatRepositoryId, parms3).then(res => {
if (res.data.ret === 200) {
this.batchlist = res.data.data.content
}
})
}
},
jundgeprice() {
const value = ['1-22-24-115']
const roles = this.$store.getters && this.$store.getters.roles
@ -538,7 +569,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
enter(val) {

View file

@ -80,7 +80,7 @@
width="55"
fixed="left"
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" sortable>
<template slot-scope="scope">
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.number }}</span>
</template>
@ -91,6 +91,34 @@
<span>{{ scope.row.supplierName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRetreat.stockPersonId')" :resizable="false" fixed="left" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockPersonName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRetreat.retreatRepositoryId')" :resizable="false" fixed="left" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.retreatRepositoryName }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('StockRetreat.retreatDate')" :resizable="false" fixed="left" align="center" min-width="150" sortable>
<template slot-scope="scope">
<span>{{ scope.row.retreatDate }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('update4.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('StockRetreat.retreatRepositoryId')" :resizable="false" align="center" min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.retreatRepositoryName }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column :label="$t('StockArrival.presentdata')" :resizable="false" fixed="left" align="center" min-width="200">
<template slot-scope="scope">
<span>{{ scope.row.productName }}</span>
@ -116,7 +144,7 @@
<span>{{ scope.row.allRetreatMoney }}</span>
</template>
</el-table-column> -->
<!-- <el-table-column :label="$t('public.judgeStat')" :resizable="false" prop="judgeStat" align="center" min-width="150">
<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>
@ -125,7 +153,7 @@
<template slot-scope="scope">
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
</template>
</el-table-column> -->
</el-table-column>
<el-table-column :label="$t('public.actions')" :resizable="false" align="center" min-width="230">
<template slot-scope="scope">
<el-button v-permission2="['104-118-3', scope.row.createPersonId]" v-show="scope.row.judgeStat === 0&&scope.row.receiptStat === 1" :key="scope.row.id + Math.random()" :title="$t('updates.xg')" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
@ -432,7 +460,7 @@ export default {
this.listLoading = true
stockRetreatgetList(this.getemplist).then(res => {
if (res.data.ret === 200) {
const list = res.data.data.content.list
this.list = res.data.data.content.list
// const needlist = res.data.data.content.list
// for (let i = 0; i < needlist.length; i++) {
// for (let j = 0; j < needlist[i].stockRetreatDetailVos.length; j++) {

View file

@ -108,6 +108,7 @@
<el-editable-column :label="$t('Hmodule.gg')" prop="typeName" align="center" />
<el-editable-column :label="$t('updates.ys')" prop="color" align="center"/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" />
<el-editable-column :label="$t('Hmodule.pc')" prop="batch" align="center" />
<el-editable-column :label="$t('updates.dhsl')" prop="arrivalQuantity" align="center" />
<el-editable-column :label="$t('updates.thsl')" prop="retreatQuantity" align="center" />
<el-editable-column :label="$t('updates.thyy')" prop="retreatReason" align="center" />
@ -431,7 +432,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//
@ -492,7 +492,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -151,7 +151,7 @@ export default {
default: false
},
supp: {
type: Number,
type: [Number, String],
default: null
}
},

View file

@ -180,6 +180,17 @@
<el-editable-column :label="$t('updates.ys')" fixed="left" prop="color" align="center" min-width="100px"/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.dhsl')" prop="arrivalQuantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('Hmodule.pc')" prop="batch" align="center" min-width="200">
<template slot="edit" slot-scope="scope">
<el-select v-model="scope.row.batch" :value="scope.row.batch" :placeholder="$t('Hmodule.xcpc')" filterable style="margin-left: 18px;width: 100%;margin-bottom: 0; padding: 0 20px" @visible-change="updatebatch2($event,scope)">
<el-option
v-for="(item, index) in batchlist"
:key="index"
:value="item"
:label="item"/>
</el-select>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible', events: {change: jungleNumbers}}" :label="$t('updates.thsl')" prop="retreatQuantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('updates.thyy')" prop="retreatReason" align="center" min-width="170px"/>
<el-editable-column :label="$t('Hmodule.dj')" prop="price" align="center" min-width="170px">
@ -274,7 +285,7 @@
<script>
import { querytax } from '@/api/StockOrder'
import { getRate } from '@/api/public'
import { getRate, batchlist } from '@/api/public'
import { updatestockRetreat } from '@/api/StockRetreat'
import { getdeptlist } from '@/api/BasicSettings'
import { searchStockCategory } from '@/api/StockCategory'
@ -404,7 +415,8 @@ export default {
list2: [],
//
validRules: {
}
},
batchlist: []
}
},
watch: {
@ -433,6 +445,16 @@ export default {
_that = this
},
methods: {
updatebatch2(event, scope) {
if (event === true) {
const parms3 = scope.row.productCode
batchlist(this.personalForm.retreatRepositoryId, parms3).then(res => {
if (res.data.ret === 200) {
this.batchlist = res.data.data.content
}
})
}
},
gettaxRate(row) {
console.log('row==============110', row.flag)
if (row.flag === undefined) {
@ -482,7 +504,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//

View file

@ -280,6 +280,7 @@ export default {
isActive: 1
// supplierId: this.supp
},
supplierId: '',
visible2: {},
//
personalForm: {},

View file

@ -17,8 +17,8 @@
<el-select v-model="personalForm.sourceType" style="width: 200px">
<el-option :label="$t('updates.cgdhd')" value="1" />
<el-option :label="$t('updates.cgdd')" value="2" />
<el-option :label="$t('Hmodule.Nosource')" value="3" />
<!-- <el-option :label="$t('updates.cgdd')" value="2" /> -->
<!-- <el-option :label="$t('Hmodule.Nosource')" value="3" /> -->
</el-select>
</el-form-item>
</el-col>

View file

@ -515,7 +515,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
getlist() {
@ -760,7 +759,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -14,7 +14,7 @@
<el-col :span="6">
<el-form-item :label="$t('Stockenter.sourceType')" prop="sourceType" style="width: 100%;">
<el-select v-model="personalForm.sourceType" placeholder="请选择源单类型" style="margin-left: 18px;width: 200px">
<el-option :label="$t('updates.cgdhd')" value="1" />
<!-- <el-option :label="$t('updates.cgdhd')" value="1" /> -->
<el-option :label="$t('updates.cgdd')" value="2" />
</el-select>
</el-form-item>
@ -23,7 +23,8 @@
<el-form-item :label="$t('updates.ydbh')" style="width: 100%;">
<el-input v-model="personalForm.sourceNumber" placeholder="请选择源单编号" style="margin-left: 18px;width: 150px" @focus="handleAddSouce"/>
</el-form-item>
<my-arrival :arrivalcontrol.sync="arrivalcontrol" @arrival="arrival" @allarrivalinfo="allarrivalinfo"/>
<my-arrival :arrivalcontrol.sync="arrivalcontrol" :repositoryid="personalForm" @arrival="arrival" @allarrivalinfo="allarrivalinfo"/>
<my-order :ordercontrol.sync="ordercontrol" :supp.sync="supp" @order="order" @allOrderinfo="allOrderinfo"/>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('Stockenter.supplierId')" style="width: 100%">
@ -116,13 +117,9 @@
style="width: 100%">
<el-editable-column type="selection" fixed width="55" align="center"/>
<el-editable-column type="index" fixed align="center" label="编号" width="150px" />
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" fixed align="center" width="150px">
<template slot-scope="scope">
<p>{{ getmylocation(scope) }}</p>
</template>
</el-editable-column>
<el-editable-column :label="$t('Hmodule.wpbh')" prop="productCode" fixed align="center" width="150px" />
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" fixed align="center" width="150px"/>
<el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px">
<el-editable-column :edit-render="{name: 'ElSelect', type: 'default'}" :label="$t('Hmodule.hw')" prop="locationId" align="center" width="200px" >
<template slot-scope="scope">
<el-select v-model="scope.row.locationId" :value="scope.row.locationId" :placeholder="$t('Hmodule.xzhw')" filterable style="width: 100%;" @visible-change="updatebatch($event,scope)">
<el-option
@ -186,7 +183,7 @@
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" :label="$t('updates.dcbm')" prop="batteryCode" align="center" min-width="150" >
<template slot="edit" slot-scope="scope">
<el-input v-if="isEdit4(scope.row)" v-model="scope.row.batteryCode" clearable @blur="getInfo2(scope.row)"/>
<el-input v-if="isEdit4(scope.row)" v-model="scope.row.batteryCode" clearable />
<span v-else>{{ scope.row.batteryCode }}</span>
</template>
</el-editable-column>
@ -231,6 +228,8 @@ export default {
},
data() {
return {
// id
supp: null,
ordercontrol: false,
//
entercontrol: false,
@ -321,6 +320,7 @@ export default {
}
}
this.supplierId = this.personalForm.supplierName
this.supp = this.personalForm.supplierId
this.enterDate = this.personalForm.enterDate
this.enterPersonId = this.personalForm.enterPersonName
this.stockPersonId = this.personalForm.stockPersonName
@ -346,14 +346,12 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
//
getMoney(row) {
console.log(row.actualEnterQuantity, row.price)
row.money = (Number(row.actualEnterQuantity) * Number(row.price)).toFixed(6)
return row.money
// row.money = (Number(row.actualEnterQuantity) * Number(row.includeTaxPrice)).toFixed(6)
// return row.money
},
//
getTaxMoney(row) {
@ -370,20 +368,40 @@ export default {
},
//
getTaxMoney2(row) {
row.taxMoney = (Number(row.price) * Number(row.taxRate) / 100 * Number(row.actualEnterQuantity)).toFixed(6)
row.taxMoney = (Number(row.enterPrice) * Number(row.taxRate) / 100 * Number(row.actualEnterQuantity)).toFixed(6)
return row.taxMoney
},
order(val) {
const that = this
console.log('ssssss', val)
const newarr = []
for (let i = 0; i < val.length; i++) {
// val[i].arrivalQuantity = (val[i].stockQuantity - val[i].allarrivalQuantity + val[i].returnQuantity).toFixed(6)
val[i].actualEnterQuantity = (val[i].basicQuantity - val[i].actualArrivalQuantity).toFixed(6)
this.$refs.editable.insert(val[i])
const re = val[i].productCode.slice(0, 2)
if (re === '05' && that.$store.getters.countryId === 2) {
const arrlength = Number(val[i].basicQuantity - val[i].actualArrivalQuantity)
let newobj = {}
for (let index = 0; index < arrlength; index++) {
newobj = val[i]
newobj.actualEnterQuantity = 1
newarr.push(newobj)
}
} else {
newarr.push(val[i])
}
}
for (const j in newarr) {
this.$refs.editable.insert(newarr[j])
}
console.log('newarr', newarr)
},
allOrderinfo(val) {
this.personalForm.enterRepositoryId = val.stockRepositoryId
this.enterRepositoryId = val.stockRepositoryName
this.personalForm.sourceNumber = val.orderNumber
this.personalForm.supplierId = val.supplierId
this.supp = val.supplierId
this.supplierId = val.supplierName
this.personalForm.stockPersonId = val.stockPersonId
this.stockPersonId = val.stockPersonName
@ -578,7 +596,7 @@ export default {
if (scope.row.flag === undefined) {
scope.row.flag = true
} else {
return scope.row.productCode
return
}
if (scope.row.flag) {
getlocation(this.personalForm.enterRepositoryId, scope.row).then(res => {
@ -591,7 +609,6 @@ export default {
})
}
scope.row.flag = false
return scope.row.productCode
},
//
deepClone(obj) {
@ -648,7 +665,6 @@ export default {
}
if (elem.batch === null || elem.batch === '' || elem.batch === undefined) {
delete elem.batch
i = 4
}
if (elem.productCode === null || elem.productCode === '' || elem.productCode === undefined) {
delete elem.productCode

View file

@ -382,6 +382,7 @@ export default {
orderdata.push(this.moreaction[i].stockOrderDetailVos[j])
}
}
console.log('orderdata', orderdata)
const orderDetail = orderdata.map(function(item) {
return {
productCode: item.productCode,
@ -398,7 +399,7 @@ export default {
giveDate: item.deliveryDate,
price: (Number(item.price)).toFixed(6),
includeTaxPrice: item.includeTaxPrice,
taxRate: (Number(item.taxRate)).toFixed(6),
taxRate: (Number(item.taxRate) * 100).toFixed(6),
money: item.money,
includeTaxMoney: item.includeTaxMoney,
taxMoney: item.tax,

View file

@ -341,21 +341,30 @@ export default {
}
},
activated() {
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
mounted() {
this.getdeptlist()
this.getlist()
this.getallrepositorys()
this.getallregionlist()
this.getChildRegion()
if (this.$store.getters.empcontract.receiptNumber) {
this.getemplist.moveNumber = this.$store.getters.empcontract.receiptNumber
}
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
deactivated() {
this.getemplist.moveNumber = ''
this.$store.dispatch('getempcontract', '')
},
mounted() {
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
beforeCreate() {
_that = this
},

View file

@ -783,7 +783,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,
@ -1087,7 +1086,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -150,7 +150,6 @@
</el-form-item>
</el-form> -->
<el-card class="box-card" style="margin-top: 15px" shadow="never">
<h2 ref="fuzhu" class="form-name" >{{ $t('updates.zpmx') }}</h2>
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
<el-button @click="handlerep">{{ $t('updates.tj') }}</el-button>
<my-repository2 :repositorycontrol.sync="repositorycontrol2" @repositoryname="repositoryname2"/>

View file

@ -640,7 +640,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -281,7 +281,7 @@ export default {
}, 100)
},
mounted() {
this.getlist()
// this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)

View file

@ -771,7 +771,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
return hasPermission
},
handleExport() {

View file

@ -619,7 +619,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
// console.log('hasPermission=======', hasPermission)
return hasPermission
},
//

View file

@ -452,7 +452,6 @@ export default {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
console.log('hasPermission=======', hasPermission)
if (hasPermission) {
printJS({
printable: arr,

View file

@ -175,7 +175,7 @@
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalFormreceiptStat === 2||personalForm.receiptStat === 3)" :key="personalForm.id + Math.random()" type="warning" size="mini" @click="handleReview()">
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :key="personalForm.id + Math.random()" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>
@ -292,12 +292,16 @@ export default {
if (this.personalForm.approvalUseVos && this.personalForm.approvalUseVos.length !== 0) {
const approvalUse = this.personalForm.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')
// console.log(approvalUse[approvalUse.length - 1].stepHandler)
// console.log(index)
console.log(approvalUse[approvalUse.length - 1].stepHandler)
console.log(index)
console.log(this.$store.getters.roles.includes('266-94-202'))
console.log(this.personalForm.direction)
if (index > -1 && (this.personalForm.judgeStat === 1 || this.personalForm.judgeStat === 0)) {
if (this.personalForm.direction === 1 && this.$store.getters.roles.includes('266-94-202')) {
if (this.personalForm.direction === '1' && this.$store.getters.roles.includes('266-94-202')) {
return true
} else if (this.personalForm.direction === 2) {
} else if (this.personalForm.direction === '2') {
return true
} else {
return false

View file

@ -19,6 +19,7 @@
style="width: 250px"/>
<el-button v-waves class="filter-item" size="small" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
@ -29,10 +30,15 @@
ref="table"
:data="list"
:height="tableHeight"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-table-column
:label="$t('saleBillList.productCode')"
prop="productCode"
@ -81,6 +87,7 @@ export default {
components: { MyRepository, MyDetail },
data() {
return {
downloadLoading: false,
tableHeight: 200,
getemplist: {
repositoryId: '',
@ -111,6 +118,64 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
console.log('this.list', this.list)
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['物品编码', '物品名称', '型号规格', '单位', '领料数量']
const filterVal = ['productCode', 'productName', 'productType', 'unit', 'accessQuantity']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '领料汇总表'
})
this.downloadLoading = false
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -162,7 +162,9 @@
</el-form>
</div>
<div>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" :title="$t('updates.spi')" type="warning" size="mini" icon="el-icon-view" circle @click="handleReview()"/>
<el-button v-show="isReview()&&(personalForm.receiptStat === 1||personalForm.receiptStat === 2||personalForm.receiptStat === 3)" type="warning" size="mini" @click="handleReview()">
{{ $t('updates.spi') }}
</el-button>
</div>
</el-card>

View file

@ -33,6 +33,8 @@
<!-- <el-input v-model="supplierId" :placeholder="$t('StockContract.supplierId')" size="small" class="filter-item" @focus="handlechoose" @clear="restFilter"/> -->
<!-- <my-supplier :control.sync="empcontrol" @supplierName="supplierName"/> -->
<el-button v-waves size="small" class="filter-item" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
<!-- 列表开始 -->
@ -41,10 +43,14 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-table-column
:label="$t('updates.repository')"
prop="repositoryName"
@ -233,6 +239,64 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
sums[2] = ''
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
console.log('this.list', this.list)
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['门店', '物品编号', '物品名称', '型号规格', '单位', '数量']
const filterVal = ['repositoryName', 'productCode', 'productName', 'productType', 'unit', 'quantity']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '库存呆滞料分析表'
})
this.downloadLoading = false
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -13,7 +13,7 @@
/>
</el-select> -->
<el-input v-model="getemplist.productCode " :placeholder="$t('updates.wpbm')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.productCode" :placeholder="$t('updates.wpbm')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.productName" :placeholder="$t('Hmodule.wpmc')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
@ -40,6 +40,7 @@
</el-select> -->
<el-button v-waves class="filter-item" size="small" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
@ -49,10 +50,15 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-table-column
:label="$t('update4.accessDate')"
prop="accessDate"
@ -239,6 +245,80 @@ export default {
_that = this
},
methods: {
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
const parms = {
repositoryId: this.getemplist.repositoryId,
productCode: this.getemplist.productCode,
productName: this.getemplist.productName,
accessNumber: this.getemplist.accessNumber,
beginTime: this.getemplist.beginTime,
endTime: this.getemplist.endTime,
pageNum: 1,
pageSize: 100000
}
batchTrack(parms).then(res => {
if (res.data.ret === 200) {
console.log('this.list', this.list)
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['领料日期', '领料单编号', '物品编号', '物品名称', '物品型号', '单位', '领料数量']
const filterVal = ['accessDate', 'accessNumber', 'productCode', 'productName', 'productType', 'unit', 'accessQuantity']
const data = this.formatJson(filterVal, res.data.data.content.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '物料批次跟踪报表'
})
this.downloadLoading = false
})
}
})
},
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
sums[1] = ''
sums[2] = ''
sums[3] = ''
return sums
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -30,6 +30,8 @@
<el-button v-waves class="filter-item" size="small" type="primary" icon="el-icon-search" style="width: 86px;margin-top:10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
@ -38,10 +40,14 @@
ref="table"
:data="list"
:height="tableHeight"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-table-column
:label="$t('inventoryCollect.productCode')"
prop="productCode"
@ -252,6 +258,63 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
console.log('this.list', this.list)
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['物品编码', '物品名称', '规格型号', '颜色', '单位', '库存数量', '成本均价', '库存金额', '零售金额', '批发金额', '毛利率']
const filterVal = ['productCode', 'productName', 'productType', 'color', 'unit', 'allQuantity', 'actualCostPrice', 'actualMoney', 'saleMoney', 'tradeMOney', 'rate']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '商品库存汇总表'
})
this.downloadLoading = false
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -10,6 +10,8 @@
<!-- <el-input v-model="supplierId" :placeholder="$t('StockContract.supplierId')" size="small" class="filter-item" @focus="handlechoose" @clear="restFilter"/> -->
<!-- <my-supplier :control.sync="empcontrol" @supplierName="supplierName"/> -->
<el-button v-waves size="small" class="filter-item" type="primary" icon="el-icon-search" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
<!-- 列表开始 -->
@ -18,24 +20,31 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index"/>
<el-table-column
:label="$t('stockOrderCount.repositoryName')"
prop="repositoryName"
width="200"
fixed
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productCode')"
prop="productCode"
width="200"
fixed
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productName')"
prop="productName"
width="200"
fixed
align="center"/>
<el-table-column
:label="$t('stockDetailCount.productType')"
@ -226,6 +235,62 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
console.log('this.list', this.list)
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['仓库', '物品编号', '物品名称', '规格型号', '单位', '单位数量', '配套数量', '库存数量', '差异数量']
const filterVal = ['repositoryName', 'productCode', 'productName', 'productType', 'unit', 'unitQuantity', 'matchQuantity', 'exsitQuantity', 'diffQuantity']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '库存配套分析表'
})
this.downloadLoading = false
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -17,6 +17,7 @@
<!-- 搜索按钮 -->
<el-button v-waves class="filter-item" size="small" type="primary" icon="el-icon-search" style="width: 86px;margin-top:10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>
<el-button v-waves :loading="downloadLoading" size="small" class="filter-item2" style="width: 86px" @click="handleExport"> <svg-icon icon-class="daochu"/>{{ $t('public.export') }}</el-button>
</el-card>
@ -26,19 +27,27 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
<el-table-column :label="$t('Hmodule.xh')" min-width="55" align="center" type="index" fixed/>
<el-table-column
:label="$t('inventoryCollect.productCode')"
prop="productCode"
width="200"
fixed
align="center"/>
<el-table-column
:label="$t('inventoryCollect.productName')"
prop="productName"
width="200"
fixed
align="center"/>
<!-- <el-table-column
:label="$t('inventoryCollect.productType')"
@ -49,6 +58,7 @@
:label="$t('inventoryCollect.repositoryName')"
prop="repositoryName"
width="200"
fixed
align="center"/>
<el-table-column
:label="$t('inventoryCollect.unit')"
@ -380,6 +390,74 @@ export default {
_that = this
},
methods: {
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {
return $1 + ','
})
})
return res
},
//
getSummaries2(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总计'
return
}
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = this.numFormat(values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return (Number(prev) + Number(curr)).toFixed(2)
} else {
return (Number(prev)).toFixed(2)
}
}, 0))
// console.log('sums[index]', sums[index])
sums[index] += ''
} else {
sums[index] = ''
}
})
sums[1] = ''
return sums
},
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
console.log('this.list', this.list)
const params = {
date: this.getemplist.date,
repositoryId: this.getemplist.repositoryId,
code: this.getemplist.code,
pageNum: 1,
pageSize: 10000000
}
inventorychangelist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['物品编码', '物品名称', '仓库', '单位', '期初结存数量', '期初结存金额', '销售出库数量', '销售出库金额', '本期采购退货数量', '本期采购退货金额', '本期销售退货数量', '本期销售退货金额', '采购入库数量', '采购入库金额', '其他入库数量', '其他入库金额', '生产完工入库数量', '生产完工入库金额', '调拨入库数量', '调拨入库金额', '调拨出库数量', '调拨出库金额', '盘盈数量', '盘盈金额', '盘亏数量', '盘亏金额', '本期入库数量', '本期入库金额', '本期出库数量', '本期出库金额', '期末结存数量', '期末结存金额']
const filterVal = ['productCode', 'productName', 'repositoryName', 'unit', 'begin', 'beginMoney', 'saleOut', 'saleOutMoney', 'stockReturn', 'stockReturnMoney', 'saleReturn', 'saleReturnMoney', 'stockEnter', 'stockEnterMoney', 'otherEnter', 'otherEnterMoney', 'produceEnter', 'produceEnterMoney', 'moveIn', 'moveInMoney', 'moveOut', 'moveOutMoney', 'countFlow', 'countFlowMoney', 'countLess', 'countLessMoney', 'allEnter', 'allEnterMoney', 'allOut', 'allOutMoney', 'end', 'endMoney']
const data = this.formatJson(filterVal, res.data.data.content)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '库存月报表'
})
this.downloadLoading = false
})
}
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

Some files were not shown because too many files have changed in this diff Show more