Browse Source

客户管理 调车 调账

master
Zhao Qiqi 3 years ago
parent
commit
83aae0da76
  1. 16
      anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue
  2. 9
      anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/diaocheshenqing.vue
  3. 227
      anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/diaocheshenqingAdd.vue
  4. 109
      anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/relation/diaochecheliangList.vue
  5. 9
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue
  6. 18
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo.vue

16
anrui-buscenter/anrui-buscenter-ui/src/views/kehuguanli/kehudangan/kehudanganAdd.vue

@ -192,7 +192,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="idnumber">
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18 || 9" placeholder="请输入证件号码"
<el-input v-model="temp.idnumber" style="width:50%" maxlength="18" placeholder="请输入证件号码"
class="addinputw" clearable
@keyup.native="temp.idnumber = oninput(temp.idnumber)"/>
</el-form-item>
@ -609,13 +609,13 @@ export default {
trigger: 'blur',
},
],
idnumber: [
{
required: true,
// validator: identitycard,
trigger: 'blur',
},
],
// idnumber: [
// {
// required: true,
// // validator: identitycard,
// trigger: 'blur',
// },
// ],
e_mail: [
{
required: true,

9
anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/diaocheshenqing.vue

@ -264,7 +264,7 @@ export default {
applyStartDate: '', //
applyEndDate: '', //
callOutOrgSid: '', // sid
createOrgSid: '' //
createOrgSid: this.useOrg //
}
}
this.getPathSid()
@ -278,13 +278,6 @@ export default {
const data = resp.data
_this.listQuery.total = data.total
_this.dataList = data.records
for (var i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].inspectedType == '1') {
this.dataList[i].inspectedType = '待验车'
} else {
this.dataList[i].inspectedType = '已验车'
}
}
})
.catch(() => {
_this.tableLoading = false

227
anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/diaocheshenqingAdd.vue

@ -28,22 +28,23 @@
<el-form ref="dataForm" :model="temp" :rules="rules" :inline="true" label-width="120px">
<div class="invoiceadd" style="margin-top: 5px;">
<el-row>
<el-col :span="8">
<el-form-item prop="reason" label="调账类型">
<el-select v-model="temp.accadjTypeValue" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in accadjTypeValue_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
</el-select>
<el-col :span="8"> <!-- 默认为调入 -->
<el-form-item prop="reason" label="调车类型">
<span>调入</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="money" label="调分公司">
<el-input v-model="temp.money" placeholder="请输入" class="addinputw" clearable/>
<el-form-item prop="money" label="调分公司">
<el-input v-model="temp.callInOrgSid" placeholder="请输入" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="money" label="调入分公司">
<el-input v-model="temp.moneyOne" placeholder="请输入" class="addinputw" clearable/>
<el-form-item prop="money" label="调出分公司">
<el-select v-model="temp.callOutOrgSid" placeholder="请选择" clearable class="addinputw"
@change="callOutOrgSidChange">
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name"
:value="item.sid"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -68,7 +69,7 @@
</el-table-column>
<el-table-column width="210" label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column width="260" label="常用配置" align="center">
@ -78,7 +79,7 @@
</el-table-column>
<el-table-column width="180" label="合格证信息" align="center">
<template slot-scope="scope" @click="">
<el-input v-model="scope.row.inboundDate" placeholder="请输入" class="addinputw"/>
<el-input v-model="scope.row.certificate" placeholder="请输入" class="addinputw"/>
</template>
</el-table-column>
<el-table-column width="120" label="车架号" align="center">
@ -88,26 +89,26 @@
</el-table-column>
<el-table-column width="110" label="内销价格" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.witPinMoney }}</span>
</template>
</el-table-column>
<el-table-column width="130" label="发票类型" align="center">
<template slot-scope="scope">
<el-input v-model="scope.row.inboundDate" placeholder="请输入" class="addinputw"
:readonly="depositVehicleList[scope.$index].inboundDate"/>
<el-input v-model="scope.row.invoiceTypeValue" placeholder="请输入" class="addinputw"
:readonly="vehicleList[scope.$index].inboundDate"/>
<!-- <span>{{scope.row.inboundDate}}</span>-->
</template>
</el-table-column>
<el-table-column width="110" label="开票金额" align="center">
<template slot-scope="scope"><!-- 由发票类型决定,增值税票:开票金额=内销价格 -->
<el-input v-model="scope.row.inboundDate" placeholder="请输入" class="addinputw" readonly
<el-input v-model="scope.row.invoicinMoney" placeholder="请输入" class="addinputw" readonly
@keyup.native="scope.row.inboundDate = oninput(scope.row.inboundDate,2)"
:readonly="scope.row.inboundDate"/>
</template>
</el-table-column>
<el-table-column width="180" label="开票单位" align="center">
<template slot-scope="scope"><!-- 由发票类型决定,增值税票:开票单位=调入公司 -->
<el-input v-model="scope.row.inboundDate" placeholder="请输入" class="addinputw" readonly
<el-input v-model="scope.row.invoicinCompanyName" placeholder="请输入" class="addinputw" readonly
:readonly="scope.row.inboundDate"/>
</template>
</el-table-column>
@ -119,7 +120,7 @@
</el-table-column>
<el-table-column width="200" label="备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
@ -137,9 +138,8 @@
<script>
import diaochecheliangList from '@/views/supplychain/diaochekaipiaoshenqingguanli/relation/diaochecheliangList'
import Upload from '@/components/uploadFile/uploadImg.vue'
import req from '@/api/supplychain/purchasereturntowarehouse'
import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import { typeValues } from '@/api/cheliang/dictcommons'
import { getOrg, getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import { fetchDetailsBySid, save } from '@/api/supplychain/diaochekaipiaoshenqing.js'
export default {
name: 'diaocheshenqingAdd',
@ -154,18 +154,24 @@ export default {
dialogStatus: '',
index: 0,
list: [],
depositVehicleList: [],
accadjTypeValue_list: [],
branchOfficeSid:'', // sid
vehicleList: [],
branchOfficeSid: '', // sid
useOrg_list: [],
//
temp: {
sid: '', // sid
applicationCode: '',
name: '',
createTime: '',
money: '',
userSid: '', // sid
detailsList: []
sid: '',
createBySid: '',
applyDate: '',
accadjTypeKey: '',
accadjTypeValue: '',
callOutOrgSid: '',
callOutOrgName: '',
callInOrgSid: '',
callInOrgName: '',
useOrgSid: '',
createOrgSid: '',
nodeState: '',
baseShuntingInvoicinApplyeVehs: []
},
rules: {
// money: [{ required: true, message: '', trigger: 'blur' }]
@ -194,39 +200,80 @@ export default {
}
return val
},
//
getListOrgAll() {
getOrg().then((res) => {
if (res.success) {
this.useOrg_list = res.data
}
})
},
callOutOrgSidChange(val) {
const choosetItem = this.useOrg_list.filter((item) => item.sid == val)
this.temp.callOutOrgName = choosetItem[0].name
console.log('name:', this.temp.callOutOrgName, 'key:', this.temp.callOutOrgSid)
},
// sid
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.branchOfficeSid = res.data
this.useOrg = res.data
this.temp.createOrgSid = res.data
}
})
},
getType() {
typeValues({}).then((res) => {
if (res.code === '200') {
this.manPurOrderType_list = res.data
}
//
handletiaozhangcheliang() {
if (this.temp.callOutOrgSid == '') {
this.$message({
showClose: true,
message: '请选择调出分公司',
type: 'error'
})
return
}
if (this.temp.callInOrgSid == '') {
this.$message({
showClose: true,
message: '请选择调入分公司',
type: 'error'
})
return
}
this.isXuanche = true
const vinNoList = []
this.list.forEach(element => {
vinNoList.push(element.sid)
})
this.$refs['xuanChe'].showCheList( this.temp.callOutOrgSid, this.temp.callInOrgSid, vinNoList)
},
//
dataDelete(index, row) {
console.log('index', index)
console.log('row', row)
this.list.splice(index, 1)
},
resetState() {
this.isXuanche = false
},
selectVehicle(vehicleList) {
console.log('vehicleList', vehicleList)
this.vehicleList = vehicleList
for (var i = 0; i < vehicleList.length; i++) {
this.list.push({})
}
console.log('车辆表数据', this.list)
}
showAdd() {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.temp.name = window.sessionStorage.getItem('name')
this.temp.userSid = window.sessionStorage.getItem('userSid')
req.detailsInfo(this.temp.sid).then(resp => {
const data = resp.data
this.temp.applicationCode = data.applicationCode
this.temp.createTime = data.createTime
}).catch(e => {
this.submitdisabled = false
})
this.temp.createBySid = window.sessionStorage.getItem('userSid')
this.dialogStatus = 'add'
this.viewTitle = '【新增】调车开票申请'
this.getPathSid()
this.getType()
},
showEdit(row) {
this.$nextTick(() => {
@ -234,32 +281,25 @@ export default {
})
this.dialogStatus = 'edit'
this.viewTitle = '【编辑】调车开票申请'
req.detailsInfo({
sid: row.sid
}).then(resp => {
fetchDetailsBySid(row.sid).then(resp => {
if (resp.success) {
const data = resp.data
this.temp = data
this.list = data.voList
// --- tempjsontemp---
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/voList/g, 'detailsList')
)
this.list = data.baseShuntingInvoicinApplyeVehs
console.log('编辑初始化', this.temp)
}
}).catch(e => {
this.submitdisabled = false
})
this.getPathSid()
this.getType()
},
handleCreate() {
const _this = this
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
this.temp.detailsList = this.list
req.save(this.temp).then(resp => {
this.temp.baseShuntingInvoicinApplyeVehs = this.list
save(this.temp).then(resp => {
this.submitdisabled = false
if (resp.success) {
if (resp.success) {
@ -279,13 +319,20 @@ export default {
if (isreload === 'true') this.$emit('reloadlist')
this.temp = {
sid: '',
applicationCode: '',
name: '',
createTime: '',
userSid: '',
detailsList: []
},
this.list = []
createBySid: '',
applyDate: '',
accadjTypeKey: '',
accadjTypeValue: '',
callOutOrgSid: '',
callOutOrgName: '',
callInOrgSid: '',
callInOrgName: '',
useOrgSid: '',
createOrgSid: '',
nodeState: '',
baseShuntingInvoicinApplyeVehs: []
}
this.list = []
this.$refs['dataForm'].resetFields()
this.$emit('doback')
},
@ -299,51 +346,23 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.temp.detailsList = this.list
req.submitVehicleReturn(this.temp).then(resp => {
this.submitdisabled = false
if (resp.success) {
if (resp.success) {
_this.handleReturn('true')
}
}
}).catch(() => {
this.submitdisabled = false
})
this.temp.baseShuntingInvoicinApplyeVehs = this.list
// submitVehicleReturn(this.temp).then(resp => {
// this.submitdisabled = false
// if (resp.success) {
// if (resp.success) {
// _this.handleReturn('true')
// }
// }
// }).catch(() => {
// this.submitdisabled = false
// })
})
} else {
return false
}
})
},
//
handleyudingcheliang() {
this.isXuanche = true
const vinNoList = []
this.list.forEach(element => {
vinNoList.push(element.vinNo)
})
this.$refs['xuanChe'].loadVinNo(vinNoList)
},
//
dataDelete(index, row) {
console.log('index', index)
console.log('row', row)
this.list.splice(index, 1)
},
resetState() {
this.isXuanche = false
},
selectVehicle(depositVehicleList) {
console.log('depositVehicleList', depositVehicleList)
this.depositVehicleList = depositVehicleList
for (var i = 0; i < depositVehicleList.length; i++) {
this.list.push({
})
}
console.log('车辆表数据', this.list)
},
}
}
}

109
anrui-scm/anrui-scm-ui/src/views/supplychain/diaochekaipiaoshenqingguanli/relation/diaochecheliangList.vue

@ -21,7 +21,7 @@
<!-- &lt;!&ndash; <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>&ndash;&gt;-->
<!-- </el-form-item>-->
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vin" placeholder="请输入名称" clearable/>
<el-input v-model="listQuery.params.vinNo" placeholder="请输入名称" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
@ -47,17 +47,17 @@
</el-table-column>
<el-table-column label="调车类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
<span>{{ scope.row.shuntingType }}</span>
</template>
</el-table-column>
<el-table-column label="调出分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
<span>{{ scope.row.buyerOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="调入分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.guidedPrice }}</span>
<span>{{ scope.row.sellerOrgName }}</span>
</template>
</el-table-column>
</el-table>
@ -76,7 +76,7 @@
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/supplychain/purchasereturntowarehouse'
import { fetchVeh } from '@/api/supplychain/diaochekaipiaoshenqing'
export default {
name: 'diaochecheliangList',
@ -93,15 +93,6 @@ export default {
btndisabled: false,
viewState: 1, // 1 2- 3 4 5-
// -----------
carbrand_list: [], //
vehicleFunction_list: [], //
productLine_list: [], //
gearboxType_list: [], //
driveForm_list: [], //
emissionStandard_list: [], //
power_list: [], //
fuelType_list: [], //
vehicleVersion_list: [], //
tableKey: 0,
list: [],
sids: [],
@ -125,12 +116,9 @@ export default {
vehicleVersion: ''
}
},
selectDate: undefined,
temp: {}, //
vinNoList: [],
depositVehicleList: [],
vehicle_list: [],
visible: true,
hetongdanganguanliInfoShow: false
// ------------------------------------
}
},
@ -140,6 +128,11 @@ export default {
this.handleFilter()
this.getType()
},
showCheList(callOutOrgSid, callInOrgSid, vinNoList){
this.listQuery.params.callOutOrgSid = callOutOrgSid
this.listQuery.params.callInOrgSid = callInOrgSid
this.listQuery.params.sids = vinNoList
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
@ -151,28 +144,14 @@ export default {
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 20,
params: {
carbrand: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
lockedState: '',
power: '',
productLine: '',
vehicleState: '',
vehicleType: '',
vehicleVersion: ''
}
}
this.listQuery.current = 1
this.listQuery.size = 20
this.listQuery.params.vinNo = ''
},
//
handleSelectionChange(row) {
console.log('row', row)
this.depositVehicleList = row
this.vehicle_list = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
@ -183,38 +162,46 @@ export default {
//
handleConfirm() {
if (this.sids.length > 0) {
if (this.vinNoList.length > 0) {
// if (this.vinNoList.length > 0) {
console.log('已选择的数据', this.vinNoList)
for (var i = 0; i < this.vinNoList.length; i++) {
for (var j = 0; j < this.depositVehicleList.length; j++) {
if (this.vinNoList[i] == this.depositVehicleList[j].vinNo) {
const index = this.depositVehicleList.findIndex(val => {
return this.depositVehicleList[j].vinNo === this.vinNoList[i]
})
this.depositVehicleList.splice(index, 1)
console.log('进入if判断', index)
}
}
}
}
this.$emit('handleVehicle', this.depositVehicleList)
// for (var i = 0; i < this.vinNoList.length; i++) {
// for (var j = 0; j < this.vehicle_list.length; j++) {
// if (this.vinNoList[i] == this.vehicle_list[j].vinNo) {
// const index = this.vehicle_list.findIndex(val => {
// return this.vehicle_list[j].vinNo === this.vinNoList[i]
// })
// this.vehicle_list.splice(index, 1)
// console.log('if', index)
// }
// }
// }
// }
this.$emit('handleVehicle', this.vehicle_list)
this.$nextTick(() => {
this.$refs.multipleTable.clearSelection()
})
this.handleReturn()
} else {
this.$notify({
title: '提示',
message: '没有选择车辆!',
type: 'error',
duration: 2000
this.$message({
showClose: true,
message: '请选择车辆!',
type: 'error'
})
return
}
},
//
handleReturn() {
this.listQuery = {
current: 1,
size: 20,
params: {
vinNo: '',
callOutOrgSid: '',
callInOrgSid: '',
sids: []
}
}
this.$emit('doback') //
},
//
@ -226,15 +213,7 @@ export default {
//
getList() {
this.listLoading = true
req.pagerList({
current: this.listQuery.current,
size: this.listQuery.size,
params: {
modelName: this.listQuery.modelName,
carModel: this.listQuery.carModel,
brandName: this.listQuery.brandName
}
}).then((response) => {
fetchVeh(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (

9
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanli.vue

@ -274,7 +274,7 @@ export default {
accadjTypeKey: '',
callOutOrgSid: '',
callInOrgSid: '',
createOrgSid: '' // window.sessionStorage.getItem('orgSid'),
createOrgSid: this.useOrg // window.sessionStorage.getItem('orgSid'),
}
}
this.getPathSid()
@ -288,13 +288,6 @@ export default {
const data = resp.data
_this.listQuery.total = data.total
_this.dataList = data.records
for (var i = 0; i < this.dataList.length; i++) {
if (this.dataList[i].inspectedType == '1') {
this.dataList[i].inspectedType = '待验车'
} else {
this.dataList[i].inspectedType = '已验车'
}
}
})
.catch(() => {
_this.tableLoading = false

18
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo.vue

@ -45,47 +45,47 @@
<template class="tablelist">
<el-table :data="list" border style="width: 100%" :index="index">
<el-table-column align="center" fixed label="序号" type="index" width="50"/>
<el-table-column label="车型名称" align="center">
<el-table-column label="车型名称" align="center" width="190px">
<template slot-scope="scope">
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="常用配置" align="center">
<el-table-column label="常用配置" align="center" width="360">
<template slot-scope="scope">
<span>{{ scope.row.configName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<el-table-column label="车架号" align="center" width="120">
<template slot-scope="scope" @click="">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="库存地点" align="center">
<el-table-column label="库存地点" align="center" width="200">
<template slot-scope="scope" @click="">
<span>{{ scope.row.inventoryLocationName }}</span>
</template>
</el-table-column>
<el-table-column label="内销价格" align="center">
<el-table-column label="内销价格" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.witPinMoney }}</span>
</template>
</el-table-column>
<el-table-column label="发票类型" align="center">
<el-table-column label="发票类型" align="center" width="140">
<template slot-scope="scope">
<span>{{ scope.row.invoiceTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="运费" align="center">
<el-table-column label="运费" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.freight }}</span>
</template>
</el-table-column>
<el-table-column label="运费承担方" align="center">
<el-table-column label="运费承担方" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.freightUndertakerName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<el-table-column label="备注" align="left" header-align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.remarks }}</span>
</template>

Loading…
Cancel
Save