6/8日测试修改代码

This commit is contained in:
shawnzhang 2020-06-08 14:37:02 +08:00
parent 8eb8000230
commit d7ccf7ade3
19 changed files with 726 additions and 247 deletions

View file

@ -151,3 +151,19 @@ export function getCustomerOutCount(query) {
}) })
} }
// 检查发票是否重复同一门店
export function checkInvoiceExist(query, query2) {
var params = new URLSearchParams()
if (query !== '' && query !== null && query !== undefined) {
params.append('invoiceNumber', query) // 你要传给后台的参数值 key/value
}
if (query2 !== '' && query2 !== null && query2 !== undefined) {
params.append('repositoryId', query2) // 你要传给后台的参数值 key/value
}
return request({
url: '/saleOut/checkInvoiceExist',
method: 'post',
data: params
})
}

View file

@ -571,7 +571,7 @@ export default {
quantity: 'quantity' quantity: 'quantity'
}, },
searchSaleOrderReport: { searchSaleOrderReport: {
id: 'serial no.', id: 'no.',
name: 'name', name: 'name',
money: 'amount', money: 'amount',
discountMoney: 'discount', discountMoney: 'discount',
@ -4086,8 +4086,8 @@ export default {
fjf: 'additional charge', fjf: 'additional charge',
cbj: 'cost price', cbj: 'cost price',
fx: 'direction', fx: 'direction',
transferReceipt: 'branch received company deposit', transferReceipt: 'branch received company',
transferExpense: 'company received branch deposit', transferExpense: 'company received branch',
lrqcsj: 'input beginning data', lrqcsj: 'input beginning data',
ygssmdm: 'employee affiliated branch' ygssmdm: 'employee affiliated branch'
}, },
@ -4422,6 +4422,9 @@ export default {
ecfqzzdywly: 'The second installment is only for non-sourced', ecfqzzdywly: 'The second installment is only for non-sourced',
hzje: 'Aggregate amount', hzje: 'Aggregate amount',
isSecondApplyResult: 'Second installment survey', isSecondApplyResult: 'Second installment survey',
gwpbslyyxsht: 'The item is not from a sales contract' gwpbslyyxsht: 'The item is not from a sales contract',
bcskyw: 'Actually received is wrong',
qxxzdc: 'please select out battery',
fphcf: 'Duplicate invoice number'
} }
} }

View file

@ -4422,6 +4422,9 @@ export default {
ecfqzzdywly: '二次分期只针对于无来源', ecfqzzdywly: '二次分期只针对于无来源',
hzje: '汇总金额', hzje: '汇总金额',
isSecondApplyResult: '二次分期调查', isSecondApplyResult: '二次分期调查',
gwpbslyyxsht: '该物品不是来源于销售合同' gwpbslyyxsht: '该物品不是来源于销售合同',
bcskyw: '本次收款有误',
qxxzdc: '请先选择出库电池',
fphcf: '发票号重复'
} }
} }

View file

@ -340,7 +340,7 @@ export default {
// //
tableKey: 0, tableKey: 0,
// //
listLoading: true, listLoading: false,
// //
getemplist: { getemplist: {
pageNum: 1, pageNum: 1,
@ -691,7 +691,7 @@ export default {
const regionIds = this.$store.getters.regionId const regionIds = this.$store.getters.regionId
console.log(regionIds) console.log(regionIds)
// //
// this.listLoading = true this.listLoading = true
const needdata = await (applylist(this.getemplist).then(res => { const needdata = await (applylist(this.getemplist).then(res => {
return res return res
})) }))

View file

@ -170,7 +170,7 @@
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" 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"/> --> <!-- <el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/> -->
<el-editable-column :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/> <el-editable-column :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('updates.jgf')" prop="money" align="center" min-width="150px"/> <el-editable-column :label="$t('updates.jgf')" prop="money" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.je')" prop="totalMoney" align="center" min-width="150px"> <el-editable-column :label="$t('Hmodule.je')" prop="totalMoney" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ gettotalMoney(scope.row.quantity, scope.row.money, scope.row) }}</p> <p>{{ gettotalMoney(scope.row.quantity, scope.row.money, scope.row) }}</p>

View file

@ -288,7 +288,7 @@ export default {
sums[index] = '' sums[index] = ''
} }
}) })
this.heji = sums[8] this.heji = sums[10]
sums[2] = '' sums[2] = ''
sums[4] = '' sums[4] = ''
sums[6] = '' sums[6] = ''

View file

@ -170,7 +170,7 @@
<el-editable-column :label="$t('Hmodule.dw')" prop="unit" 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"/> --> <!-- <el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/> -->
<el-editable-column :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/> <el-editable-column :label="$t('updates.shuli')" prop="quantity" align="center" min-width="150px"/>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" :label="$t('updates.jgf')" prop="money" align="center" min-width="150px"/> <el-editable-column :label="$t('updates.jgf')" prop="money" align="center" min-width="150px"/>
<el-editable-column :label="$t('Hmodule.je')" prop="totalMoney" align="center" min-width="150px"> <el-editable-column :label="$t('Hmodule.je')" prop="totalMoney" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<p>{{ gettotalMoney(scope.row.quantity, scope.row.money, scope.row) }}</p> <p>{{ gettotalMoney(scope.row.quantity, scope.row.money, scope.row) }}</p>
@ -444,7 +444,7 @@ export default {
sums[index] = '' sums[index] = ''
} }
}) })
this.heji = sums[8] this.heji = sums[10]
sums[2] = '' sums[2] = ''
sums[4] = '' sums[4] = ''
sums[6] = '' sums[6] = ''

