mirror of
https://github.com/shawncai/ERP.git
synced 2024-09-20 15:06:11 +08:00
Merge branch 'master' of https://github.com/shawncai/ERP
This commit is contained in:
commit
a8e1862779
|
@ -737,7 +737,8 @@ export default {
|
|||
costName: 'cost name',
|
||||
subjectId: 'corresponding subject',
|
||||
isEffective: 'initiated mode',
|
||||
createId: 'Creator'
|
||||
createId: 'Creator',
|
||||
unit: 'unit'
|
||||
},
|
||||
SubjectFinance: {
|
||||
subjectNumber: 'subject no.',
|
||||
|
|
|
@ -743,7 +743,8 @@ export default {
|
|||
costName: '费用名称',
|
||||
subjectId: '往来科目',
|
||||
isEffective: '启用状态',
|
||||
createId: '创建人'
|
||||
createId: '创建人',
|
||||
unit: '单位'
|
||||
},
|
||||
SubjectFinance: {
|
||||
subjectNumber: '科目代码',
|
||||
|
|
|
@ -360,7 +360,7 @@ export const asyncRouterMap = [
|
|||
{
|
||||
path: 'AddRedStockInvoice',
|
||||
component: () => import('@/views/StockInvoice/AddRedStockInvoice'),
|
||||
hidden: true,
|
||||
// hidden: true,
|
||||
name: 'AddRedStockInvoice',
|
||||
meta: { title: 'AddRedStockInvoice', noCache: false }
|
||||
},
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</el-col> -->
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('AdvancePay.ratioId')" prop="ratioRate" style="margin-left: 18px;width: 100%;margin-bottom: 0">
|
||||
<el-input v-model="personalForm.ratioRate" type="number" style="width: 200px" clearable @blur="handerchoose"/>
|
||||
<el-input v-model="personalForm.ratioRate" type="number" style="width: 200px" clearable @input="handerchoose"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
@ -140,6 +140,13 @@ export default {
|
|||
callback()
|
||||
}
|
||||
}
|
||||
const validatePass4 = (rule, value, callback) => {
|
||||
if (this.personalForm.orderMoney === undefined || this.personalForm.orderMoney === null || this.personalForm.orderMoney === '') {
|
||||
callback(new Error('请输入订单金额'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validatePass = (rule, value, callback) => {
|
||||
console.log(this.supplierId)
|
||||
if (this.supplierId === undefined || this.supplierId === null || this.supplierId === '') {
|
||||
|
@ -216,7 +223,8 @@ export default {
|
|||
totalMoney: 0,
|
||||
ratioRate: 100,
|
||||
payDate: null,
|
||||
payAccount: ''
|
||||
payAccount: '',
|
||||
settleMode: null
|
||||
},
|
||||
// 采购申请单规则数据
|
||||
personalrules: {
|
||||
|
@ -233,7 +241,7 @@ export default {
|
|||
{ required: true, message: '请输入预付金额', trigger: 'blur' }
|
||||
],
|
||||
orderMoney: [
|
||||
{ required: true, message: '请输入订单金额', trigger: 'blur' }
|
||||
{ required: true, validator: validatePass4, trigger: 'blur' }
|
||||
],
|
||||
payAccount: [
|
||||
{ required: true, message: '请输入付款账户', trigger: 'blur' }
|
||||
|
@ -260,7 +268,9 @@ export default {
|
|||
this.getways()
|
||||
this.getdatatime()
|
||||
},
|
||||
|
||||
activated() {
|
||||
this.getinformation()
|
||||
},
|
||||
mounted() {
|
||||
this.getinformation()
|
||||
this.getcurrency()
|
||||
|
@ -271,6 +281,7 @@ export default {
|
|||
methods: {
|
||||
getcurrency() {
|
||||
const mycountry = this.$store.getters.countryId
|
||||
console.log('mycountry============', mycountry)
|
||||
if (mycountry === 1) {
|
||||
this.personalForm.currency = '3'
|
||||
} else if (mycountry === 2) {
|
||||
|
@ -306,6 +317,7 @@ export default {
|
|||
if (this.$store.getters.empcontract.settleMode !== null) {
|
||||
this.personalForm.settleMode = this.$store.getters.empcontract.settleMode
|
||||
}
|
||||
this.handerchoose()
|
||||
this.$store.dispatch('getempcontract', '')
|
||||
}
|
||||
},
|
||||
|
@ -538,6 +550,7 @@ export default {
|
|||
this.ourContractorId = null
|
||||
this.acceptPersonId = null
|
||||
this.getdatatime()
|
||||
this.getcurrency()
|
||||
},
|
||||
// 保存操作
|
||||
handlesave() {
|
||||
|
|
|
@ -51,6 +51,11 @@
|
|||
<el-option :label="$t('updates.ty')" value="2"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('CostInstall.unit')" label-width="100px">
|
||||
<el-select v-model="addCategoryForm.unit" filterable style="width: 300px">
|
||||
<el-option v-for="(item, index) in measurements" :key="index" :value="item.id" :label="item.categoryName"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
|
||||
|
@ -135,6 +140,11 @@
|
|||
<el-option :label="$t('updates.ty')" value="2"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('CostInstall.unit')" label-width="100px">
|
||||
<el-select v-model="editCategoryForm.unit" filterable style="width: 300px">
|
||||
<el-option v-for="(item, index) in measurements" :key="index" :value="item.id" :label="item.categoryName"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="handleOk()">{{ $t('public.edit') }}</el-button>
|
||||
|
@ -155,7 +165,7 @@ import Pagination from '@/components/Pagination' // Secondary package based on e
|
|||
import permission from '@/directive/permission/index.js' // 权限判断指令
|
||||
import permission2 from '@/directive/permission2/index.js' // 权限判断指令
|
||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||
|
||||
import { searchMea } from '@/api/Product'
|
||||
var _that
|
||||
export default {
|
||||
name: 'EmpCategory',
|
||||
|
@ -181,7 +191,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
|
||||
measurements: [],
|
||||
// 费用类别
|
||||
category: [],
|
||||
// 批量删除参数
|
||||
|
@ -267,6 +277,7 @@ export default {
|
|||
}, 100)
|
||||
},
|
||||
mounted() {
|
||||
this.getunit()
|
||||
this.getlist()
|
||||
setTimeout(() => {
|
||||
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
|
||||
|
@ -276,6 +287,13 @@ export default {
|
|||
_that = this
|
||||
},
|
||||
methods: {
|
||||
getunit() {
|
||||
searchMea().then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.measurements = res.data.data.content
|
||||
}
|
||||
})
|
||||
},
|
||||
clickRow(val) {
|
||||
this.$refs.table.toggleRowSelection(val)
|
||||
},
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('StockInvoice.invoiceNumber')" prop="invoiceNumber" style="width: 100%;">
|
||||
<el-input v-model="personalForm.invoiceNumber" disabled style="margin-left: 18px;width:200px" clearable/>
|
||||
<el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width:200px" clearable/>
|
||||
<my-supplier :control.sync="empcontrol" @supplierName="supplierName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('StockInvoice.supplierId')" prop="supplierId" style="width: 100%;">
|
||||
<el-input v-model="supplierId" style="margin-left: 18px;width:200px" disabled clearable @focus="handlechoose"/>
|
||||
<el-input v-model="supplierId" style="margin-left: 18px;width:200px" clearable @focus="handlechoose"/>
|
||||
<my-emp :control.sync="stockControl" @stockName="stockName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -98,12 +98,12 @@
|
|||
<!-- </el-col>-->
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('StockInvoice.handlePersonId')" prop="handlePersonId" style="width: 100%;">
|
||||
<el-input v-model="handlePersonId" disabled style="margin-left: 18px;width:200px" clearable @focus="handlechooseStock"/>
|
||||
<el-input v-model="handlePersonId" style="margin-left: 18px;width:200px" clearable @focus="handlechooseStock"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="$t('StockInvoice.deptId')" style="width: 100%;">
|
||||
<el-select v-model="personalForm.deptId" disabled clearable style="margin-left: 18px;width: 200px">
|
||||
<el-select v-model="personalForm.deptId" clearable style="margin-left: 18px;width: 200px">
|
||||
<el-option
|
||||
v-for="(item, index) in depts"
|
||||
:key="index"
|
||||
|
@ -131,7 +131,7 @@
|
|||
<el-card class="box-card" style="margin-top: 15px" shadow="never">
|
||||
<h2 ref="fuzhu" class="form-name" >红字采购发票明细</h2>
|
||||
<div class="buttons" style="margin-top: 35px;margin-bottom: 10px;">
|
||||
<!-- <el-button style="width: 130px" @click="handleAddSouce">{{ $t('updates.cydzxz') }}</el-button>-->
|
||||
<el-button style="width: 130px" @click="handleAddSouce">{{ $t('updates.cydzxz') }}</el-button>
|
||||
<my-enter :entercontrol.sync="entercontrol" :supp.sync="supp" @enter="enter" @enterinfo="enterinfo"/>
|
||||
<!-- <el-button :disabled="addpro" @click="handleAddproduct">{{ $t('Hmodule.tjsp') }}</el-button>-->
|
||||
<my-detail :control.sync="control" @product="productdetail"/>
|
||||
|
@ -335,6 +335,14 @@ export default {
|
|||
}
|
||||
}
|
||||
const validatePass4 = (rule, value, callback) => {
|
||||
console.log(this.supplierId)
|
||||
if (this.personalForm.invoiceNumber === undefined || this.personalForm.invoiceNumber === null || this.personalForm.invoiceNumber === '') {
|
||||
callback(new Error('请输入发票号'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validatePass5 = (rule, value, callback) => {
|
||||
console.log(this.supplierId)
|
||||
if (this.personalForm.deptId === undefined || this.personalForm.deptId === null || this.personalForm.deptId === '') {
|
||||
callback(new Error('请选择部门'))
|
||||
|
@ -429,7 +437,7 @@ export default {
|
|||
{ required: true, message: '请选择退货日期', trigger: 'change' }
|
||||
],
|
||||
invoiceNumber: [
|
||||
{ required: true, message: '请输入发票号', trigger: 'blur' }
|
||||
{ required: true, validator: validatePass5, trigger: 'blur' }
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, validator: validatePass4, trigger: 'change' }
|
||||
|
@ -525,6 +533,7 @@ export default {
|
|||
this.list2[i].quantity2 = this.list2[i].quantity
|
||||
this.list2[i].sourceNumber = this.$store.getters.empcontract.number
|
||||
this.list2[i].taxRate = this.list2[i].taxRate2
|
||||
this.list2[i].discountRate = this.list2[i].discountRate * 100
|
||||
}
|
||||
this.$store.dispatch('getempcontract', '')
|
||||
}
|
||||
|
@ -708,27 +717,33 @@ export default {
|
|||
}
|
||||
},
|
||||
enterinfo(val) {
|
||||
// this.personalForm.sourceNumber = val.number
|
||||
// this.personalForm.supplierId = val.supplierId
|
||||
// this.supplierId = val.supplierName
|
||||
// if (val.stockTypeId !== null && val.stockTypeId !== undefined && val.stockTypeId !== '') {
|
||||
// this.personalForm.stockTypeId = val.stockTypeId
|
||||
// }
|
||||
// this.personalForm.isVat = val.isVat
|
||||
// if (val.handlePersonId !== null && val.handlePersonId !== undefined && val.handlePersonId !== '') {
|
||||
// this.personalForm.handlePersonId = val.handlePersonId
|
||||
// this.handlePersonId = val.stockPersonName
|
||||
// }
|
||||
// if (val.payMode !== null && val.payMode !== undefined && val.payMode !== '') {
|
||||
// this.personalForm.payMode = val.payMode
|
||||
// }
|
||||
// if (val.deliveryModeId !== null && val.deliveryModeId !== undefined && val.deliveryModeId !== '') {
|
||||
// this.personalForm.deliveryModeId = val.deliveryModeId
|
||||
// }
|
||||
// if (val.currencyId !== null && val.currencyId !== undefined && val.currencyId !== '') {
|
||||
// this.personalForm.currencyId = String(val.currencyId)
|
||||
// }
|
||||
// this.getTypes()
|
||||
this.personalForm.invoiceNumber = val.invoiceNumber
|
||||
this.personalForm.invoiceType = val.invoiceType
|
||||
this.personalForm.supplierId = val.supplierId
|
||||
this.personalForm.settleMode = val.settleMode
|
||||
this.personalForm.address = val.address
|
||||
this.personalForm.taxNumber = val.taxNumber
|
||||
this.personalForm.bank = val.bank
|
||||
this.personalForm.handlePersonId = val.handlePersonId
|
||||
this.personalForm.deptId = val.deptId
|
||||
this.personalForm.subject = val.subject
|
||||
this.personalForm.payDate = val.payDate
|
||||
this.supplierId = val.supplierName
|
||||
this.handlePersonId = val.handlePersonName
|
||||
if (this.personalForm.currency !== null && this.personalForm.currency !== '' && this.personalForm.currency !== undefined) {
|
||||
this.personalForm.currency = String(val.currency)
|
||||
}
|
||||
if (this.personalForm.invoiceType !== null) {
|
||||
this.personalForm.invoiceType = String(val.invoiceType)
|
||||
}
|
||||
this.personalForm.sourceType = '2'
|
||||
this.personalForm.isRed = 2
|
||||
this.list2 = val.stockInvoiceDetailVos
|
||||
for (let i = 0; i < this.list2.length; i++) {
|
||||
this.list2[i].quantity2 = this.list2[i].quantity
|
||||
this.list2[i].sourceNumber = val.number
|
||||
this.list2[i].taxRate = this.list2[i].taxRate2
|
||||
}
|
||||
},
|
||||
// 更新类型
|
||||
updatecountry() {
|
||||
|
|
|
@ -75,58 +75,47 @@
|
|||
style="width: 100%;"
|
||||
@current-change="handleCurrentChange"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column :reserve-selection="true" type="selection" min-width="55" align="center" />
|
||||
<el-table-column :label="$t('Stockenter.id')" :resizable="false" fixed="left" prop="id" align="center" width="150">
|
||||
<el-table-column :label="$t('public.id')" :resizable="false" fixed="left" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.id }}</span>
|
||||
<span class="link-type">{{ scope.row.number }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.title')" :resizable="false" fixed="left" prop="title" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.sourceType')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.title }}</span>
|
||||
<span>{{ scope.row.sourceType | sourceTypeFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.enterNumber')" :resizable="false" prop="sourceNumber" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.invoiceNumber')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.enterNumber }}</span>
|
||||
<span>{{ scope.row.invoiceNumber }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.deliveryPersonId')" :resizable="false" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.supplierId')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deliveryPersonName }}</span>
|
||||
<span>{{ scope.row.supplierName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.acceptPersonId')" :resizable="false" prop="acceptPersonName" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.isRed')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.acceptPersonName }}</span>
|
||||
<span>{{ scope.row.isRed | isRedFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.enterDeptId')" :resizable="false" prop="deliveryPersonName" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.createDate')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.deliveryPersonName }}</span>
|
||||
<span>{{ scope.row.createDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.endPersonName')" :resizable="false" prop="endPersonName" align="center" width="150">
|
||||
<el-table-column :label="$t('StockInvoice.payDate')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.enterPersonName }}</span>
|
||||
<span>{{ scope.row.payDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.endDate')" :resizable="false" prop="endDate" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.enterDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.summary')" :resizable="false" prop="stockEnterDetails" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.summary }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.judgeStat')" :resizable="false" prop="judgeStat" align="center" width="150">
|
||||
<el-table-column :label="$t('public.judgeStat')" :resizable="false" prop="judgeStat" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.judgeStat | judgeStatFilter }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('Stockenter.receiptStat')" :resizable="false" align="center" width="150">
|
||||
<el-table-column :label="$t('public.receiptStat')" :resizable="false" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.receiptStat | receiptStatFilter }}</span>
|
||||
</template>
|
||||
|
@ -143,6 +132,7 @@
|
|||
<script>
|
||||
import { stockenterlist } from '@/api/Stockenter'
|
||||
import { getdeptlist } from '@/api/BasicSettings'
|
||||
import { stockInvoiceList } from '@/api/StockInvoice'
|
||||
import waves from '@/directive/waves' // Waves directive
|
||||
import Pagination from '@/components/Pagination' // Secondary package based on el-pagination
|
||||
import MyRepository from './MyRepository'
|
||||
|
@ -181,9 +171,16 @@ export default {
|
|||
},
|
||||
sourceTypeFilter(status) {
|
||||
const statusMap = {
|
||||
1: _that.$t('updates.cgsq'),
|
||||
2: _that.$t('updates.cgxq'),
|
||||
3: _that.$t('Hmodule.Nosource')
|
||||
1: _that.$t('updates.cgdhd'),
|
||||
2: _that.$t('Hmodule.Nosource'),
|
||||
3: _that.$t('updates.cgrkd')
|
||||
}
|
||||
return statusMap[status]
|
||||
},
|
||||
isRedFilter(status) {
|
||||
const statusMap = {
|
||||
1: '否',
|
||||
2: '是'
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
|
@ -249,12 +246,10 @@ export default {
|
|||
listLoading: true,
|
||||
// 采购申请查询加展示参数
|
||||
getemplist: {
|
||||
pagenum: 1,
|
||||
pagesize: 10,
|
||||
judgeStat: 2,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
repositoryId: this.$store.getters.repositoryId,
|
||||
regionIds: this.$store.getters.regionIds,
|
||||
isActive: 1,
|
||||
supplierId: this.supp
|
||||
},
|
||||
visible2: {},
|
||||
|
@ -364,23 +359,23 @@ export default {
|
|||
getlist() {
|
||||
// 采购入库单列表数据
|
||||
this.listLoading = true
|
||||
stockenterlist(this.getemplist).then(res => {
|
||||
stockInvoiceList(this.getemplist).then(res => {
|
||||
if (res.data.ret === 200) {
|
||||
this.list = res.data.data.content.list
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
for (let j = 0; j < this.list[i].stockEnterDetailVos.length; j++) {
|
||||
if (this.list[i].stockEnterDetailVos[j].invoiceQuantity === this.list[i].stockEnterDetailVos[j].actualEnterQuantity) {
|
||||
this.list[i].stockEnterDetailVos.splice(j, 1)
|
||||
j--
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < this.list.length; i++) {
|
||||
if (this.list[i].stockEnterDetailVos.length === 0) {
|
||||
this.list.splice(i, 1)
|
||||
i--
|
||||
}
|
||||
}
|
||||
// for (let i = 0; i < this.list.length; i++) {
|
||||
// for (let j = 0; j < this.list[i].stockEnterDetailVos.length; j++) {
|
||||
// if (this.list[i].stockEnterDetailVos[j].invoiceQuantity === this.list[i].stockEnterDetailVos[j].actualEnterQuantity) {
|
||||
// this.list[i].stockEnterDetailVos.splice(j, 1)
|
||||
// j--
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// for (let i = 0; i < this.list.length; i++) {
|
||||
// if (this.list[i].stockEnterDetailVos.length === 0) {
|
||||
// this.list.splice(i, 1)
|
||||
// i--
|
||||
// }
|
||||
// }
|
||||
this.total = res.data.data.content.totalCount
|
||||
this.memoryChecked()
|
||||
}
|
||||
|
@ -462,82 +457,7 @@ export default {
|
|||
// 确认添加数据
|
||||
async handleConfirm() {
|
||||
this.employeeVisible = false
|
||||
console.log(this.choosedata)
|
||||
// const enterdata = this.choosedata.stockEnterDetailVos
|
||||
// const number = this.choosedata.enterNumber
|
||||
const enterdata = []
|
||||
for (const i in this.moreaction) {
|
||||
for (let j = 0; j < this.moreaction[i].stockEnterDetailVos.length; j++) {
|
||||
this.moreaction[i].stockEnterDetailVos[j].sourceNumber = this.moreaction[i].enterNumber
|
||||
enterdata.push(this.moreaction[i].stockEnterDetailVos[j])
|
||||
}
|
||||
// this.moreaction[i].stockEnterDetailVos.sourceNumber = this.moreaction[i].enterNumber
|
||||
// enterdata.push(this.moreaction[i].stockEnterDetailVos)
|
||||
}
|
||||
const enterDetail = enterdata.map(function(item) {
|
||||
return {
|
||||
productCode: item.productCode,
|
||||
productName: item.productName,
|
||||
productType: item.productType,
|
||||
typeName: item.productType,
|
||||
typeId: item.typeId,
|
||||
unit: item.unit,
|
||||
color: item.color,
|
||||
arrivalQuantity: item.arrivalQuantity,
|
||||
retreatQuantity: 0,
|
||||
retreatReason: '',
|
||||
sourceNumber: item.sourceNumber,
|
||||
sourceSerialNumber: item.id,
|
||||
remark: item.remark,
|
||||
quantity: item.actualEnterQuantity,
|
||||
quantity2: item.actualEnterQuantity,
|
||||
price: item.enterPrice,
|
||||
includeTaxPrice: (item.enterPrice * (1 + item.taxRate)).toFixed(2),
|
||||
taxRate: item.taxRate,
|
||||
money: item.money,
|
||||
includeTaxMoney: item.includeTaxMoney,
|
||||
taxMoney: item.taxMoney,
|
||||
discountMoney: 0.0,
|
||||
discountRate: 0.0,
|
||||
orderNumber: item.orderNumber,
|
||||
actualEnterQuantity: item.actualEnterQuantity,
|
||||
invoiceQuantity: item.invoiceQuantity
|
||||
}
|
||||
})
|
||||
console.log('enterDetail==============================>', enterDetail)
|
||||
for (let i = 0; i < enterDetail.length; i++) {
|
||||
for (let j = 0; j < this.checklistprop.length; j++) {
|
||||
if (enterDetail[i].sourceNumber === this.checklistprop[j]) {
|
||||
console.log('i======================>', enterDetail[i].sourceNumber)
|
||||
// enterDetail.splice(i, 1)
|
||||
// i--
|
||||
}
|
||||
}
|
||||
}
|
||||
const myenterDetail = enterDetail
|
||||
const obj = {}
|
||||
const processaction = this.moreaction.reduce((cur, next) => {
|
||||
obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
|
||||
return cur
|
||||
}, [])
|
||||
console.log('processaction', processaction)
|
||||
const cancelid = []
|
||||
console.log('添加标志=====================>', this.flagarr)
|
||||
// checklistprop在flagarr有在moreaction没有说明取消,否则未取消
|
||||
this.checklistprop.forEach(item => {
|
||||
console.log(item)
|
||||
var index = processaction.findIndex(myindex => myindex.enterNumber === item)
|
||||
console.log('index', index)
|
||||
console.log(this.flagarr.includes(item), !processaction.includes(item))
|
||||
if (this.flagarr.includes(item) && index) {
|
||||
cancelid.push(item)
|
||||
}
|
||||
})
|
||||
console.log('取消的id', cancelid)
|
||||
console.log(myenterDetail)
|
||||
this.$store.dispatch('getmyflagApproval', cancelid)
|
||||
this.$emit('enter', myenterDetail)
|
||||
this.$emit('enterinfo', this.moreaction)
|
||||
this.$emit('enterinfo', this.choosedata)
|
||||
}
|
||||
// 仓库管理员选择结束
|
||||
}
|
||||
|
|
|
@ -374,7 +374,6 @@ export default {
|
|||
}
|
||||
return {
|
||||
path: '',
|
||||
|
||||
pickerOptions1: {
|
||||
disabledDate: time => {
|
||||
return time.getTime() < new Date().getTime() - 8.64e7
|
||||
|
@ -453,7 +452,8 @@ export default {
|
|||
offsetAdvance: 0,
|
||||
moneyThis: 0,
|
||||
payDate: null,
|
||||
picids: []
|
||||
picids: [],
|
||||
currency: null
|
||||
},
|
||||
// 采购申请单规则数据
|
||||
personalrules: {
|
||||
|
@ -544,17 +544,18 @@ export default {
|
|||
},
|
||||
getcurrency() {
|
||||
const mycountry = this.$store.getters.countryId
|
||||
console.log('mycountry=====', mycountry)
|
||||
if (mycountry === 1) {
|
||||
this.personalForm.currency = '3'
|
||||
} else if (mycountry === 2) {
|
||||
this.personalForm.currency = '1'
|
||||
} else if (mycountry === 2) {
|
||||
this.personalForm.currency = '3'
|
||||
}
|
||||
},
|
||||
handlepaythis(row) {
|
||||
console.log(row)
|
||||
const judgemoney = Number(row.payThis) + Number(row.advanceMoney)
|
||||
console.log(judgemoney)
|
||||
if (judgemoney > row.shouldMoney) {
|
||||
if (judgemoney > row.payingMoney) {
|
||||
console.log(123)
|
||||
this.$notify.error({
|
||||
title: 'wrong',
|
||||
|
@ -736,7 +737,7 @@ export default {
|
|||
const detailList = res.data.data.content.list
|
||||
for (let i = 0; i < detailList.length; i++) {
|
||||
detailList[i].shouldPayId = detailList[i].id
|
||||
detailList[i].payThis = detailList[i].shouldMoney
|
||||
detailList[i].payThis = detailList[i].payingMoney
|
||||
this.$refs.editable.insert(detailList[i])
|
||||
}
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ export default {
|
|||
getemplist: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
judgeStat: 2, receiptStat: 2,
|
||||
judgeStat: 2, // receiptStat: 2,
|
||||
repositoryId: this.$store.getters.repositoryId,
|
||||
regionIds: this.$store.getters.regionIds,
|
||||
isActive: 1
|
||||
|
|
Loading…
Reference in a new issue