feat:配权限

feat:配权限
This commit is contained in:
shawnzhang 2021-02-04 16:47:32 +08:00
parent 3832b05343
commit 47d06b7901
22 changed files with 269 additions and 39 deletions

View file

@ -57,6 +57,12 @@ export function installmentlist(query) {
if (query.overdueMonth !== '' && query.overdueMonth !== null && query.overdueMonth !== undefined) {
params.append('overdueMonth', query.overdueMonth) // 你要传给后台的参数值 key/value
}
if (query.dayu !== '' && query.dayu !== null && query.dayu !== undefined) {
params.append('dayu', query.dayu) // 你要传给后台的参数值 key/value
}
if (query.xiaoyu !== '' && query.xiaoyu !== null && query.xiaoyu !== undefined) {
params.append('xiaoyu', query.xiaoyu) // 你要传给后台的参数值 key/value
}
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
return request({

View file

@ -119,3 +119,14 @@ export function updatesaleContract2(query) {
data: params
})
}
// 销售合同打印接口
export function creatContract(query) {
var params = new URLSearchParams()
params.append('id', query) // 你要传给后台的参数值 key/value
return request({
url: '/saleContract/creatContract',
method: 'post',
data: params
})
}

View file

@ -163,13 +163,17 @@ export function searchprepReturn(query) {
params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
}
if (query.customerType !== '' && query.customerType !== null && query.customerType !== undefined) {
params.append('customerType', query.customerType) // 你要传给后台的参数值 key/value
params.append('customerType', 1) // 你要传给后台的参数值 key/value
}
if (query.customerId !== '' && query.customerId !== null && query.customerId !== undefined) {
params.append('customerId', query.customerId) // 你要传给后台的参数值 key/value
}
if (query.customerName !== '' && query.customerName !== null && query.customerName !== undefined) {
params.append('customerName', query.customerName) // 你要传给后台的参数值 key/value
}
params.append('pageNum', query.pageNum) // 你要传给后台的参数值 key/value
params.append('pageSize', query.pageSize) // 你要传给后台的参数值 key/value
params.append('customerType', 1) // 你要传给后台的参数值 key/value
return request({
url: '/prepReturn/search',
method: 'post',

View file

@ -1,4 +1,5 @@
import request from '@/utils/request'
import store from '@/store'
// 添加采购到货
export function createstockArrival(query, query2, query3) {
@ -54,8 +55,10 @@ export function searchstockArrival(query) {
if (query.endTime !== '' && query.endTime !== null && query.endTime !== undefined) {
params.append('endTime', query.endTime) // 你要传给后台的参数值 key/value
}
if (query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) {
if ((query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) && store.getters.countryId === 1) {
params.append('repositoryId', 0) // 你要传给后台的参数值 key/value
} else if ((query.repositoryId !== '' && query.repositoryId !== null && query.repositoryId !== undefined) && store.getters.countryId !== 1) {
params.append('repositoryId', query.repositoryId) // 你要传给后台的参数值 key/value
}
if (query.createPersonId !== '' && query.createPersonId !== null && query.createPersonId !== undefined) {
params.append('createPersonId', query.createPersonId) // 你要传给后台的参数值 key/value
@ -63,6 +66,10 @@ export function searchstockArrival(query) {
// if (query.regionIds !== '' && query.regionIds !== null && query.regionIds !== undefined) {
// params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
// }
if ((query.regionIds !== '' && query.regionIds !== null && query.regionIds !== undefined) && store.getters.countryId !== 1) {
params.append('regionIds', query.regionIds) // 你要传给后台的参数值 key/value
}
if (query.isActive !== '' && query.isActive !== null && query.isActive !== undefined) {
params.append('isActive', query.isActive) // 你要传给后台的参数值 key/value
}

View file

@ -119,3 +119,14 @@ export function editestoragemovediff2(query) {
data: params
})
}
// 返还库存
export function returnInventory(query) {
var params = new URLSearchParams()
params.append('reportId', query) // 你要传给后台的参数值 key/value
return request({
url: '/moveDiff/returnInventory',
method: 'post',
data: params
})
}

View file

@ -4577,7 +4577,7 @@ export default {
nowStock: '现有库存',
xxyj: '下限预警',
sxyj: '上限预警',
aqkcyj: '安全库存预警',
aqkcyj: '安全库存',
niyou: '你有',
tiaodanbanderenwu: '条待办的任务',
tiaodaichuli: '条待处理的事件',
@ -4620,6 +4620,13 @@ export default {
shoukuandanzhinajin: '收款单(滞纳金)',
shoukandajlreceiptNumber: '赔偿单编号',
shoukandanquerenshouk: '确认收款',
querenmingxi: '确认明细'
querenmingxi: '确认明细',
dayu: '逾期金额大于',
xiaoyu: '逾期金额小于',
querenfanhuan: '确认返还库存',
shengchengpeichangdan: '生成赔偿单',
quedingfanhuan: '确定返还?',
queding: '确定'
}
}

View file

@ -20,7 +20,7 @@ import i18n from './lang' // Internationalization
import './icons' // icon
import './errorLog' // error log
import './permission' // permission control
import './mock' // simulation data
// import './mock' // simulation data
import Print from 'vue-print-nb'
import * as filters from './filters' // global filters
import _ from 'lodash'

View file

@ -964,7 +964,7 @@ export const asyncRouterMap = [
path: 'AddStoragemovediff',
component: () => import('@/views/Storagemovediff/adddiff'),
name: 'AddStoragemovediff',
meta: { title: 'AddStoragemovediff', noCache: false, roles: ['131-141-361-1'] }
meta: { title: 'AddStoragemovediff', noCache: false, roles: ['131-141-361-1-1-1-1-1'] }
},
{
path: 'difflist',
@ -1049,20 +1049,21 @@ export const asyncRouterMap = [
meta: {
title: 'InventoryReceipt',
icon: 'sunhuai',
type: 4
type: 4,
roles: ['131-415-1', '131-415-4']
},
children: [
{
path: 'NewInventoryReceipt',
component: () => import('@/views/InventoryReceipt/NewInventoryReceipt'),
name: 'NewInventoryReceipt',
meta: { title: 'NewInventoryReceipt', noCache: false }
meta: { title: 'NewInventoryReceipt', noCache: false, roles: ['131-415-1'] }
},
{
path: 'InventoryReceiptList',
component: () => import('@/views/InventoryReceipt/InventoryReceiptList'),
name: 'InventoryReceiptList',
meta: { title: 'InventoryReceiptList', noCache: false }
meta: { title: 'InventoryReceiptList', noCache: false, roles: ['131-415-1', '131-415-2', '131-415-3', '131-415-4', '131-415-5', '131-415-6', '131-415-7', '131-415-17', '131-415-18', '131-415-76'] }
}
]
},

View file

@ -333,6 +333,7 @@ export default {
this.newApprovalParms.processNames = name.join(',')
this.newApprovalParms.processIds = id.join(',')
this.newApprovalParms.createId = this.$store.getters.userId
console.log('this.newApprovalParms', this.newApprovalParms)
if (!this.newApprovalParms.remark) {
this.$notify.error({

View file

@ -670,7 +670,10 @@ export default {
console.log('regions', regions)
if (regions != null) {
for (let j = 0; j < regions.length; j++) {
regionsName = regionsName + regions[j].regionName + ', '
if (regions[j]) {
console.log('regions[j]', regions[j])
regionsName = regionsName + regions[j].regionName + ', '
}
}
if (regionsName.length > 0) {
regionsName = regionsName.substr(0, regionsName.length - 2)
@ -801,7 +804,11 @@ export default {
console.log('regions', regions)
if (regions != null) {
for (let j = 0; j < regions.length; j++) {
regionsName = regionsName + regions[j].regionName + ', '
if (regions[j]) {
console.log('regions[j]', regions[j])
regionsName = regionsName + regions[j].regionName + ', '
}
// regionsName = regionsName + regions[j].regionName + ', '
}
if (regionsName.length > 0) {
regionsName = regionsName.substr(0, regionsName.length - 2)

View file

@ -53,15 +53,15 @@
{{ $t('public.batchoperation') }} <i class="el-icon-arrow-down el-icon--right"/>
</el-button>
<el-dropdown-menu slot="dropdown" style="width: 140px">
<el-dropdown-item v-permission="['54-57-2']" style="text-align: left" command="delete"><svg-icon icon-class="shanchu" style="width: 40px"/>{{ $t('public.delete') }}</el-dropdown-item>
<el-dropdown-item v-permission="['131-415-2']" 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="['54-57-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="['131-415-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="['54-57-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="['131-415-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="['54-57-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-button v-permission="['131-415-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-card>
<el-card :body-style=" { padding: '10px' }" class="box-card" shadow="never">
@ -124,8 +124,8 @@
<el-table-column :label="$t('public.actions')" :resizable="false" align="center">
<template slot-scope="scope">
<el-button v-permission="['1-14-16-3']" v-show="scope.row.judgeStat === 0" :title="$t('updates.xg')" :key="scope.row.id + Math.random()" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-permission="['1-14-16-2']" v-show="scope.row.judgeStat === 0" :title="$t('updates.sc')" :key="scope.row.id + Math.random()" scope-row-create-person-id- size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(scope.row)"/>
<el-button v-permission="['131-415-3']" v-show="scope.row.judgeStat === 0" :title="$t('updates.xg')" :key="scope.row.id + Math.random()" type="primary" size="mini" icon="el-icon-edit" circle @click="handleEdit(scope.row)"/>
<el-button v-permission="['131-415-2']" v-show="scope.row.judgeStat === 0" :title="$t('updates.sc')" :key="scope.row.id + Math.random()" scope-row-create-person-id- size="mini" type="danger" icon="el-icon-delete" circle @click="handleDelete(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-show="isReview4(scope.row)" :title="$t('updates.fsp')" type="warning" size="mini" circle @click="handleReview4(scope.row)"><svg-icon icon-class="fanhui"/></el-button>
<el-button v-show="judgeStat(scope.row)" :title="$t('update4.shoukandanquerenshouk')" type="success" size="mini" icon="el-icon-check" circle @click="handleConfirm(scope.row)"/>

View file

@ -11,6 +11,9 @@
<el-input v-model="repositoryId" :placeholder="$t('StockAlarm.searchRepositoryId')" size="small" class="filter-item" clearable @keyup.enter.native="handleFilter" @focus="handlechooseRep" @clear="clearFilter"/>
<my-repository :repositorycontrol.sync="repositorycontrol" @repositoryname="repositoryname"/>
<el-input v-model="getemplist.dayu" :placeholder="$t('update4.dayu')" size="small" type="number" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-input v-model="getemplist.xiaoyu" :placeholder="$t('update4.xiaoyu')" size="small" type="number" class="filter-item" clearable @keyup.enter.native="handleFilter"/>
<el-popover
v-model="visible2"
placement="bottom"
@ -613,6 +616,9 @@ export default {
//
handleFilter() {
this.getemplist.pageNum = 1
if (this.getemplist.dayu && this.getemplist.xiaoyu) {
this.getemplist.xiaoyu = ''
}
installmentlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
this.list = res.data.data.content.list

View file

@ -488,8 +488,11 @@ export default {
changereceiptmoney(money) {
const val = Number(money) + Number(this.personalForm.couponSupport) - Number(this.personalForm.penaltyMoney)
console.log(val)
console.log(this.personalForm.couponSupport)
console.log(this.personalForm.penaltyMoney)
this.$refs.editable2.clear()
const data = this.deepClone(this.allorderarr)
console.log('data', data)
// const EnterDetail = this.$refs.editable2.getRecords()
let s = 0
let z = val
@ -525,6 +528,8 @@ export default {
console.log(val)
this.$refs.editable2.clear()
const data = this.deepClone(this.allorderarr)
console.log('data', data)
// const EnterDetail = this.$refs.editable2.getRecords()
let s = 0
let z = val
@ -1032,6 +1037,7 @@ export default {
//
restAllForm() {
this.personalForm = {
createPersonId: this.$store.getters.userId,
countryId: this.$store.getters.countryId,
repositoryId: this.$store.getters.repositoryId,
@ -1039,9 +1045,18 @@ export default {
sourceType: '1',
receiptMoney: 0,
deductionMoney: 0,
totalLackMoney: 0,
couponSupportOld: 0,
couponSupport: 0,
couponMoney: 0,
penaltyMoney: 0,
customerType: '2',
receiptDate: null
receiptDate: null,
couponSupports: [
{
couponSupport: 0
}
]
}
this.receiptPersonId = null
this.customerId = null

View file

@ -340,6 +340,7 @@
<script>
import printJS from 'print-js'
import { searchRepository3 } from '@/api/Repository'
import { creatContract } from '@/api/SaleContract'
// import datazzz from '@/utils/salecontract'
var _that
export default {
@ -515,7 +516,11 @@ export default {
this.categoryVisible = false
},
setdata() {
this.categoryVisible = true
creatContract(this.personalForm.id).then(res => {
console.log('res', res)
window.location.href = res.request.responseURL + '?id=' + this.personalForm.id
})
// this.categoryVisible = true
// console.log(this.$store.getters.printdata)
// const routeUrl = this.$router.resolve({
// path: '/SaleContract/download'

View file

@ -13,9 +13,11 @@
width="500"
size="small"
trigger="click">
<el-input v-model="getemplist.customerName" :placeholder="$t('SaleOrder.customerName')" size="small" style="width: 40%;float: right;margin-right: 20px;" clearable/>
<!-- <my-customer :customercontrol.sync="customercontrol" @customerdata="customerdata"/>
<!-- <el-input v-model="getemplist.customerName" :placeholder="$t('SaleOrder.customerName')" size="small" style="width: 40%;float: right;margin-right: 20px;" clearable/>
<my-customer :customercontrol.sync="customercontrol" @customerdata="customerdata"/>
<my-agent :agentcontrol.sync="agentcontrol" @agentdata="agentdata"/> -->
<el-input v-model="customerName" :placeholder="$t('SaleReturn.customerName')" size="small" style="width: 40%;float: right;margin-right: 20px;" clearable @clear="restFilter" @focus="chooseCustomer"/>
<my-customer :customercontrol.sync="customercontrol" @customerdata="customerdata"/>
<el-select v-model="getemplist.receiptStat" :value="getemplist.receiptStat" :placeholder="$t('updates.djzt')" size="small" clearable style="width: 40%;float: left;margin-left: 20px;margin-top: 20px">
<el-option :label="$t('updates.zd')" value="1"/>
<el-option :label="$t('updates.zx')" value="2"/>
@ -441,11 +443,7 @@ export default {
},
// focus
chooseCustomer() {
if (this.getemplist.customerType === '1') {
this.agentcontrol = true
} else if (this.getemplist.customerType === '2') {
this.customercontrol = true
}
this.customercontrol = true
},
customerdata(val) {
this.getemplist.customerId = val.id

View file

@ -386,7 +386,7 @@ export default {
pickerOptions2: {
disabledDate: (time) => {
const _now = Date.now()
const seven = 30 * 24 * 60 * 60 * 1000
const seven = 60 * 24 * 60 * 60 * 1000
const sevenDays = _now - seven
return time.getTime() > _now || time.getTime() < sevenDays
}

View file

@ -88,6 +88,7 @@
<el-col :span="12">
<el-form-item :label="$t('SaleReturn.returnDate')" prop="returnDate" style="width: 100%;">
<el-date-picker
:picker-options="pickerOptions2"
v-model="personalForm.returnDate"
type="date"
value-format="yyyy-MM-dd"
@ -343,6 +344,14 @@ export default {
}
}
return {
pickerOptions2: {
disabledDate: (time) => {
const _now = Date.now()
const seven = 60 * 24 * 60 * 60 * 1000
const sevenDays = _now - seven
return time.getTime() > _now || time.getTime() < sevenDays
}
},
//
isshow: false,
//

View file

@ -645,6 +645,7 @@ export default {
getlist() {
// 123
this.listLoading = true
console.log('getemplist', this.getemplist, this.$store.getters)
searchstockArrival(this.getemplist).then(res => {
if (res.data.ret === 200) {
const needlist = res.data.data.content.list

View file

@ -49,6 +49,7 @@
:key="tableKey"
:data="list"
:height="tableHeight"
:row-key="getRowKeys"
size="small"
border
fit
@ -56,6 +57,7 @@
style="width: 100%;"
@selection-change="handleSelectionChange">
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
@ -150,6 +152,11 @@ export default {
},
data() {
return {
select_orderId: [],
select_order_number: [],
getRowKeys(row) {
return row.code
},
tableHeight: 200,
//
@ -251,8 +258,18 @@ export default {
})
},
//
handleSelectionChange(val) {
this.moreaction = val
handleSelectionChange(rows) {
this.moreaction = rows
this.tiaoshu = this.moreaction.length
this.select_order_number = this.moreaction.length
this.select_orderId = []
if (rows) {
rows.forEach(row => {
if (row) {
this.select_orderId.push(row.code)
}
})
}
},
// focus
handlechoose() {

View file

@ -213,7 +213,7 @@
<script>
import { getRepositoryList, detailList } from '@/api/Expenses'
import { regionlist } from '@/api/public'
import { regionlist, getregionlistbyreid } from '@/api/public'
import { getdeptlist } from '@/api/BasicSettings'
import { searchlist, deletestoragemove, updateStoragemove2 } from '@/api/Storagemove'
import waves from '@/directive/waves' // Waves directive
@ -257,6 +257,7 @@ export default {
},
data() {
return {
usersRegions: [],
sploading: false,
tableHeight: 200,
@ -350,6 +351,7 @@ export default {
this.getlist()
this.getallrepositorys()
this.getallregionlist()
this.getChildRegion()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
@ -358,6 +360,20 @@ export default {
_that = this
},
methods: {
getChildRegion() {
const parms = {
loginRepositoryId: this.$store.getters.repositoryId,
regionIds: this.$store.getters.regionId
}
getregionlistbyreid(parms).then(res => {
if (res.data.ret === 200) {
this.usersRegions = res.data.data.content.map(item => {
return item.id
})
}
})
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)
@ -835,10 +851,12 @@ export default {
console.log(this.$store.getters.userId)
console.log(this.$store.getters.regionId)
console.log('userepository', userepository)
const judgeRegion = this.usersRegions.includes(row.moveOutRepositoryRegion)
console.log('judgeRegion', judgeRegion)
if (row.moveType === 1) {
console.log('row', row)
console.log('row.modifyStat', row.modifyStat)
if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0 && (userepository === row.moveOutRepository || (this.$store.getters.regionId === row.moveOutRepositoryRegion && this.$store.getters.repositoryId === 0))) {
if (row.approvalUseVos !== '' && row.approvalUseVos !== null && row.approvalUseVos !== undefined && row.approvalUseVos.length !== 0 && (userepository === row.moveOutRepository || (judgeRegion && this.$store.getters.repositoryId === 0))) {
console.log(1233444444)
const approvalUse = row.approvalUseVos
const index = approvalUse[approvalUse.length - 1].stepHandler.indexOf(',' + this.$store.getters.userId + ',')

View file

@ -1,5 +1,15 @@
<template>
<el-dialog :visible.sync="editVisible" :editcontrol="editcontrol" :editdata="editdata" :close-on-press-escape="false" class="edit" width="1010px" top="10px" @close="$emit('update:editcontrol', false)">
<el-dialog
:visible.sync="editVisible"
:editcontrol="editcontrol"
:editdata="editdata"
:close-on-press-escape="false"
:close-on-click-modal="false"
:before-close="closemove"
class="edit"
width="1010px"
top="10px"
@close="$emit('update:editcontrol', false)" >
<!-- 基本信息 -->
<el-card class="box-card">
<h2 ref="geren" class="form-name">{{ $t('Hmodule.basicinfo') }}</h2>
@ -232,6 +242,7 @@
<script>
import { updateStoragemove, editStoragein, confirmStoragein, updateStoragemove2 } from '@/api/Storagemove'
import { createstoragemovediff } from '@/api/Storagemovediff'
import { getdeptlist } from '@/api/BasicSettings'
import { locationlist } from '@/api/public'
import MyRepository from './MyRepository'
@ -270,6 +281,7 @@ export default {
},
data() {
return {
diffDetailArr: [],
ischeck: false,
// id
id: '',
@ -382,15 +394,17 @@ export default {
for (const i in this.list4) {
if (this.list4[i].stat === 2) {
count++
this.list4.confirmNumber = count
}
}
if (this.list4.confirmNumber === this.list4.length) {
if (count === this.list4.length) {
console.log('监听变化')
const parms = JSON.stringify(reviewParms)
updateStoragemove2(parms).then(res => {
console.log(res)
this.$emit('rest', true)
if (res.data.ret === 200) {
this.$emit('rest', true)
this.editVisible = false
}
})
}
}
@ -407,6 +421,10 @@ export default {
_that = this
},
methods: {
closemove() {
this.$emit('rest', true)
this.editVisible = false
},
getdatatime() { //
var date = new Date()
var seperator1 = '-'
@ -449,6 +467,7 @@ export default {
},
//
handleEdit2(row) {
console.log('row', row)
this.ischeck = true
if (row.data.locationId === null) {
this.$notify.error({
@ -460,7 +479,7 @@ export default {
return false
}
console.log(row.data.id)
console.log(row.id)
// console.log(row.id)
const confirmPersonId = this.$store.getters.userId
const query = JSON.stringify(row.data)
const that = this
@ -472,6 +491,67 @@ export default {
if (res.data.ret === 200) {
row.data.stat = 2
that.ischeck = false
const rest = this.$refs.editable3.getRecords()
if (Number(row.data.actualQuantity) !== Number(row.data.moveQuantity)) {
that.diffDetailArr.push(row.data)
}
console.log('diffDetailArr', that.diffDetailArr)
const diffData = {
title: 'auto diff ' + that.personalForm.moveNumber,
moveNumber: that.personalForm.moveNumber,
inRepositoryId: that.personalForm.moveInRepository,
outRepositoryId: that.personalForm.moveOutRepository,
arrivalDate: that.personalForm.requestArrivalDate,
moveDate: that.personalForm.createDate,
createPersonId: that.$store.getters.userId,
countryId: that.$store.getters.countryId,
repositoryId: that.$store.getters.repositoryId,
regionId: that.$store.getters.regionId,
requestDeptId: that.$store.getters.deptId
}
const actualDiffDetail = that.diffDetailArr.map(item => {
return {
productCode: item.productCode,
productName: item.productName,
color: item.color,
sendQuantity: item.moveQuantity,
actualQuantity: item.actualQuantity,
diffQuantity: Math.abs(Number(item.moveQuantity) - Number(item.actualQuantity)),
diffMoney: 0,
result: null
}
})
console.log('diffData', diffData)
console.log('actualDiffDetail', actualDiffDetail)
console.log('this.list4', this.list4)
console.log('rest', rest)
const isEveryArr = rest.map(item => {
return item.stat
}).every(item => {
return item === 2
})
console.log('isEveryArr', isEveryArr)
if (isEveryArr) {
console.log('监听变化')
const diffDataParms = JSON.stringify(diffData)
const diffDetailDataParms = JSON.stringify(actualDiffDetail)
createstoragemovediff(diffDataParms, diffDetailDataParms, diffData).then(res => {
console.log('res2', res)
if (res.data.ret === 200) {
this.$emit('rest', true)
this.editVisible = false
}
})
}
}
})
} else {

View file

@ -68,7 +68,7 @@
<!-- 打印操作 -->
<!-- <el-button v-permission="['131-138-140-7']" v-waves class="filter-item" icon="el-icon-printer" style="width: 86px" @click="handlePrint">{{ $t('public.print') }}</el-button> -->
<!-- 新建操作 -->
<el-button v-permission="['131-141-360-1']" v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button>
<!-- <el-button v-permission="['131-141-360-1']" v-waves class="filter-item" icon="el-icon-plus" type="success" style="width: 86px" @click="handleAdd">{{ $t('public.add') }}</el-button> -->
</el-card>
<el-card class="box-card" style="margin-top: 15px">
<!-- 列表开始 -->
@ -142,6 +142,9 @@
<el-button v-permission="['131-141-360-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="['131-141-360-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-permission="['131-141-360-2']" v-if="scope.row.judgeStat === 0" size="mini" type="danger" @click="handleDelete(scope.row)">{{ $t('public.delete') }}</el-button>
<el-button v-permission="['131-141-360-84']" v-show="scope.row.judgeStat === 2&& scope.row.receiptStat === 2" :loading="returnLoading" type="success" size="mini" @click="handReturnInventory(scope.row)">{{ $t('update4.querenfanhuan') }}</el-button>
<el-button v-permission="['131-141-360-85']" v-show="scope.row.judgeStat === 2&& scope.row.receiptStat === 2" type="success" size="mini" @click="handleReview3(scope.row)">{{ $t('update4.shengchengpeichangdan') }}</el-button>
</template>
</el-table-column>
</el-table>
@ -156,7 +159,7 @@
<script>
// import { searchOutlist, deleteStock, updateotherenter2 } from '@/api/StockOut'
import { searchstoragemovediff, deletestoragemovediff, editestoragemovediff2 } from '@/api/Storagemovediff'
import { searchstoragemovediff, deletestoragemovediff, editestoragemovediff2, returnInventory } from '@/api/Storagemovediff'
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' //
@ -194,6 +197,7 @@ export default {
},
data() {
return {
returnLoading: false,
//
reviewParms: {
id: '',
@ -250,6 +254,28 @@ export default {
_that = this
},
methods: {
handReturnInventory(row) {
this.$confirm(this.$t('update4.quedingfanhuan'), this.$t('update4.queding'), {
distinguishCancelAndClose: true,
confirmButtonText: this.$t('update4.queding'),
type: 'warning'
}).then(() => {
returnInventory(row.id).then(res => {
if (res.data.ret === 200) {
this.$message({
type: 'success',
message: 'success'
})
this.getlist()
} else {
this.$message({
type: 'error',
message: res.data.msg
})
}
})
})
},
//
timestampToTime(timestamp) {
var date = new Date(timestamp)// 10*1000131000
@ -286,7 +312,7 @@ export default {
if (res.data.data.result === false) {
this.$message({
type: 'error',
message: this.$t('prompt.fspsb')
message: res.data.msg
})
} else {
this.$message({