Browse Source

经销商、调账

master
Zhao Qiqi 3 years ago
parent
commit
2da3d736e3
  1. 8
      anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiAdd.vue
  2. 4
      anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue
  3. 48
      anrui-scm/anrui-scm-ui/src/api/supplychain/diaochekaipiaoshenqing.js
  4. 15
      anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js
  5. 289
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList.vue
  6. 205
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue
  7. 74
      anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliInfo.vue

8
anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiAdd.vue

@ -1101,6 +1101,12 @@ export default {
// this.temp.managementDetailAddress = this.managementProvince + this.managementcity + this.managementcount + this.managementAll
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.temp.provinceCode = this.managementProvinceCode
this.temp.cityCode = this.managementcityCode
this.temp.managementAddressCode = this.managementcountCode
this.temp.managementDetailAddressProvince = this.managementProvince
this.temp.managementDetailAddressCity = this.managementcity
this.temp.managementDetailAddressCounty = this.managementcount
// if (this.dialogStatus == 'add') {
// if (!this.temp.registAddress) {
// this.temp.registAddress = this.registProvince + '-' + this.registcity + '-' + this.registcount
@ -1108,7 +1114,7 @@ export default {
//
// }
// if (!this.temp.managementAddress && this.managementProvince && this.managementcity && this.managementcount) {
this.temp.managementAddress = this.managementProvince + this.managementcity + this.managementcount
// this.temp.managementAddress = this.managementProvince + this.managementcity + this.managementcount
console.log('新增、编辑经营地址', this.temp.managementAddress)
// }
// }

4
anrui-base/anrui-base-ui/src/views/guakaogongsi/guakaogongsiguanli/guakaogongsiInfo.vue

@ -71,7 +71,9 @@
<!-- </el-col>-->
<el-col :span="20">
<el-form-item prop="">
<span>{{ temp.managementAddress + temp.managementDetailAddress }}</span>
<span>{{
temp.managementDetailAddressProvince + temp.managementDetailAddressCity + temp.managementDetailAddressCounty + temp.managementDetailAddress
}}</span>
</el-form-item>
</el-col>
</el-row>

48
anrui-scm/anrui-scm-ui/src/api/supplychain/diaochekaipiaoshenqing.js

@ -1 +1,49 @@
import request from '@/utils/request'
// 获取调车列表
export function listPage(data) {
return request({
url: '/base/v1/baseshuntinginvoicingapply/listPage',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 批量删除调账列表数据
export function delBySids(data) {
return request({
url: '/base/v1/baseaccadjapply/delBySids',
data,
method: 'DELETE',
headers: { 'Content-Type': 'application/json' }
})
}
// 保存
export function save(data) {
return request({
url: '/base/v1/baseaccadjapply/save',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// 回显
export function fetchDetailsBySid(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchDetailsBySid/' + data,
method: 'get',
})
}
// 获取车辆列表
export function fetchVeh(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchVeh',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}

15
anrui-scm/anrui-scm-ui/src/api/supplychain/tiaozhangshenqing.js

@ -20,7 +20,7 @@ export function delBySids(data) {
})
}
// 获取调账列表
// 保存
export function save(data) {
return request({
url: '/base/v1/baseaccadjapply/save',
@ -29,7 +29,8 @@ export function save(data) {
headers: { 'Content-Type': 'application/json' }
})
}
// 获取调账列表
// 回显
export function fetchDetailsBySid(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchDetailsBySid/' + data,
@ -37,3 +38,13 @@ export function fetchDetailsBySid(data) {
})
}
// 获取车辆列表
export function fetchVeh(data) {
return request({
url: '/base/v1/baseaccadjapply/fetchVeh',
data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}

289
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList.vue

@ -8,65 +8,66 @@
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="webcon">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header">
<el-form-item label="调车类型">
<el-select v-model="listQuery.params.purchaseType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in purchaseType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
</el-select>
<!-- <el-input v-model="listQuery.params.vin" placeholder="请输入车架号" clearable/>-->
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vin" placeholder="请输入名称" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter">查询</el-button>
<el-button type="primary" @click="handleReset">重置</el-button>
<div class="main-content">
<div class="webcon">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form :inline="true" class="tab-header">
<el-form-item label="调车类型">
<el-select v-model="listQuery.params.shuntingType" placeholder="请选择" clearable class="addinputw">
<el-option v-for="item in shuntingType_list" :key="item.key" :label="item.value"
:value="item.key"/>
</el-select>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="请输入名称" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter">查询</el-button>
<el-button type="primary" @click="handleReset">重置</el-button>
</div>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">待调账车辆列表</div>
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" fixed type="selection" align="center"/>
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="车架号" fixed align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="调车类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column label="调出分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="调入分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.guidedPrice }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
<div class="listtop">
<div class="tit">待调账车辆列表</div>
<pageye v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column width="50px" fixed type="selection" align="center"/>
<el-table-column width="80px" fixed label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="车架号" fixed align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="调车类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.shuntingType }}</span>
</template>
</el-table-column>
<el-table-column label="调出分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.buyerOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="调入分公司" align="center">
<template slot-scope="scope">
<span>{{ scope.row.sellerOrgName }}</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
@ -76,7 +77,7 @@
<script>
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import req from '@/api/supplychain/purchasereturntowarehouse'
import { fetchVeh } from '@/api/supplychain/tiaozhangshenqing.js'
export default {
name: 'tiaozhangcheliangList',
@ -92,16 +93,14 @@ export default {
searchxianshitit: '显示查询条件',
btndisabled: false,
viewState: 1, // 1 2- 3 4 5-
shuntingType_list: [{
key: '0',
value: '调入'
}, {
key: '1',
value: '调出'
}],
// -----------
carbrand_list: [], //
vehicleFunction_list: [], //
productLine_list: [], //
gearboxType_list: [], //
driveForm_list: [], //
emissionStandard_list: [], //
power_list: [], //
fuelType_list: [], //
vehicleVersion_list: [], //
tableKey: 0,
list: [],
sids: [],
@ -112,23 +111,19 @@ export default {
current: 1,
size: 20,
params: {
carbrand: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
lockedState: '',
power: '',
productLine: '',
vehicleState: '',
vehicleType: '',
vehicleVersion: ''
shuntingType: '',
vinNo: '',
accadjTypeKey: '',
callOutOrgSid: '',
callInOrgSid: '',
sids: []
}
},
requiredPar: {},
selectDate: undefined,
temp: {}, //
vinNoList: [],
depositVehicleList: [],
vehicleList: [],
visible: true,
hetongdanganguanliInfoShow: false
// ------------------------------------
@ -137,8 +132,32 @@ export default {
methods: {
//
init() {
},
showCheList(accadjTypeKey, callOutOrgSid, callInOrgSid, vinNoList) {
this.listQuery.params.accadjTypeKey = accadjTypeKey
this.listQuery.params.callOutOrgSid = callOutOrgSid
this.listQuery.params.callInOrgSid = callInOrgSid
this.listQuery.params.sids = vinNoList
this.requiredPar = {
accadjTypeKey: accadjTypeKey,
callOutOrgSid: callOutOrgSid,
callInOrgSid: callInOrgSid,
sids: vinNoList
}
this.handleFilter()
this.getType()
// this.getType()
},
//
handleSelectionChange(row) {
console.log('row', row)
this.vehicleList = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('选择sid', this.sids)
},
//
clicksearchShow() {
@ -155,67 +174,71 @@ export default {
current: 1,
size: 20,
params: {
carbrand: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
lockedState: '',
power: '',
productLine: '',
vehicleState: '',
vehicleType: '',
vehicleVersion: ''
shuntingType: '',
vinNo: '',
accadjTypeKey: this.requiredPar.accadjTypeKey,
callOutOrgSid: this.requiredPar.callOutOrgSid,
callInOrgSid: this.requiredPar.callInOrgSid,
sids: this.requiredPar.sids
}
}
this.getList()
},
//
handleSelectionChange(row) {
console.log('row', row)
this.depositVehicleList = row
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('选择sid', this.sids)
},
// getType() {
// typeValues({
// type: 'accadjType'
// }).then((response) => {
// if (response.code === '200' && response.data) {
// this.accadjType_list = response.data
// }
// })
// },
//
handleConfirm() {
if (this.sids.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)
if (this.vehicleList.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.vehicleList.length; j++) {
// if (this.vinNoList[i] == this.vehicleList[j].vinNo) {
// const index = this.vehicleList.findIndex(val => {
// return this.vehicleList[j].vinNo === this.vinNoList[i]
// })
// this.vehicleList.splice(index, 1)
// console.log('if', index)
// }
// }
// }
// }
this.$emit('handleVehicle', this.vehicleList)
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: {
shuntingType: '',
vinNo: '',
accadjTypeKey: '',
callOutOrgSid: '',
callInOrgSid: '',
sids: []
}
}
this.$emit('doback') //
},
//
@ -227,15 +250,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 (
@ -245,6 +260,14 @@ export default {
) {
this.list = response.data.records
this.total = response.data.total
for (var i = 0; i < this.list.length; i++) {
if (this.list[i].shuntingType == '0') {
this.list[i].shuntingType = '调入'
}
if (this.list[i].shuntingType == '1') {
this.list[i].shuntingType = '调出'
}
}
} else {
this.list = []
this.total = 0

205
anrui-scm/anrui-scm-ui/src/views/supplychain/tiaozhangshenqingguanli/tiaozhangshenqingguanliAdd.vue

@ -30,20 +30,31 @@
<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"
<el-select v-model="temp.accadjTypeKey" placeholder="请选择" clearable class="addinputw"
@change="accadjTypeKeyChange">
<el-option v-for="item in accadjType_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8"><!-- :readonly="depositVehicleList[scope.$index].inboundDate" -->
<el-col :span="8"><!-- :readonly="vehicleList[scope.$index].inboundDate" -->
<el-form-item prop="money" label="调出分公司">
<el-input v-model="temp.money" placeholder="请输入" class="addinputw" clearable/>
<el-select v-model="temp.callOutOrgSid" placeholder="请选择" clearable class="addinputw"
:disabled="temp.accadjTypeKey == '02'"
@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-col :span="8">
<el-form-item prop="money" label="调入分公司">
<el-input v-model="temp.money" placeholder="请输入" class="addinputw" clearable/>
<el-select v-model="temp.callInOrgSid" placeholder="请选择" clearable class="addinputw"
:disabled="temp.accadjTypeKey == '01'"
@change="callInOrgSidChange">
<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>
@ -59,58 +70,58 @@
<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="操作" fixed align="center" width="250px" class-name="small-padding fixed-width">
<el-table-column label="操作" fixed align="center" width="80" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="dataDelete(scope.row,scope.$index,list[scope.$index])">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="车型名称" align="center">
<el-table-column label="车型名称" align="center" width="190px">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
<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.vinNo }}</span>
<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.inboundDate }}</span>
<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">
<el-input v-model="scope.row.inboundDate" placeholder="请输入" class="addinputw"
:readonly="depositVehicleList[scope.$index].inboundDate"/>
<!-- <span>{{scope.row.inboundDate}}</span>-->
<!-- <el-input v-model="scope.row.invoiceTypeValue" placeholder="请输入" class="addinputw"-->
<!-- :readonly="vehicleList[scope.$index].inboundDate"/>-->
<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.inboundDate }}</span>
<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.inboundDate }}</span>
<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.inboundDate }}</span>
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
@ -127,8 +138,7 @@
<script>
import tiaozhangcheliangList from '@/views/supplychain/tiaozhangshenqingguanli/relation/tiaozhangcheliangList'
import req from '@/api/supplychain/purchasereturntowarehouse'
import {fetchDetailsBySid,save} from '@/api/supplychain/tiaozhangshenqing.js'
import { fetchDetailsBySid, save } from '@/api/supplychain/tiaozhangshenqing.js'
import { getOrg, getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
import { typeValues } from '@/api/cheliang/dictcommons'
@ -144,9 +154,7 @@ export default {
dialogStatus: '',
index: 0,
list: [],
depositVehicleList: [],
accadjTypeValue_list: [],
// ==========
vehicleList: [],
useOrg: '',
accadjType_list: [],
useOrg_list: [],
@ -167,7 +175,7 @@ export default {
accSids: [] // sid
},
rules: {
// money: [{ required: true, message: '', trigger: 'blur' }]
},
submitdisabled: false, //
disabled: false //
@ -199,13 +207,12 @@ export default {
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.code === '200') {
this.useOrg = res.data
this.getList()
}
})
},
getType() {
typeValues({
type: 'accadjType '
type: 'accadjType'
}).then((response) => {
if (response.code === '200' && response.data) {
this.accadjType_list = response.data
@ -219,39 +226,103 @@ export default {
}
})
},
//
accadjTypeKeyChange(val) {
if (val) {
const choosetItem = this.accadjType_list.filter((item) => item.dictKey == val)
this.temp.accadjTypeValue = choosetItem[0].dictValue
console.log('name:', this.temp.accadjTypeValue, 'key:', this.temp.accadjTypeKey)
//
if (this.temp.accadjTypeKey == '01') {
this.temp.callInOrgSid = this.useOrg
const name = this.useOrg_list.filter((item) => item.sid == this.temp.callInOrgSid)
this.temp.callInOrgName = name[0].name
console.log('name:', this.temp.callInOrgName, 'sid:', this.temp.callInOrgSid)
this.temp.callOutOrgName = ''
this.temp.callOutOrgSid = ''
}
//
if (this.temp.accadjTypeKey == '02') {
this.temp.callOutOrgSid = this.useOrg
const name = this.useOrg_list.filter((item) => item.sid == this.temp.callOutOrgSid)
this.temp.callOutOrgName = name[0].name
console.log('name:', this.temp.callOutOrgName, 'sid:', this.temp.callOutOrgSid)
this.temp.callInOrgName = ''
this.temp.callInOrgSid = ''
}
}
},
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)
},
callInOrgSidChange(val) {
const choosetItem = this.useOrg_list.filter((item) => item.sid == val)
this.temp.callInOrgName = choosetItem[0].name
console.log('name:', this.temp.callInOrgName, 'key:', this.temp.callInOrgSid)
},
handletiaozhangcheliang() {
if (this.temp.accadjTypeKey == '') {
this.$message({
showClose: true,
message: '请选择调账类型',
type: 'error'
})
return
}
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.vinNo)
vinNoList.push(element.sid)
})
this.$refs['xuanChe'].loadVinNo(vinNoList)
this.$refs['xuanChe'].showCheList(this.temp.accadjTypeKey, this.temp.callOutOrgSid, this.temp.callInOrgSid, vinNoList)
},
resetState() {
this.isXuanche = false
},
selectVehicle(depositVehicleList) {
console.log('depositVehicleList', depositVehicleList)
this.depositVehicleList = depositVehicleList
for (var i = 0; i < depositVehicleList.length; i++) {
//
selectVehicle(vehicleList) {
console.log('vehicleList', vehicleList)
this.vehicleList = vehicleList
for (var i = 0; i < vehicleList.length; i++) {
this.list.push({
configName: depositVehicleList[i].configName,
configSid: depositVehicleList[i].configSid,
inboundDate: depositVehicleList[i].priceDate,
modelName: depositVehicleList[i].vehicleAlias,
vinNo: depositVehicleList[i].vinNo
sid: vehicleList[i].sid,
vinNo: vehicleList[i].vinNo,
vehicleAlias: vehicleList[i].vehicleAlias,
modelSid: vehicleList[i].modelSid,
configName: vehicleList[i].configName,
configSid: vehicleList[i].configSid,
inventoryLocationName: vehicleList[i].inventoryLocationName,
witPinMoney: vehicleList[i].witPinMoney,
invoiceTypeValue: vehicleList[i].invoiceTypeValue,
freight: vehicleList[i].freight,
freightUndertakerName: vehicleList[i].freightUndertakerName,
remarks: vehicleList[i].remarks
})
}
console.log('车辆表数据', this.list)
},
//
dataDelete(index, row) {
console.log('index', index)
console.log('row', row)
dataDelete(row, index) {
console.log('index', index, 'row', row)
this.list.splice(index, 1)
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
@ -281,13 +352,13 @@ export default {
})
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
})
// 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.dialogStatus = 'add'
this.viewTitle = '【新增】分公司间调账申请'
this.getPathSid()
@ -325,7 +396,9 @@ export default {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.submitdisabled = true
this.temp.detailsList = this.list
this.list.forEach(element => {
this.temp.accSids.push(element.sid)
})
save(this.temp).then(resp => {
this.submitdisabled = false
if (resp.success) {
@ -372,16 +445,16 @@ export default {
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
})
// req.submitVehicleReturn(this.temp).then(resp => {
// this.submitdisabled = false
// if (resp.success) {
// if (resp.success) {
// _this.handleReturn('true')
// }
// }
// }).catch(() => {
// this.submitdisabled = false
// })
})
} else {
return false

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

@ -20,18 +20,18 @@
<div class="invoiceadd" style="margin-top: 5px;">
<el-row>
<el-col :span="8">
<el-form-item prop="reason" label="调账类型">
<el-form-item prop="accadjTypeValue" label="调账类型">
<span>{{temp.accadjTypeValue}}</span>
</el-form-item>
</el-col>
<el-col :span="8"><!-- :readonly="depositVehicleList[scope.$index].inboundDate" -->
<el-form-item prop="money" label="调出分公司">
<span>{{temp.money}}</span>
<el-form-item prop="callOutOrgName" label="调出分公司">
<span>{{temp.callOutOrgName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item prop="money" label="调入分公司">
<span>{{temp.money}}</span>
<el-form-item prop="callInOrgName" label="调入分公司">
<span>{{temp.callInOrgName}}</span>
</el-form-item>
</el-col>
</el-row>
@ -45,16 +45,9 @@
<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="操作" fixed align="center" width="250px" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="danger"
@click="dataDelete(scope.row,scope.$index,list[scope.$index])">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="车型名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="常用配置" align="center">
@ -69,32 +62,32 @@
</el-table-column>
<el-table-column label="库存地点" align="center">
<template slot-scope="scope" @click="">
<span>{{ scope.row.vinNo }}</span>
<span>{{ scope.row.inventoryLocationName }}</span>
</template>
</el-table-column>
<el-table-column label="内销价格" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.witPinMoney }}</span>
</template>
</el-table-column>
<el-table-column label="发票类型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.invoiceTypeValue }}</span>
</template>
</el-table-column>
<el-table-column label="运费" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.freight }}</span>
</template>
</el-table-column>
<el-table-column label="运费承担方" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.freightUndertakerName }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
@ -108,7 +101,8 @@
</template>
<script>
import req from '@/api/supplychain/purchasereturntowarehouse'
import { fetchDetailsBySid } from '@/api/supplychain/tiaozhangshenqing.js'
export default {
name: 'tiaozhangshenqingguanliInfo',
@ -123,16 +117,17 @@ export default {
accadjTypeValue_list: [],
//
temp: {
sid: '', // sid
applicationCode: '',
name: '',
createTime: '',
money: '',
userSid: '', // sid
detailsList: []
sid:'',
applyDate:'', //
accadjTypeKey:'', // key
accadjTypeValue:'', // value
callOutOrgSid:'', // sid
callOutOrgName:'', //
callInOrgSid:'', // sid
callInOrgName:'', //
baseInternalPurchaseVehicles:[], //
},
rules: {
// money: [{ required: true, message: '', trigger: 'blur' }]
},
submitdisabled: false, //
disabled: false //
@ -143,17 +138,13 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'edit'
req.detailsInfo({
fetchDetailsBySid({
sid: 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.baseInternalPurchaseVehicles
console.log('编辑初始化', this.temp)
}
}).catch(e => {
@ -163,12 +154,15 @@ export default {
// ===
handleReturn() {
this.temp = {
sid: '',
applicationCode: '',
name: '',
createTime: '',
userSid: '',
detailsList: []
sid:'',
applyDate:'', //
accadjTypeKey:'', // key
accadjTypeValue:'', // value
callOutOrgSid:'', // sid
callOutOrgName:'', //
callInOrgSid:'', // sid
callInOrgName:'', //
baseInternalPurchaseVehicles:[], //
}
this.list = []
this.$refs['dataForm'].resetFields()

Loading…
Cancel
Save