View file

@ -380,8 +380,8 @@ export default {
productType: item.typeId, productType: item.typeId,
color: item.color, color: item.color,
unit: item.unit, unit: item.unit,
// salePrice: item.price, salePrice: item.price,
salePrice: installappley.totalMoney, // salePrice: installappley.totalMoney,
costPrice: 0, costPrice: 0,
performanceScore: item.kpiGrade, performanceScore: item.kpiGrade,
productScore: item.point, productScore: item.point,

View file

@ -31,8 +31,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.invoiceNumber" style="width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="width: 200px" @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -173,14 +173,14 @@
style="width: 200px"/> style="width: 200px"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="height: 56px"> <!-- <el-col :span="6" style="height: 56px">
<el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isInvoice" style="width: 200px"> <el-radio-group v-model="personalForm.isInvoice" style="width: 200px">
<el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio> <el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio>
<el-radio :label="2">{{ $t('updates.no') }}</el-radio> <el-radio :label="2">{{ $t('updates.no') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
@ -617,7 +617,7 @@ import { returnMoney } from '@/api/Coupon'
import { materialslist2 } from '@/api/MaterialsList' import { materialslist2 } from '@/api/MaterialsList'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public' import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public'
import { createsaleOut, getCustomerOutCount } from '@/api/SaleOut' import { createsaleOut, getCustomerOutCount, checkInvoiceExist } from '@/api/SaleOut'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public'
import MyEmp from './components/MyEmp2' import MyEmp from './components/MyEmp2'
@ -836,6 +836,9 @@ export default {
}, },
// //
personalrules: { personalrules: {
invoiceNumber: [
{ required: true, message: 'please input', trigger: 'blur' }
],
saleType: [ saleType: [
{ required: true, validator: validatePass8, trigger: 'change' } { required: true, validator: validatePass8, trigger: 'change' }
], ],
@ -969,6 +972,21 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
updatePrice() { updatePrice() {
console.log('999', 999) console.log('999', 999)
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) { if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
@ -1739,6 +1757,7 @@ export default {
}) })
this.saleRepositoryId = val.repositoryName this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id this.personalForm.saleRepositoryId = val.id
this.judgeinvoce()
this.list2 = [] this.list2 = []
this.list3 = [] this.list3 = []
}, },
@ -2714,6 +2733,15 @@ export default {
}) })
return false return false
} }
if (Number(this.personalForm.shouldMoney) !== Number(this.personalForm.customerPay) && this.$store.getters.countryId === 2) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.bcskyw'),
offset: 100
})
return false
}
// eslint-disable-next-line use-isnan // eslint-disable-next-line use-isnan
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) { if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
this.$notify.error({ this.$notify.error({

View file

@ -13,8 +13,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.invoiceNumber" style="width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="width: 200px" clearable @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -53,41 +53,6 @@
style="width: 200px"/> style="width: 200px"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.pointSupport')" prop="pointSupport" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.pointSupport" :disabled="personalForm.customerType === '1'" style="width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('collectAndPay.couponSupportOld')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input-number v-model="personalForm.couponSupportOld" :controls="false" :step="0.1" :min="0" style="width: 200px" @blur="getReceivableMoney"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.ridMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.ridMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">预售款金额{{ yushou }}</span> -->
</el-col>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.ridBikeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.ridBikeMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">回收车金额{{ huishou }}</span> -->
</el-col>
<el-col :span="6">
<el-form-item :label="$t('otherlanguage.yskdk')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.advanceMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">回收车金额{{ huishou }}</span> -->
</el-col>
<el-col v-for="(item, index) in personalForm.couponSupports" :key="index" :span="6">
<el-form-item :label="$t('SaleOut.couponSupport') + (index + 1)" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="item.couponSupport" style="margin-left: 18px;width: 130px" @blur="changeCoupon"/>
<el-button v-show="index === personalForm.couponSupports.length -1" icon="el-icon-plus" type="success" @click="addDomain" />
</el-form-item>
</el-col>
<el-col v-show="ischina === 2" :span="6" style="height: 57px"> <el-col v-show="ischina === 2" :span="6" style="height: 57px">
<el-form-item :label="$t('update4.isAppService')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('update4.isAppService')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isAppService" style="width: 200px" @change="changeAppDiscount"> <el-radio-group v-model="personalForm.isAppService" style="width: 200px" @change="changeAppDiscount">
@ -96,55 +61,14 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-show="ischina === 2" :span="6" style="height: 57px"> <!-- <el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.appDiscount')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.appDiscount }}
</span>
</el-form-item>
</el-col>
<!-- 前两个改变会影响后面的改变 要加change事件 -->
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.shouldMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.shouldMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('update4.customerPay')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input-number v-model="personalForm.customerPay" :controls="false" :step="0.1" :min="0" style="width: 200px" @change="updatePrice()"/>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.changeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.changeMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.receivableMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.unpayMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.unpayMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isInvoice" style="width: 200px"> <el-radio-group v-model="personalForm.isInvoice" style="width: 200px">
<el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio> <el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio>
<el-radio :label="2">{{ $t('updates.no') }}</el-radio> <el-radio :label="2">{{ $t('updates.no') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="6" style="height: 57px"> <el-col :span="6" style="height: 57px">
<el-form-item :label="$t('collectAndPay.isfree')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('collectAndPay.isfree')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isFree" style="width: 200px" @change="changefree"> <el-radio-group v-model="personalForm.isFree" style="width: 200px" @change="changefree">
@ -417,6 +341,93 @@
</el-editable> </el-editable>
</div> </div>
</el-card> </el-card>
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; margin-bottom: 20px">
<div ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('update4.skxx') }}</div>
<div class="container" style="margin-top: 37px">
<el-form ref="personalForm3" :model="personalForm" :rules="personalrules" :inline="true" label-position="left" size="mini" status-icon class="demo-ruleForm" label-width="130px">
<el-row>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.pointSupport')" prop="pointSupport" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.pointSupport" :disabled="personalForm.customerType === '1'" style="width: 200px"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('collectAndPay.couponSupportOld')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input-number v-model="personalForm.couponSupportOld" :controls="false" :step="0.1" :min="0" style="width: 200px" @blur="getReceivableMoney"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.ridMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.ridMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">预售款金额{{ yushou }}</span> -->
</el-col>
<el-col :span="6">
<el-form-item :label="$t('SaleOut.ridBikeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.ridBikeMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">回收车金额{{ huishou }}</span> -->
</el-col>
<el-col :span="6">
<el-form-item :label="$t('otherlanguage.yskdk')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.advanceMoney" disabled style="width: 200px"/>
</el-form-item>
<!-- <span style="color: red;margin-left: 52px;font-size: 14px">回收车金额{{ huishou }}</span> -->
</el-col>
<el-col v-for="(item, index) in personalForm.couponSupports" :key="index" :span="6">
<el-form-item :label="$t('SaleOut.couponSupport') + (index + 1)" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="item.couponSupport" style="margin-left: 18px;width: 130px" @blur="changeCoupon"/>
<el-button v-show="index === personalForm.couponSupports.length -1" icon="el-icon-plus" type="success" @click="addDomain" />
</el-form-item>
</el-col>
<el-col v-show="ischina === 2" :span="6" style="height: 57px">
<el-form-item :label="$t('update4.appDiscount')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.appDiscount }}
</span>
</el-form-item>
</el-col>
<!-- 前两个改变会影响后面的改变 要加change事件 -->
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.shouldMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.shouldMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('update4.customerPay')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input-number v-model="personalForm.customerPay" :controls="false" :step="0.1" :min="0" style="width: 200px" @change="updatePrice()"/>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.changeMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.changeMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.receivableMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.receivableMoney }}
</span>
</el-form-item>
</el-col>
<el-col :span="6" style="height: 57px">
<el-form-item :label="$t('update4.unpayMoney')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<span style="margin-left: 20px;">
{{ personalForm.unpayMoney }}
</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</el-card>
<el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; margin-bottom: 20px"> <el-card :body-style=" { padding: '5px' }" class="box-card" shadow="never" style="margin-top: 5px; margin-bottom: 20px">
<div ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</div> <div ref="geren" class="form-name" style="font-size: 16px;color: #606266;margin-top: -5px;">{{ $t('updates.hjxx') }}</div>
<div class="container" style="margin-top: 37px"> <div class="container" style="margin-top: 37px">
@ -495,7 +506,7 @@ import { customerlist2 } from '@/api/Customer'
import { returnMoney } from '@/api/Coupon' import { returnMoney } from '@/api/Coupon'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public' import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public'
import { createsaleOut, getCustomerOutCount } from '@/api/SaleOut' import { createsaleOut, getCustomerOutCount, checkInvoiceExist } from '@/api/SaleOut'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public'
import MyEmp from './components/MyEmp2' import MyEmp from './components/MyEmp2'
@ -731,6 +742,9 @@ export default {
}, },
// //
personalrules: { personalrules: {
invoiceNumber: [
{ required: true, message: 'please input', trigger: 'blur' }
],
saleType: [ saleType: [
{ required: true, validator: validatePass8, trigger: 'change' } { required: true, validator: validatePass8, trigger: 'change' }
], ],
@ -850,6 +864,21 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
changeAppDiscount() { changeAppDiscount() {
this.updatePrice() this.updatePrice()
this.getReceivableMoney() this.getReceivableMoney()
@ -1753,6 +1782,7 @@ export default {
// }) // })
this.saleRepositoryId = val.repositoryName this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id this.personalForm.saleRepositoryId = val.id
this.judgeinvoce()
}, },
// focus // focus
handlechooseAccept() { handlechooseAccept() {
@ -2722,8 +2752,8 @@ export default {
this.$refs.personalForm.resetFields() this.$refs.personalForm.resetFields()
this.$refs.personalForm2.clearValidate() this.$refs.personalForm2.clearValidate()
this.$refs.personalForm2.resetFields() this.$refs.personalForm2.resetFields()
// this.$refs.personalForm3.clearValidate() this.$refs.personalForm3.clearValidate()
// this.$refs.personalForm3.resetFields() this.$refs.personalForm3.resetFields()
} else { } else {
this.$notify.error({ this.$notify.error({
title: 'wrong', title: 'wrong',
@ -3194,6 +3224,14 @@ export default {
}) })
return false return false
} }
if (Number(this.personalForm.shouldMoney) !== Number(this.personalForm.customerPay) && this.$store.getters.countryId === 2) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.bcskyw'),
offset: 100
})
return false
}
// eslint-disable-next-line use-isnan // eslint-disable-next-line use-isnan
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) { if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
this.$notify.error({ this.$notify.error({
@ -3247,8 +3285,8 @@ export default {
this.$refs.personalForm.resetFields() this.$refs.personalForm.resetFields()
this.$refs.personalForm2.clearValidate() this.$refs.personalForm2.clearValidate()
this.$refs.personalForm2.resetFields() this.$refs.personalForm2.resetFields()
// this.$refs.personalForm3.clearValidate() this.$refs.personalForm3.clearValidate()
// this.$refs.personalForm3.resetFields() this.$refs.personalForm3.resetFields()
} else { } else {
this.$notify.error({ this.$notify.error({
title: 'wrong', title: 'wrong',

View file

@ -8,8 +8,8 @@
<el-form ref="personalForm" :model="personalForm" :rules="personalrules" :inline="true" size="mini" status-icon class="demo-ruleForm" label-position="left" label-width="130px"> <el-form ref="personalForm" :model="personalForm" :rules="personalrules" :inline="true" size="mini" status-icon class="demo-ruleForm" label-position="left" label-width="130px">
<el-row> <el-row>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-input v-model="personalForm.invoiceNumber" style="width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="width: 200px" clearable @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
@ -114,14 +114,14 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="height: 57px"> <!-- <el-col :span="6" style="height: 57px">
<el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('SaleOut.isInvoice')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isInvoice" style="width: 200px"> <el-radio-group v-model="personalForm.isInvoice" style="width: 200px">
<el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio> <el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio>
<el-radio :label="2">{{ $t('updates.no') }}</el-radio> <el-radio :label="2">{{ $t('updates.no') }}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<!-- <el-col :span="6"> <!-- <el-col :span="6">
<el-form-item :label="$t('collectAndPay.isfree')" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('collectAndPay.isfree')" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-radio-group v-model="personalForm.isFree" style="width: 200px"> <el-radio-group v-model="personalForm.isFree" style="width: 200px">
@ -140,7 +140,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('tongyo.useMonth')" prop="useMonth" style="margin-left: 18px;width: 100%;margin-bottom: 0"> <el-form-item :label="$t('tongyo.useMonth')" prop="useMonth" style="margin-left: 18px;width: 100%;margin-bottom: 0">
<el-select v-model="personalForm.useMonth" style="width: 200px" @change="getReceivableMoney"> <el-select v-model="personalForm.useMonth" style="width: 200px" @change="getReceivableMoney" @focus="getusemonth">
<el-option v-for="(item, index) in mouesitems" :key="index" :value="item" :label="item"/> <el-option v-for="(item, index) in mouesitems" :key="index" :value="item" :label="item"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -444,7 +444,7 @@ import { customerlist2 } from '@/api/Customer'
import { returnMoney } from '@/api/Coupon' import { returnMoney } from '@/api/Coupon'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public' import { getAllBatch, vehicleInfo, getQuantity2 } from '@/api/public'
import { createsaleOut } from '@/api/SaleOut' import { createsaleOut, checkInvoiceExist } from '@/api/SaleOut'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist, productlist } from '@/api/public'
import MyEmp from './components/MyEmp2' import MyEmp from './components/MyEmp2'
@ -469,7 +469,7 @@ import MyRecycling from './components/MyRecycling'
import MyPackage from './components/MyPackage' import MyPackage from './components/MyPackage'
var _that var _that
export default { export default {
name: 'NewAccessoriesOut', name: 'NewBatteryOut',
components: { MyReturn, MyRecycling, MyContract, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp, MyPackage }, components: { MyReturn, MyRecycling, MyContract, MyDetail2, MyOpportunity, MyPresale, MyAdvance, MyOrder, MyRepository, MyAccept, MyAgent, MyCustomer, MyRequire, MySupplier, MyApply, MyDetail, MyDelivery, MyEmp, MyPackage },
data() { data() {
const validatePass = (rule, value, callback) => { const validatePass = (rule, value, callback) => {
@ -672,10 +672,14 @@ export default {
isInvoice: 1, isInvoice: 1,
couponMoney: 0, couponMoney: 0,
couponSupportOld: 0, couponSupportOld: 0,
isFree: 2 isFree: 2,
useMonth: null
}, },
// //
personalrules: { personalrules: {
invoiceNumber: [
{ required: true, message: 'please input', trigger: 'blur' }
],
useType: [ useType: [
{ required: true, message: _that.$t('tongyo.qxzdcsylx'), trigger: 'change' } { required: true, message: _that.$t('tongyo.qxzdcsylx'), trigger: 'change' }
], ],
@ -779,6 +783,7 @@ export default {
this.heji1 = num this.heji1 = num
this.heji3 = num1 this.heji3 = num1
this.heji4 = num2 this.heji4 = num2
this.personalForm.useMonth = null
this.getReceivableMoney() this.getReceivableMoney()
// console.log(num) // console.log(num)
}, },
@ -805,7 +810,7 @@ export default {
this.getTypes() this.getTypes()
this.getdatatime() this.getdatatime()
this.chooseSourceType() this.chooseSourceType()
this.getdiffprice() // this.getdiffprice()
}, },
mounted() { mounted() {
@ -821,6 +826,36 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
getusemonth() {
const allbattery = this.$refs.editable.getRecords()
console.log('allbattery', allbattery)
if (allbattery.length === 0) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.qxxzdc'),
offset: 100
})
return false
}
this.getemplist.categoryId = allbattery[0].category
this.getemplist.iseffective = 1
this.getdiffprice()
},
updatePrice() { updatePrice() {
console.log('999', 999) console.log('999', 999)
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) { if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
@ -2987,6 +3022,15 @@ export default {
}) })
return false return false
} }
if (Number(this.personalForm.shouldMoney) !== Number(this.personalForm.customerPay)) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.bcskyw'),
offset: 100
})
return false
}
// eslint-disable-next-line use-isnan // eslint-disable-next-line use-isnan
if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) { if (this.personalForm.customerPay === '' || this.personalForm.customerPay === undefined || this.personalForm.customerPay === NaN || this.personalForm.customerPay === null) {
this.$notify.error({ this.$notify.error({

View file

@ -33,6 +33,11 @@
<span>{{ personalForm.customerName }}</span> <span>{{ personalForm.customerName }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.invoiceNumber')" prop="customerId" style="width: 100%;">
<span>{{ personalForm.invoiceNumber }}</span>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('SaleOut.customerPhone')" style="width: 100%;"> <el-form-item :label="$t('SaleOut.customerPhone')" style="width: 100%;">
<span>{{ personalForm.phoneNumber }}</span> <span>{{ personalForm.phoneNumber }}</span>
@ -170,14 +175,6 @@
<span>{{ personalForm.advanceMoney }}</span> <span>{{ personalForm.advanceMoney }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item :label="$t('SaleOut.isInvoice')" style="width: 100%;">
<el-radio-group v-model="personalForm.isInvoice" style="margin-left: 18px;width: 200px" disabled>
<el-radio :label="1" style="width: 100px">{{ $t('updates.yes') }}</el-radio>
<el-radio :label="2">{{ $t('updates.no') }}</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('collectAndPay.isfree')" style="width: 100%;"> <el-form-item :label="$t('collectAndPay.isfree')" style="width: 100%;">
<span>{{ personalForm.isFree | isFreeTypeFilter }}</span> <span>{{ personalForm.isFree | isFreeTypeFilter }}</span>

View file

@ -30,8 +30,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="width: 100%;"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="width: 100%;">
<el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -646,7 +646,7 @@ import { customerlist2 } from '@/api/Customer'
import { returnMoney } from '@/api/Coupon' import { returnMoney } from '@/api/Coupon'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo } from '@/api/public' import { getAllBatch, vehicleInfo } from '@/api/public'
import { updatesaleOut } from '@/api/SaleOut' import { updatesaleOut, checkInvoiceExist } from '@/api/SaleOut'
import { searchCategory } from '@/api/Supplier' import { searchCategory } from '@/api/Supplier'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist } from '@/api/public'
@ -873,6 +873,9 @@ export default {
control: false, control: false,
// //
personalrules: { personalrules: {
invoiceNumber: [
{ required: true, message: 'please input', trigger: 'blur' }
],
saleType: [ saleType: [
{ required: true, message: '请选择销售类别', trigger: 'change' } { required: true, message: '请选择销售类别', trigger: 'change' }
], ],
@ -1076,6 +1079,21 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
updatePrice() { updatePrice() {
console.log('999', 999) console.log('999', 999)
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) { if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
@ -1865,6 +1883,7 @@ export default {
}) })
this.saleRepositoryId = val.repositoryName this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id this.personalForm.saleRepositoryId = val.id
this.judgeinvoce()
}, },
// focus // focus
handlechooseAccept() { handlechooseAccept() {

View file

@ -29,8 +29,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="width: 100%;"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="width: 100%;">
<el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -553,7 +553,7 @@ import { customerlist2 } from '@/api/Customer'
import { returnMoney } from '@/api/Coupon' import { returnMoney } from '@/api/Coupon'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo } from '@/api/public' import { getAllBatch, vehicleInfo } from '@/api/public'
import { updatesaleOut } from '@/api/SaleOut' import { updatesaleOut, checkInvoiceExist } from '@/api/SaleOut'
import { searchCategory } from '@/api/Supplier' import { searchCategory } from '@/api/Supplier'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist } from '@/api/public'
@ -776,6 +776,9 @@ export default {
control: false, control: false,
// //
personalrules: { personalrules: {
invoiceNumber: [
{ required: true, message: 'please input', trigger: 'blur' }
],
saleType: [ saleType: [
{ required: true, message: '请选择销售类别', trigger: 'change' } { required: true, message: '请选择销售类别', trigger: 'change' }
], ],
@ -971,6 +974,21 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
jundgeprice() { jundgeprice() {
if (this.$store.getters.countryId === 2) { if (this.$store.getters.countryId === 2) {
return true return true
@ -1712,6 +1730,7 @@ export default {
}) })
this.saleRepositoryId = val.repositoryName this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id this.personalForm.saleRepositoryId = val.id
this.judgeinvoce()
}, },
// focus // focus
handlechooseAccept() { handlechooseAccept() {

View file

@ -29,8 +29,8 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('SaleOut.invoiceNumber')" style="width: 100%;"> <el-form-item :label="$t('SaleOut.invoiceNumber')" prop="invoiceNumber" style="width: 100%;">
<el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable/> <el-input v-model="personalForm.invoiceNumber" style="margin-left: 18px;width: 200px" clearable @blur="judgeinvoce"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@ -568,7 +568,7 @@ import { customerlist2 } from '@/api/Customer'
import { returnMoney } from '@/api/Coupon' import { returnMoney } from '@/api/Coupon'
import { getPackage } from '@/api/Package' import { getPackage } from '@/api/Package'
import { getAllBatch, vehicleInfo } from '@/api/public' import { getAllBatch, vehicleInfo } from '@/api/public'
import { updatesaleOut } from '@/api/SaleOut' import { updatesaleOut, checkInvoiceExist } from '@/api/SaleOut'
import { searchCategory } from '@/api/Supplier' import { searchCategory } from '@/api/Supplier'
import { searchSaleCategory } from '@/api/SaleCategory' import { searchSaleCategory } from '@/api/SaleCategory'
import { getlocation, locationlist, countlist, batchlist } from '@/api/public' import { getlocation, locationlist, countlist, batchlist } from '@/api/public'
@ -996,6 +996,21 @@ export default {
_that = this _that = this
}, },
methods: { methods: {
judgeinvoce() {
console.log('this.personalForm.invoiceNumber', this.personalForm.invoiceNumber)
checkInvoiceExist(this.personalForm.invoiceNumber, this.personalForm.saleRepositoryId).then(res => {
if (res.data.ret === 200) {
if (res.data.data.content === true) {
this.$notify.error({
title: 'wrong',
message: this.$t('update4.fphcf'),
offset: 100
})
this.personalForm.invoiceNumber = null
}
}
})
},
updatePrice() { updatePrice() {
console.log('999', 999) console.log('999', 999)
if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) { if (this.personalForm.shouldMoney !== null && this.personalForm.shouldMoney !== '' && this.personalForm.shouldMoney !== undefined) {
@ -1732,6 +1747,7 @@ export default {
}) })
this.saleRepositoryId = val.repositoryName this.saleRepositoryId = val.repositoryName
this.personalForm.saleRepositoryId = val.id this.personalForm.saleRepositoryId = val.id
this.judgeinvoce()
}, },
// focus // focus
handlechooseAccept() { handlechooseAccept() {

View file

@ -10,7 +10,8 @@
<el-input v-model="moveInRepository" :placeholder="$t('Storagemove.moveInRepository')" size="small" class="filter-item" clearable @clear="restFilter" @keyup.enter.native="handleFilter" @focus="handlechooseDep"/> <el-input v-model="moveInRepository" :placeholder="$t('Storagemove.moveInRepository')" size="small" class="filter-item" clearable @clear="restFilter" @keyup.enter.native="handleFilter" @focus="handlechooseDep"/>
<my-depot :depotcontrol.sync="depotcontrol" @depotname="depotname"/> <my-depot :depotcontrol.sync="depotcontrol" @depotname="depotname"/>
<el-input v-model="moveOutRepository" :placeholder="$t('Storagemove.moveOutRepository')" size="small" class="filter-item" clearable @clear="restFilter2" @keyup.enter.native="handleFilter" @focus="handlechooseRep"/>
<my-depot2 :depotcontrol.sync="repositorycontrol" @depotname="getrepositoryname"/>
<el-popover <el-popover
v-model="visible2" v-model="visible2"
placement="bottom" placement="bottom"
@ -24,8 +25,7 @@
:value="item.id" :value="item.id"
:label="item.deptName"/> :label="item.deptName"/>
</el-select> </el-select>
<el-input v-model="moveOutRepository" :placeholder="$t('Storagemove.moveOutRepository')" size="small" class="filter-item" clearable style="width: 40%;float: right;margin-right: 20px" @clear="restFilter2" @keyup.enter.native="handleFilter" @focus="handlechooseRep"/>
<my-repository :repositorycontrol.sync="repositorycontrol" @repositoryname="repositoryname"/>
<el-select v-model="getemplist.requestDeptId" size="small" placeholder="请选择要货部门" style="width: 40%;float: left;margin-left: 20px;margin-top: 20px" clearable > <el-select v-model="getemplist.requestDeptId" size="small" placeholder="请选择要货部门" style="width: 40%;float: left;margin-left: 20px;margin-top: 20px" clearable >
<el-option <el-option
v-for="(item, index) in depts" v-for="(item, index) in depts"
@ -232,13 +232,14 @@ import MyRepository from './components/MyRepository2'
import MyAccept from './components/MyAccept' import MyAccept from './components/MyAccept'
import MyCreate from './components/MyCreate' import MyCreate from './components/MyCreate'
import MyDepot from './components/MyDepot' import MyDepot from './components/MyDepot'
import MyDepot2 from './components/MyDepot2'
import DetailList from './components/DetailList' import DetailList from './components/DetailList'
var _that var _that
export default { export default {
name: 'StoragemoveList', name: 'StoragemoveList',
directives: { waves, permission, permission2 }, directives: { waves, permission, permission2 },
components: { DetailList, MyDepot, Pagination, MyEdit, MyRepository, MyAccept, MyCreate, MyEdit2, MyEdit3 }, components: { DetailList, MyDepot, MyDepot2, Pagination, MyEdit, MyRepository, MyAccept, MyCreate, MyEdit2, MyEdit3 },
filters: { filters: {
judgeStatFilter(status) { judgeStatFilter(status) {
const statusMap = { const statusMap = {
@ -733,7 +734,7 @@ export default {
handlechooseRep() { handlechooseRep() {
this.repositorycontrol = true this.repositorycontrol = true
}, },
repositoryname(val) { getrepositoryname(val) {
// console.log(val) // console.log(val)
this.moveOutRepository = val.repositoryName this.moveOutRepository = val.repositoryName
this.getemplist.moveOutRepository = val.id this.getemplist.moveOutRepository = val.id

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

@ -109,7 +109,7 @@
<!--操作--> <!--操作-->
<div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99"> <div class="buttons" style="position:fixed;bottom: 0;width: 100%;height: 40px; background: #fff;z-index: 99">
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button> <el-button :loading="saveloding" type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave()">{{ $t('Hmodule.baoc') }}</el-button>
<el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('collectAndPay.lsbc') }}</el-button> <el-button v-no-more-click type="primary" style="background:#3696fd;border-color:#3696fd;width: 98px" @click="handlesave2()">{{ $t('collectAndPay.lsbc') }}</el-button>
<el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button> <el-button type="danger" @click="handlecancel()">{{ $t('Hmodule.cancel') }}</el-button>
</div> </div>
@ -139,6 +139,7 @@ export default {
} }
} }
return { return {
saveloding: false,
checklist: [], checklist: [],
locationlistparms: { locationlistparms: {
pageNum: 1, pageNum: 1,
@ -359,125 +360,134 @@ export default {
}, },
// //
handlesave() { handlesave() {
const EnterDetail = this.$refs.editable.getRecords() this.saveloding = true
let ll = 1 setTimeout(() => {
console.log('nowlistdata', EnterDetail) const EnterDetail = this.$refs.editable.getRecords()
EnterDetail.map(function(elem) { let ll = 1
return elem console.log('nowlistdata', EnterDetail)
}).forEach(function(elem) { EnterDetail.map(function(elem) {
if (elem.locationId === null || elem.locationId === '' || elem.locationId === undefined) { return elem
ll = 2 }).forEach(function(elem) {
} if (elem.locationId === null || elem.locationId === '' || elem.locationId === undefined) {
}) ll = 2
console.log('ll', ll) }
if (ll === 2) {
this.$notify.error({
title: 'wrong',
message: '货位不能为空',
offset: 100
}) })
return false console.log('ll', ll)
} if (ll === 2) {
if (EnterDetail.length === 0) {
this.$notify.error({
title: 'wrong',
message: this.$t('prompt.mxbbnwk'),
offset: 100
})
return false
}
let l = 1
EnterDetail.map(function(elem) {
return elem
}).forEach(function(elem) {
if (elem.enterQuantity === 0) {
l = 2
}
})
console.log('l', l)
if (l === 2) {
this.$notify.error({
title: 'wrong',
message: '入库数量不能为0',
offset: 100
})
return false
}
EnterDetail.map(function(elem) {
return elem
}).forEach(function(elem) {
if (elem.unit === null || elem.unit === '' || elem.unit === undefined) {
delete elem.unit
}
if (elem.basicQuantity === null || elem.basicQuantity === '' || elem.basicQuantity === undefined) {
elem.basicQuantity = 1
}
if (elem.color === null || elem.color === '' || elem.color === undefined) {
delete elem.color
}
if (elem.enterQuantity === null || elem.enterQuantity === '' || elem.enterQuantity === undefined) {
elem.enterQuantity = 1
}
if (elem.locationId === null || elem.locationId === '' || elem.locationId === undefined) {
delete elem.locationId
}
if (elem.price === null || elem.price === '' || elem.price === undefined) {
delete elem.price
}
if (elem.productCode === null || elem.productCode === '' || elem.productCode === undefined) {
delete elem.productCode
}
if (elem.productName === null || elem.productName === '' || elem.productName === undefined) {
delete elem.productName
}
if (elem.remarks === null || elem.remarks === '' || elem.remarks === undefined) {
delete elem.remarks
}
if (elem.totalMoney === null || elem.totalMoney === '' || elem.totalMoney === undefined) {
delete elem.totalMoney
}
if (elem.typeId === null || elem.typeId === '' || elem.typeId === undefined) {
delete elem.typeId
}
if (elem.typeId === null || elem.typeId === '' || elem.typeId === undefined) {
delete elem.typeId
}
return elem
})
const parms = JSON.stringify(EnterDetail)
const parms2 = JSON.stringify(this.personalForm)
this.$refs.personalForm.validate((valid) => {
if (valid) {
addinitialenter(parms2, parms, this.repositoryId, this.regionId).then(res => {
console.log(res)
if (res.data.ret === 200) {
this.$notify({
title: 'successful',
message: 'save successful',
type: 'success',
offset: 100
})
this.restAllForm()
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
} else {
this.$notify.error({
title: 'wrong',
message: res.data.msg,
offset: 100
})
}
})
} else {
this.$notify.error({ this.$notify.error({
title: 'wrong', title: 'wrong',
message: 'Information is incomplete', message: '货位不能为空',
offset: 100 offset: 100
}) })
this.saveloding = false
return false return false
} }
}) if (EnterDetail.length === 0) {
this.$notify.error({
title: 'wrong',
message: this.$t('prompt.mxbbnwk'),
offset: 100
})
this.saveloding = false
return false
}
let l = 1
EnterDetail.map(function(elem) {
return elem
}).forEach(function(elem) {
if (elem.enterQuantity === 0) {
l = 2
}
})
console.log('l', l)
if (l === 2) {
this.$notify.error({
title: 'wrong',
message: '入库数量不能为0',
offset: 100
})
this.saveloding = false
return false
}
EnterDetail.map(function(elem) {
return elem
}).forEach(function(elem) {
if (elem.unit === null || elem.unit === '' || elem.unit === undefined) {
delete elem.unit
}
if (elem.basicQuantity === null || elem.basicQuantity === '' || elem.basicQuantity === undefined) {
elem.basicQuantity = 1
}
if (elem.color === null || elem.color === '' || elem.color === undefined) {
delete elem.color
}
if (elem.enterQuantity === null || elem.enterQuantity === '' || elem.enterQuantity === undefined) {
elem.enterQuantity = 1
}
if (elem.locationId === null || elem.locationId === '' || elem.locationId === undefined) {
delete elem.locationId
}
if (elem.price === null || elem.price === '' || elem.price === undefined) {
delete elem.price
}
if (elem.productCode === null || elem.productCode === '' || elem.productCode === undefined) {
delete elem.productCode
}
if (elem.productName === null || elem.productName === '' || elem.productName === undefined) {
delete elem.productName
}
if (elem.remarks === null || elem.remarks === '' || elem.remarks === undefined) {
delete elem.remarks
}
if (elem.totalMoney === null || elem.totalMoney === '' || elem.totalMoney === undefined) {
delete elem.totalMoney
}
if (elem.typeId === null || elem.typeId === '' || elem.typeId === undefined) {
delete elem.typeId
}
if (elem.typeId === null || elem.typeId === '' || elem.typeId === undefined) {
delete elem.typeId
}
return elem
})
const parms = JSON.stringify(EnterDetail)
const parms2 = JSON.stringify(this.personalForm)
this.$refs.personalForm.validate((valid) => {
if (valid) {
addinitialenter(parms2, parms, this.repositoryId, this.regionId).then(res => {
console.log(res)
if (res.data.ret === 200) {
this.$notify({
title: 'successful',
message: 'save successful',
type: 'success',
offset: 100
})
this.restAllForm()
this.$refs.editable.clear()
this.$refs.personalForm.clearValidate()
this.$refs.personalForm.resetFields()
} else {
this.$notify.error({
title: 'wrong',
message: res.data.msg,
offset: 100
})
}
this.saveloding = false
})
} else {
this.$notify.error({
title: 'wrong',
message: 'Information is incomplete',
offset: 100
})
return false
}
this.saveloding = false
})
}, 0.5 * 1000)
}, },
// //
restAllForm() { restAllForm() {

View file

@ -550,6 +550,7 @@ export default {
}) })
// ================ // ================
} }
this.reviewStat = false
}) })
}, },
// //