修改问题

This commit is contained in:
shawnzhang 2021-07-17 09:43:03 +08:00
parent d358922148
commit 8f6a4818c8
22 changed files with 333 additions and 188 deletions

View file

@ -72,18 +72,11 @@
<el-input v-model="personalForm.payAccount" style="width: 200px" clearable/>
</el-form-item>
</el-col>
<!-- <el-col :span="6">
<el-form-item :label="$t('AdvancePay.ratioId')" prop="ratioId" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-select v-model="personalForm.ratioId" style="width: 200px" @change="handerchoose">
<el-option
v-for="(item, index) in ratios"
:key="index"
:label="item.categoryName"
:value="item.id"
/>
</el-select>
<el-col :span="6">
<el-form-item :label="$t('Customer.openingbank')" prop="bankName" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.bankName" style="width: 200px" clearable/>
</el-form-item>
</el-col> -->
</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 @input="handerchoose"/>
@ -159,6 +152,15 @@ export default {
callback()
}
}
const validatePass5 = (rule, value, callback) => {
console.log(this.personalForm.bankName, value)
if (this.personalForm.bankName === undefined || this.personalForm.bankName === null || this.personalForm.bankName === '') {
callback(new Error('请输入开户行'))
} else {
callback()
}
}
// const validatePass4 = (rule, value, callback) => {
// console.log(this.personalForm.settleMode)
// if (this.personalForm.settleMode === undefined || this.personalForm.settleMode === null || this.personalForm.settleMode === '') {
@ -232,6 +234,9 @@ export default {
},
//
personalrules: {
bankName: [
{ required: true, validator: validatePass5, trigger: 'blur' }
],
supplierId: [
{ required: true, validator: validatePass, trigger: 'change' }
],
@ -299,7 +304,7 @@ export default {
// })
// console.log('needratio', needratio)
console.log('this.personalForm.ratioRate', this.personalForm.ratioRate)
this.personalForm.totalMoney = Number(this.personalForm.ratioRate) / 100 * Number(this.personalForm.orderMoney)
this.personalForm.totalMoney = (Number(this.personalForm.ratioRate) / 100 * Number(this.personalForm.orderMoney)).toFixed(2)
},
getinformation() {
if (this.$store.getters.empcontract) {
@ -490,6 +495,7 @@ export default {
this.stockPersonId = val.buyerName
this.personalForm.stockPersonId = val.buyerId
this.personalForm.settleMode = val.paymentId
this.personalForm.bankName = val.bankName
if (val.moneyId !== '' && val.moneyId !== null && val.moneyId !== undefined) {
this.personalForm.currency = String(val.moneyId)
}

View file

@ -131,6 +131,8 @@
<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="['266-222-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="['266-222-98']" v-show="scope.row.judgeStat === 2&&scope.row.confirmPersonId === null&&(scope.row.receiptStat === 1||scope.row.receiptStat === 2||scope.row.receiptStat === 3)" title="确认" type="primary" size="mini" icon="el-icon-check" circle @click="handleEdit2(scope.row)"/>
<el-button v-permission="['266-222-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>
</template>
</el-table-column>
</el-table>
@ -267,6 +269,49 @@ export default {
_that = this
},
methods: {
handleReview4(row) {
console.log('row ====', row)
this.reviewParms = {}
this.reviewParms.id = row.id
this.reviewParms.judgePersonId = this.$store.getters.userId
this.$confirm(this.$t('prompt.qfsp'), this.$t('prompt.fsp'), {
distinguishCancelAndClose: true,
confirmButtonText: this.$t('prompt.fsp'),
type: 'warning'
}).then(() => {
this.reviewParms.judgeStat = 0
const parms = JSON.stringify(this.reviewParms)
updateadvancepay2(parms).then(res => {
if (res.data.ret === 200) {
if (res.data.data.result === false) {
this.$message({
type: 'error',
message: this.$t('prompt.fspsb')
})
} else {
this.$message({
type: 'success',
message: this.$t('prompt.fspcg')
})
}
this.getlist()
} else {
this.$notify.error({
title: 'wrong',
message: res.data.msg,
offset: 100
})
}
})
})
},
//
isReview4(row) {
// console.log(row)
if (row.judgeStat === 2 && row.receiptStat !== 3) {
return true
}
},
numFormat(num) {
var res = num.toString().replace(/\d+/, function(n) { //
return n.replace(/(\d)(?=(\d{3})+$)/g, function($1) {

View file

@ -46,6 +46,12 @@
<span>{{ personalForm.payAccount }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('Customer.openingbank')" style="width: 100%;">
<span>{{ personalForm.bankName }}</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('AdvancePay.ratioId')" prop="ratioId" style="width: 100%;">
<span>{{ personalForm.ratioRate }}</span>
@ -102,6 +108,15 @@
<span>{{ scope.row.stat | statfilter }}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('public.judgePersonName')"
prop="allName"
align="center"
min-width="150">
<template slot-scope="scope">
<span>{{ scope.row.allName }}</span>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
@ -240,12 +255,12 @@ export default {
this.personalForm = this.detaildata
this.list2 = this.personalForm.stockArrivalDetailVos
this.reviewList = []
const review = this.personalForm.approvalUseVos
for (const i in review) {
if (review[i].actualStepHandler !== null) {
this.reviewList.push(review[i])
}
}
this.reviewList = this.personalForm.approvalUseVos
// for (const i in review) {
// if (review[i].actualStepHandler !== null) {
// this.reviewList.push(review[i])
// }
// }
}
},
beforeCreate() {

View file

@ -70,6 +70,12 @@
<el-input v-model="personalForm.payAccount" style="margin-left: 18px;width: 200px" clearable/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item :label="$t('Customer.openingbank')" prop="bankName" style="width: 100%;">
<el-input v-model="personalForm.bankName" style="margin-left: 18px;width: 200px" clearable/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item :label="$t('AdvancePay.ratioId')" prop="ratioId" style="width: 100%;">
<el-select v-model="personalForm.ratioId" style="margin-left: 18px;width: 200px" @change="handerchoose">
@ -200,6 +206,9 @@ export default {
control: false,
//
personalrules: {
bankName: [
{ required: true, message: '请输入开户行', trigger: 'blur' }
],
supplierId: [
{ required: true, validator: validatePass, trigger: 'focus' }
],
@ -256,7 +265,7 @@ export default {
methods: {
handerchoose(val) {
console.log('this.personalForm.ratioRate', this.personalForm.ratioRate)
this.personalForm.totalMoney = Number(this.personalForm.ratioRate) / 100 * Number(this.personalForm.orderMoney)
this.personalForm.totalMoney = (Number(this.personalForm.ratioRate) / 100 * Number(this.personalForm.orderMoney)).toFixed(2)
},
handleAddSouce() {
if (this.supp === '' || this.supp === undefined || this.supp === null) {
@ -399,6 +408,7 @@ export default {
this.personalForm.deliveryModeId = val.deliveryMode
this.personalForm.isVat = val.isVat
this.personalForm.currencyId = val.currency
this.personalForm.bankName = val.bankName
},
// focus
handlechooseStock() {
@ -479,7 +489,6 @@ export default {
offset: 100
})
this.$emit('rest', true)
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
this.editVisible = false
@ -493,7 +502,6 @@ export default {
})
},
handlecancel() {
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
this.editVisible = false

View file

@ -182,13 +182,13 @@
border
size="small"
style="width: 100%">
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px"/>
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px" fixed/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0,max: 100,precision: 6,controls:false}, type: 'visible'}" :label="$t('Hmodule.dj')" prop="price" align="center" min-width="170px">
<template slot="edit" slot-scope="scope">
<el-input-number

View file

@ -177,17 +177,18 @@
:edit-config="{ showIcon: true, showStatus: true}"
:edit-rules="validRules"
class="click-table1"
height="700"
stripe
border
size="small"
style="width: 100%">
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px"/>
<el-editable-column type="selection" min-width="55" 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="100px" fixed/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="100px" fixed/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0,max: 100,precision: 6,controls:false}, type: 'visible'}" :label="$t('Hmodule.dj')" prop="price" align="center" min-width="170px">
<template slot="edit" slot-scope="scope">
<el-input-number
@ -219,7 +220,7 @@
</el-editable>
</div>
</el-card>
<el-card class="box-card" style="position: fixed;width: 1010px;z-index: 100;height: 74px;bottom: 0;" shadow="never">
<el-card class="box-card" style="position: fixed;width: 1010px;z-index: 100;height: 60px;bottom: 0;" shadow="never">
<div class="buttons" style="float: right;padding-bottom: 10px">
<el-button @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
<el-button type="primary" @click="handleEditok()">{{ $t('Hmodule.baoc') }}</el-button>

View file

@ -53,13 +53,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" fixed/>
<el-editable-column :label="$t('update4.oldPrice')" prop="oldPrice" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('update4.newPrice')" prop="newPrice" align="center" min-width="150px">
<template slot="edit" slot-scope="scope">

View file

@ -53,13 +53,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="100px" fixed/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('update4.oldPrice')" prop="oldPrice" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('update4.newPrice')" prop="newPrice" align="center" min-width="150px">
<template slot="edit" slot-scope="scope">

View file

@ -18,6 +18,8 @@
<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">
@ -26,7 +28,9 @@
ref="table"
:height="tableHeight"
:data="list"
:summary-method="getSummaries2"
size="small"
show-summary
border
style="width: 100%"
@row-click="clickRow">
@ -34,8 +38,9 @@
:label="$t('report.supplierName')"
prop="supplierName"
width="200"
align="center"/>
<el-table-column :label="$t('report.orderCount')" :resizable="false" align="center" min-width="200">
align="center"
fixed/>
<el-table-column :label="$t('report.orderCount')" :resizable="false" align="center" prop="orderCount" min-width="200" fixed>
<template slot-scope="scope">
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.orderCount }}</span>
</template>
@ -44,7 +49,8 @@
:label="$t('report.arrivalCount')"
prop="arrivalCount"
width="200"
align="center"/>
align="center"
fixed/>
<el-table-column
:label="$t('report.arrivalRate')"
prop="arrivalRate"
@ -232,6 +238,62 @@ export default {
_that = this
},
methods: {
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 = ['supplierName', 'orderCount', 'arrivalCount', 'arrivalRate', 'productCount', 'arrivalProduct', 'arrivalProductRate', 'totalOrderQuantity', 'totalArivalQuantity', 'totalRate']
const data = this.formatJson(filterVal, this.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] = ''
}
})
return sums
},
clickRow(val) {
if (val.judgeStat === 0) {
this.$refs.table.toggleRowSelection(val)

View file

@ -18,6 +18,8 @@
<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">
@ -35,11 +37,6 @@
prop="id"
width="200"
align="center"/>
<!-- <el-table-column
:label="first"
prop="name"
width="300"
align="center"/> -->
<el-table-column :label="first" :resizable="false" align="center" min-width="300">
<template slot-scope="scope">
<span class="link-type" @click="handleDetail(scope.row)">{{ scope.row.name }}</span>
@ -227,6 +224,56 @@ export default {
_that = this
},
methods: {
formatJson(filterVal, jsonData) {
return jsonData.map(v => filterVal.map(j => {
return v[j]
}))
},
//
handleExport() {
this.downloadLoading = true
if (this.getemplist.type === '1') {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['供应商名称', '订货数量', '订货金额', '订货税额', '合计', '已到货数量', '未到货数量']
const filterVal = ['name', 'orderQuantity', 'totalMoney', 'taxMoney', 'heji', 'arrivedQuantity', 'notArrivedQuantity']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '采购订单汇总表'
})
this.downloadLoading = false
})
}
if (this.getemplist.type === '2') {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['经办人名称', '订货数量', '订货金额', '订货税额', '合计', '已到货数量', '未到货数量']
const filterVal = ['name', 'orderQuantity', 'totalMoney', 'taxMoney', 'heji', 'arrivedQuantity', 'notArrivedQuantity']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: '采购订单汇总表'
})
this.downloadLoading = false
})
}
if (this.getemplist.type === '4') {
import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['种类名称', '订货数量', '订货金额', '订货税额', '合计', '已到货数量', '未到货数量']
const filterVal = ['name', 'orderQuantity', 'totalMoney', 'taxMoney', 'heji', 'arrivedQuantity', 'notArrivedQuantity']
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)
@ -239,9 +286,6 @@ export default {
if (this.getemplist.type === '2') {
this.first = '经办人名称'
}
if (this.getemplist.type === '3') {
this.first = '品牌名称'
}
if (this.getemplist.type === '4') {
this.first = '种类名称'
}
@ -381,12 +425,13 @@ export default {
},
//
handleDetail(row) {
console.log(row)
const query_params = {
id: row.id,
name: row.name
}
this.$router.push({ path: '/StockOrder/StockOrderList', query: { arry: query_params }})
console.log('row========>', row)
// console.log(row)
// const query_params = {
// id: row.id,
// name: row.name
// }
// this.$router.push({ path: '/StockOrder/StockOrderList', query: { arry: query_params }})
},
//
isReview(row) {

View file

@ -591,11 +591,11 @@ export default {
num5 += Number(this.list2[i].discountMoney)
}
this.allNumber = num1
this.allMoney = num2
this.allTaxMoney = num3
this.allIncludeTaxMoney = num4
this.allDiscountMoney = num5
this.allMoneyMoveDiscount = num4 - num5
this.allMoney = (num2).toFixed(2)
this.allTaxMoney = (num3).toFixed(2)
this.allIncludeTaxMoney = (num4).toFixed(2)
this.allDiscountMoney = (num5).toFixed(2)
this.allMoneyMoveDiscount = (Number(num4) - Number(num5)).toFixed(2)
},
deep: true
}
@ -959,10 +959,10 @@ export default {
sums[18] = ''
sums[19] = ''
this.allNumber = sums[7]
this.allMoney = sums[13]
this.allTaxMoney = sums[15]
this.allIncludeTaxMoney = sums[14]
this.allDiscountMoney = sums[17]
this.allMoney = (sums[13]).toFixed(2)
this.allTaxMoney = (sums[15]).toFixed(2)
this.allIncludeTaxMoney = (sums[14]).toFixed(2)
this.allDiscountMoney = (sums[17]).toFixed(2)
this.allMoneyMoveDiscount = (sums[14] - sums[17]).toFixed(6)
return sums
},
@ -1052,7 +1052,7 @@ export default {
//
getTaxMoney2(row) {
if (row.stockQuantity !== 0) {
row.tax = (row.price * row.taxRate / 100 * row.stockQuantity).toFixed(6)
row.tax = (row.price * row.taxRate / 100 * row.stockQuantity).toFixed(2)
} else {
row.tax = 0
}
@ -1061,7 +1061,7 @@ export default {
//
getTaxMoney(row) {
row.includeTaxMoney = (row.stockQuantity * row.includeTaxPrice).toFixed(6)
row.discountMoney = (row.includeTaxPrice * row.stockQuantity * (row.discountRate / 100)).toFixed(6)
row.discountMoney = (row.includeTaxPrice * row.stockQuantity * (row.discountRate / 100)).toFixed(2)
return row.includeTaxMoney
},
//

View file

@ -423,71 +423,24 @@ export default {
}
},
activated() {
console.log('$route.query', this.$route.query)
try {
if (this.$route.query) {
if (this.$route.query.arry.id === 784836221) {
this.getemplist.orderNumber = this.$route.query.arry.name
} else {
this.getemplist.supplierId = this.$route.query.arry.id
this.supplierId = this.$route.query.arry.name
}
this.getlist()
}
} catch (err) {
this.getlist()
console.log('this.$store.getters.empcontract', this.$store.getters.empcontract)
if (this.$store.getters.empcontract.supplierId) {
this.getemplist.supplierId = this.$store.getters.empcontract.supplierId
this.getemplist.beginTime = this.$store.getters.empcontract.beginTime
this.getemplist.endTime = this.$store.getters.empcontract.endTime
}
this.getinformation()
this.countquery = this.$store.getters.empcontract
if (this.countquery) {
console.log('this.countquery====', this.countquery)
this.getemplist.supplierId = this.countquery.id
this.supplierId = this.countquery.name
if (this.countquery.beginTime !== '') {
this.getemplist.beginTime = this.countquery.beginTime
}
if (this.countquery.beginTime !== '') {
this.getemplist.endTime = this.countquery.endTime
}
this.getlist()
} else {
this.getlist()
}
this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
},
deactivated() {
this.getemplist.supplierId = ''
this.getemplist.beginTime = ''
this.getemplist.endTime = ''
this.$store.dispatch('getempcontract', '')
},
mounted() {
console.log('$route.query', this.$route.query)
if (this.$route.query) {
if (this.$route.query.arry.id === 784836221) {
this.getemplist.orderNumber = this.$route.query.arry.name
} else {
this.getemplist.supplierId = this.$route.query.arry.id
this.supplierId = this.$route.query.arry.name
}
this.getlist()
}
this.countquery = this.$store.getters.empcontract
if (this.countquery) {
console.log('this.countquery====', this.countquery)
this.getemplist.supplierId = this.countquery.id
this.supplierId = this.countquery.name
if (this.countquery.beginTime !== '') {
this.getemplist.beginTime = this.countquery.beginTime
}
if (this.countquery.beginTime !== '') {
this.getemplist.endTime = this.countquery.endTime
}
this.getlist()
} else {
this.getlist()
}
// this.getlist()
setTimeout(() => {
this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 140
}, 100)
@ -759,17 +712,13 @@ export default {
this.listLoading = true
stockorderlist(this.getemplist).then(res => {
if (res.data.ret === 200) {
console.log('res.data.data.content.list', res.data.data.content.list)
if (res.data.data.content.list !== '' && res.data.data.content.list !== undefined && res.data.data.content.list !== null) {
for (let i = 0; i < res.data.data.content.list.length; i++) {
console.log('res.data.data.content.list[i].stockOrderDetailVos', res.data.data.content.list[i].stockOrderDetailVos)
const list2 = res.data.data.content.list[i].stockOrderDetailVos
console.log('list2', list2)
if (list2 !== '' && list2 !== undefined && list2 !== null) {
for (let j = 0; j < list2.length; j++) {
list2[j].taxRate = list2[j].taxRate * 100
list2[j].discountRate = list2[j].discountRate * 100
console.log('list2[j].taxRate', list2[j].taxRate)
}
}
}
@ -840,7 +789,6 @@ export default {
}
this.list = process
this.getSpanArr(this.list)
console.log('this.list==================', this.list)
this.total = res.data.data.content.totalCount
}
setTimeout(() => {

View file

@ -320,7 +320,8 @@ export default {
returnQuantity: 0,
actualArrivalQuantity: 0,
discountRate: 0,
taxRate: 0
taxRate: 0,
flag: false
}
})
console.log(productDetail)

View file

@ -167,7 +167,9 @@
:data.sync="list2"
:edit-config="{ showIcon: true, showStatus: true}"
:edit-rules="validRules"
:summary-method="getSummaries"
class="click-table1"
show-summary
stripe
border
size="small"
@ -280,32 +282,32 @@
<el-row>
<el-col :span="12">
<el-form-item :label="$t('updates.cgslhj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allQuantity" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allNumber" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
<el-form-item :label="$t('updates.hehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
<el-form-item :label="$t('updates.sehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allTaxMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allTaxMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
<el-form-item :label="$t('updates.hsjehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allIncludeTaxMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allIncludeTaxMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
<el-form-item :label="$t('updates.zdzkjehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allDiscountMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allDiscountMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
<el-form-item :label="$t('updates.zhhsjehj')" style="margin-left: 18px;width: 100%;margin-bottom: 0;">
<el-input v-model="personalForm.allIncludeTaxDiscountMoney" size="mini" style="margin-left: 18px;width: 200px" disabled/>
<el-input v-model="allMoneyMoveDiscount" size="mini" style="margin-left: 18px;width: 200px" disabled/>
</el-form-item>
</el-col>
<el-col v-if="jundgeprice()" :span="12">
@ -541,6 +543,9 @@ export default {
this.personalForm.id = this.personalForm.parentId
this.list2 = this.personalForm.stockOrderDetailVos
this.changeRate()
},
list2() {
console.log('this.list2', this.list2)
}
},
created() {
@ -663,25 +668,25 @@ export default {
sums[index] = ''
}
})
sums[2] = ''
sums[3] = ''
sums[4] = ''
sums[5] = ''
sums[7] = ''
sums[8] = ''
// sums[2] = ''
// sums[3] = ''
// sums[4] = ''
// sums[5] = ''
// sums[7] = ''
// sums[8] = ''
sums[9] = ''
sums[13] = ''
sums[14] = ''
sums[16] = ''
sums[17] = ''
sums[18] = ''
sums[19] = ''
this.allNumber = sums[6]
this.allMoney = sums[10]
this.allTaxMoney = sums[12]
this.allIncludeTaxMoney = sums[11]
this.allDiscountMoney = sums[15]
this.allMoneyMoveDiscount = sums[11] - sums[15]
// sums[13] = ''
// sums[14] = ''
// sums[16] = ''
// sums[17] = ''
// sums[18] = ''
// sums[19] = ''
this.allNumber = Number(sums[7])
this.allMoney = Number(sums[13]).toFixed(2)
this.allTaxMoney = Number(sums[15]).toFixed(2)
this.allIncludeTaxMoney = Number(sums[14]).toFixed(2)
this.allDiscountMoney = Number(sums[17]).toFixed(2)
this.allMoneyMoveDiscount = (Number(sums[14]) - Number(sums[17])).toFixed(2)
return sums
},
getways() {
@ -1178,7 +1183,7 @@ export default {
return false
}
}
this.$refs.editable.insert(val[i])
this.$refs.editable.insertAt(val[i], -1)
}
},
//

View file

@ -14,7 +14,6 @@
style="width: 230px;"
start-placeholder="Start"
end-placeholder="End"
value-format="yyyy-MM-dd"
/>
<el-button v-waves type="primary" icon="el-icon-search" size="mini" class="filter-item" style="width: 86px;margin-top: 10px" round @click="handleFilter">{{ $t('public.search') }}</el-button>

View file

@ -439,7 +439,7 @@ export default {
}
})
for (let i = 0; i < arrivalDetail.length; i++) {
if (arrivalDetail[i].unqualifyQuantity === 0) {
if (arrivalDetail[i].unqualifyQuantity === 0 || arrivalDetail[i].returnQuantity !== 0) {
arrivalDetail.splice(i, 1)
i--
}

View file

@ -240,13 +240,13 @@
border
size="small"
style="width: 100%">
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px"/>
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px" fixed/>
<el-editable-column prop="proportion" align="center" label="供货比列(%)" min-width="150px"/>
<!-- <el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0,precision: 6,controls:false}, type: 'visible'}" prop="price" align="center" :label="$t('update4.jg')" min-width="150px" @change="getprice(scope.row)"/> -->
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0,max: 100,precision: 6,controls:false}, type: 'visible'}" :label="$t('Hmodule.dj')" prop="price" align="center" min-width="170px">

View file

@ -724,12 +724,13 @@ export default {
watch: {
detailcontrol() {
this.editVisible = this.detailcontrol
this.getemplist.pageSize = 10
},
detaildata() {
this.personalForm = this.detaildata
this.list2 = this.personalForm.supplierDetailVos
this.showlist = this.list2.slice(0, 10)
this.total4 = this.personalForm.supplierDetailVos.length
this.total = this.personalForm.supplierDetailVos.length
this.tableData6 = this.personalForm.supplierPunishments
},
detailid() {

View file

@ -220,13 +220,13 @@
size="small"
height="600px"
style="width: 100%">
<el-editable-column type="selection" min-width="55" 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('Hmodule.dw')" prop="unit" align="center" min-width="150px"/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="150px"/>
<el-editable-column type="selection" min-width="55" 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="100px" fixed/>
<el-editable-column :label="$t('Hmodule.wpmc')" prop="productName" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.gg')" prop="productType" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" align="center" min-width="100px" fixed/>
<el-editable-column :label="$t('updates.ys')" prop="color" align="center" min-width="100px" fixed/>
<!-- <el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0,max: 100,precision: 6,controls:false}, type: 'visible'}" prop="proportion" align="center" label="供货比列(%)" min-width="150px"/>-->
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" label="供货比列(%)" prop="proportion" align="center" min-width="150px">
<template slot="edit" slot-scope="scope">

View file

@ -374,7 +374,7 @@ export default {
// }
// }
// }
if (row.newTaxRate && row.newIncludeTaxPrice) {
if (row.newTaxRate !== null && row.newTaxRate !== '' && row.newTaxRate !== undefined && row.newIncludeTaxPrice) {
row.newPrice = row.newIncludeTaxPrice / (1 + row.newTaxRate / 100)
}
if (row.proportion && row.newIncludeTaxPrice) {

View file

@ -76,6 +76,7 @@
v-show="total > 0"
:total="total"
:page.sync="getemplist.pageNum"
:page-sizes.sync="pageArr"
:limit.sync="getemplist.pageSize"
@pagination="getlist"
/>
@ -259,7 +260,8 @@ export default {
//
editVisible: this.detailcontrol,
//
personalForm: this.detaildata
personalForm: this.detaildata,
pageArr: [10]
}
},
watch: {
@ -269,7 +271,13 @@ export default {
window.addEventListener('afterprint', () => {
console.log('打印完成==========')
}, true)
this.getemplist.pageSize = 10
}
const parms = {
page: 1,
limit: 50
}
this.getlist(parms)
},
detaildata() {
this.personalForm = this.detaildata

View file

@ -439,7 +439,7 @@ export default {
// }
// }
this.updateList()
if (row.newTaxRate && row.newIncludeTaxPrice) {
if (row.newTaxRate !== null && row.newTaxRate !== '' && row.newTaxRate !== undefined && row.newIncludeTaxPrice) {
row.newPrice = row.newIncludeTaxPrice / (1 + row.newTaxRate / 100)
}
if (row.proportion && row.newIncludeTaxPrice) {
@ -457,6 +457,7 @@ export default {
// }
// }
// }
console.log('scopegetprice', scope)
if (row.newTaxRate && row.newPrice) {
row.newIncludeTaxPrice = (row.newPrice * (1 + row.newTaxRate / 100))
}