Browse Source

完善存放地点变更

master
yunuo970428 3 years ago
parent
commit
a8cdfedb70
  1. 8
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue
  2. 271
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
  3. 66
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengInfo.vue
  4. 76
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
  5. 365
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue
  6. 62
      anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue

8
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue

@ -16,9 +16,9 @@
<el-date-picker v-model="listQuery.params.applyDateEnd" type="date" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-form-item label="车架号">
<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" icon="el-icon-search" size="small" @click="getList">查询</el-button>
@ -53,7 +53,7 @@
<el-table-column width="220px" prop="applyId" label="申请编号" align="center"/>
<el-table-column width="140px" prop="applyDate" label="申请日期" align="center"/>
<el-table-column width="130px" prop="applyName" label="申请人" align="center"/>
<el-table-column width="180px" prop="vin" label="车架号" align="center"/>
<!-- <el-table-column width="180px" prop="vin" label="车架号" align="center"/>-->
<el-table-column width="160px" prop="location" label="现存放地点" align="center"/>
<el-table-column width="160px" prop="targetLocation" label="目标存放地点" align="center"/>
<el-table-column width="130px" prop="operator" label="经办人" align="center"/>

271
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue

@ -52,22 +52,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<span><span class="icon">*</span>车架号</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ temp.vinNo }}</span>
<el-button size="small" type="primary" @click="selectVinNo" class="selectVinNoBtn">选择</el-button>
<!-- <el-select v-model="temp.vinNo" placeholder="请选择" filterable clearable class="addinputw">-->
<!-- <el-option v-for="item in vinNo_list" :key="item.vin" :label="item.vin" :value="item.vin"/>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
<el-col :span="3">
<span>目标存放地点</span>
</el-col>
<el-col :span="9">
<el-col :span="21">
<el-form-item prop="targetLocation">
<el-select v-model="temp.targetLocation" placeholder="请选择" clearable class="addinputw" @change="targetLocationChange">
<el-option v-for="item in warehouwarehouse_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -90,7 +78,7 @@
<span><span class="icon">*</span>经办人</span>
</el-col>
<el-col :span="9">
<el-form-item><el-input v-model="temp.operator" maxlength="125" placeholder="" class="addinputw" clearable/></el-form-item>
<el-form-item prop="operator"><el-input v-model="temp.operator" maxlength="125" placeholder="" class="addinputw" clearable/></el-form-item>
</el-col>
<el-col :span="3">
<span>申请费用()</span>
@ -106,28 +94,41 @@
<span><span class="icon">*</span>保险状态</span>
</el-col>
<el-col :span="9">
<el-form-item prop="InsuranceStateKey">
<el-form-item>
<el-radio v-model="temp.InsuranceStateKey" label="0"></el-radio>
<el-radio v-model="temp.InsuranceStateKey" label="1"></el-radio>
</el-form-item>
</el-col>
<el-col :span="3">
<span>临牌牌照号</span>
<span><span class="icon">*</span>是否需要临牌</span>
</el-col>
<el-col :span="9">
<el-form-item>
<el-input v-model="temp.temporaryCard" maxlength="125" placeholder="" class="addinputw" clearable/>
<el-form-item>
<el-radio v-model="temp.proCardStateKey" label="0"></el-radio>
<el-radio v-model="temp.proCardStateKey" label="1"></el-radio>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row v-show="temp.InsuranceStateKey == '1'">
<el-col :span="3">
<span>保单</span>
</el-col>
<el-col :span="21">
<upload ref="uploadImg" v-model="imgList" :limit="1" bucket="map" :upload-data="{type:'0001'}"/>
</el-col>
</el-row>
<div class="title">
<div><span>车辆列表</span></div>
<div><el-button size="mini" type="primary" icon="el-icon-plus" @click="selectVinNo" class="btntopblueline">选择</el-button></div>
</div>
<el-table :key="vinKey" :data="temp.vins" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- ======== 打开选择车架号 ======== -->
@ -159,11 +160,16 @@
<span>{{ scope.row.vin }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="买断状态">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}</span>
</template>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination v-show="vinNototal > 0" :limit.sync="vinNoList.size" :page.sync="vinNoList.current" :total="vinNototal" class="pagination" @pagination="getvinNoList"/>
<pagination v-show="listvinNo.length > 0" :limit.sync="vinNoList.size" :page.sync="vinNoList.current" :total="vinNoList.total" class="pagination" @pagination="getvinNoList"/>
</div>
</el-dialog>
</div>
@ -178,34 +184,25 @@ import {
submitCarTransfer
} from '@/api/supplychain/cunfangdidianbiangeng'
import { getGressionUserList } from '@/api/cheliang/dictcommons'
import Upload from '@/components/uploadFile/uploadImg.vue'
import Pagination from '@/components/pagination'
export default {
name: 'cunfangdidianbiangengAdd',
components: {
Upload
Pagination
},
data() {
return {
viewTitle: '',
// ---------
sid: '',
datas: null,
stateId: 0,
FormLoading: false,
listLoading: false,
location_list: [],
targetLocation_list: [],
imgList: [], //
vinNo_list: [], //
warehouwarehouse_list: [], //
staff_list: [],
temp: {
sid: '',
// taskId: '',
// procInsId: '',
userSid: window.sessionStorage.getItem('userSid'),
// applyId: '',
userSid: '',
applicantName: '',
applicantDate: '',
location: '',
@ -222,19 +219,21 @@ export default {
operator: '',
InsuranceState: '',
InsuranceStateKey: '',
proCardState: '',
proCardStateKey: '',
temporaryCard: '',
policyImage: []
policyImage: [],
vins: []
}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
//
vinNoVisible: false,
tableKey: 0,
vinNototal: 1,
vinKey: 1,
index: 0,
vinNoLoading: false,
vinNoCount: 0,
vinNoChoice: [],
listvinNo: [],
vinNoList: {
@ -243,17 +242,16 @@ export default {
params: {
vin: '',
warehouseSid: '',
userSid: window.sessionStorage.getItem('userSid')
}
userSid: window.sessionStorage.getItem('userSid'),
vins: []
},
total: 0
},
rules: {
// vinNo: [{ required: true, message: '', trigger: 'change' }],
operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }],
InsuranceStateKey: [{ required: true, message: '保险状态不能为空', trigger: 'blur' }],
location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }],
targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }]
}
// ------------------------------------
}
},
methods: {
@ -293,25 +291,11 @@ export default {
}
})
},
getVin(sid) {
const data = {
warehouseSid: sid,
userSid: window.sessionStorage.getItem('userSid')
}
getVinByWarehouseSid(data).then((res) => {
if (res.code === '200') {
this.vinNo_list = res.data
this.listvinNo = res.data
console.log('车架号', this.vinNo_list)
}
})
},
locationChange(val) {
const choosetItem = this.warehouwarehouse_list.filter((item) => item.dictValue === val)
this.temp.locationKey = choosetItem[0].dictKey
this.temp.locationSid = choosetItem[0].sid
this.vinNoList.params.warehouseSid = this.temp.locationSid
// this.getVin(this.temp.locationSid)
console.log('name:', this.temp.location, 'key:', this.temp.locationKey, 'sid:', this.temp.locationSid)
},
staffNameChange(val) {
@ -332,6 +316,7 @@ export default {
this.dialogStatus = 'add'
this.viewTitle = '【新增】车辆存放地点变更申请'
this.temp.applicantName = window.sessionStorage.getItem('name')
this.temp.userSid = window.sessionStorage.getItem('userSid')
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
@ -359,15 +344,6 @@ export default {
this.temp = res.data
this.temp.instanceId = res.data.procInstId
this.vinNoList.params.warehouseSid = this.temp.locationSid
if (this.temp.policyImage.length > 0) {
for (var i = 0; i < this.temp.policyImage.length; i++) {
const imgName = this.temp.policyImage[i].split('/')
this.imgList.push({
name: imgName[imgName.length - 1],
url: this.temp.policyImage[i]
})
}
}
}
})
this.getType()
@ -392,81 +368,50 @@ export default {
//
handlevinNo() {
this.vinNoList.current = 1
this.vinNoList.params.vins = this.temp.vins
this.getvinNoList()
},
//
getvinNoList() {
const _this = this
this.vinNoLoading = true
getVinByWarehouseSid(this.vinNoList)
.then(resp => {
_this.vinNoLoading = false
const data = resp.data
_this.vinNototal = data.total
_this.listvinNo = data.records
})
.catch(() => {
_this.vinNoLoading = false
})
getVinByWarehouseSid(this.vinNoList).then(resp => {
this.vinNoLoading = false
const data = resp.data
this.vinNoList.total = data.total
this.listvinNo = data.records
}).catch(() => {
this.vinNoLoading = false
})
},
//
handleSelectionvinNo(row) {
this.vinNoChoice = row
if (this.vinNoChoice.length > 1) {
this.$message({
showClose: true,
message: '仅可选择一个车架号!',
type: 'error'
})
return
}
const aa = []
row.forEach((element) => {
aa.push(element.vin)
})
this.vinNoChoice = aa
},
//
selectionvinNo() {
if (this.vinNoChoice.length > 1) {
if (this.vinNoChoice.length === 0) {
this.$message({
showClose: true,
message: '仅可选择一个车架号!',
message: '请至少选择一条记录!',
type: 'error'
})
return
}
if (this.vinNoChoice.length > 0) {
this.temp.vinNo = this.vinNoChoice[0].vin
this.temp.vehicleSid = this.vinNoChoice[0].carSid
this.vinNoVisible = false
} else {
this.$message({
showClose: true,
message: '请选择选择一个车架号!',
type: 'error'
})
this.temp.vins = this.vinNoChoice
this.vinNoVisible = false
}
// this.$refs.multipleTable.clearSelection();
},
//
vinNoindexMethod(index) {
var pagestart = (this.vinNoList.current - 1) * this.vinNoList.size
var pageindex = index + 1 + pagestart
return pageindex
},
getUrl() {
if (this.temp.InsuranceStateKey == '1') {
if (this.imgList.length > 0) {
console.log('保存imgList', this.imgList)
const img_list = []
for (var i = 0; i < this.imgList.length; i++) {
img_list.push(this.imgList[i].url)
this.temp.policyImage = img_list
console.log('保存img_list', img_list)
}
} else {
this.temp.policyImage = []
}
} else {
this.temp.policyImage = []
}
dataDelete(index) {
this.temp.vins.splice(index, 1)
},
// ------------------------------------------------------
//
@ -474,10 +419,7 @@ export default {
if (isreload === 'true') this.$emit('reloadlist')
this.temp = {
sid: '',
// taskId: '',
// procInsId: '',
userSid: window.sessionStorage.getItem('userSid'),
// applyId: '',
userSid: '',
applicantName: '',
applicantDate: '',
location: '',
@ -494,35 +436,32 @@ export default {
operator: '',
InsuranceState: '',
InsuranceStateKey: '',
proCardState: '',
proCardStateKey: '',
temporaryCard: '',
policyImage: []
policyImage: [],
vins: []
}
this.imgList = []
this.vinNo_list = []
this.$emit('doback')
},
//
handleCreate() {
if (this.temp.vinNo == '') {
this.$message({
showClose: true,
message: '车架号不能为空!',
type: 'error'
})
return
}
if (this.temp.applicantFunds == '') {
if (this.temp.applicantFunds === '') {
this.temp.applicantFunds = '0'
}
if (this.temp.InsuranceStateKey == '0') {
if (this.temp.InsuranceStateKey === '0') {
this.temp.InsuranceState = '否'
this.temp.policyImage = []
this.imgList = []
}
if (this.temp.InsuranceStateKey == '1') {
if (this.temp.InsuranceStateKey === '1') {
this.temp.InsuranceState = '是'
}
this.getUrl()
if (this.temp.proCardStateKey === '0') {
this.temp.proCardState = '否'
}
if (this.temp.proCardStateKey === '1') {
this.temp.proCardState = '是'
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
@ -538,27 +477,29 @@ export default {
})
},
handleSubmit() {
const _this = this
if (this.temp.vinNo == '') {
this.$message({
showClose: true,
message: '车架号不能为空!',
type: 'error'
})
if (this.temp.proCardStateKey === '' || this.temp.proCardStateKey === null) {
this.$message({ showClose: true, type: 'error', message: '请检查是否需要临牌需选择是或否' })
return
}
if (this.temp.InsuranceStateKey === '' || this.temp.InsuranceStateKey === null) {
this.$message({ showClose: true, type: 'error', message: '请检查保险状态需选择是或否' })
return
}
if (this.temp.applicantFunds == '') {
if (this.temp.applicantFunds === '') {
this.temp.applicantFunds = '0'
}
if (this.temp.InsuranceStateKey == '0') {
if (this.temp.InsuranceStateKey === '0') {
this.temp.InsuranceState = '否'
this.temp.policyImage = []
this.imgList = []
}
if (this.temp.InsuranceStateKey == '1') {
if (this.temp.InsuranceStateKey === '1') {
this.temp.InsuranceState = '是'
}
this.getUrl()
if (this.temp.proCardStateKey === '0') {
this.temp.proCardState = '否'
}
if (this.temp.proCardStateKey === '1') {
this.temp.proCardState = '是'
}
this.$refs['dataForm'].validate(valid => {
if (valid) {
// this.submitdisabled = true
@ -570,7 +511,7 @@ export default {
submitCarTransfer(this.temp).then(resp => {
// this.submitdisabled = false
if (resp.success) {
_this.handleReturn('true')
this.handleReturn('true')
}
}).catch(() => {
// this.submitdisabled = false
@ -586,20 +527,12 @@ export default {
</script>
<style scoped>
/deep/ .el-col-3 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.selectVinNoBtn {
display: inline-block;
position: absolute;
top: 5px;
right: 5px;
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.vinNoBtn {

66
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengInfo.vue

@ -46,18 +46,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<span>车架号</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ temp.vinNo }}</span>
</el-form-item>
</el-col>
<el-col :span="3">
<span>目标存放地点</span>
</el-col>
<el-col :span="9">
<el-col :span="21">
<el-form-item>
<span>{{ temp.targetLocation }}</span>
</el-form-item>
@ -101,35 +93,29 @@
</el-form-item>
</el-col>
<el-col :span="3">
<span>临牌牌照号</span>
<span>是否需要临牌</span>
</el-col>
<el-col :span="9">
<el-form-item>
<el-form-item>
<span>{{ temp.temporaryCard }}</span>
<span>{{ temp.proCardState }}</span>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="temp.insuranceStateKey == '1'">
<el-col :span="3">
<span>保单</span>
</el-col>
<el-col :span="21">
<img v-for="item in temp.policyImage" style="cursor:pointer;width: 178px;height: 178px;" :src="item" @click="open(temp.policyImage)">
</el-col>
</el-row>
<div class="title">
<span>车辆列表</span>
</div>
<el-table :key="vinKey" :data="temp.vins" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<el-dialog :visible.sync="dialogVisible" width="1000px" :close-on-click-modal="false">
<div class="result-cont">
<el-carousel indicator-position="outside" style="height: 500px;">
<el-carousel-item v-for="item in dialogUrl" :key="item" style="height: 500px;">
<img style="width: 100%; height: 500px;" :src="item">
</el-carousel-item>
</el-carousel>
</div>
</el-dialog>
</div>
</template>
@ -141,21 +127,13 @@ export default {
data() {
return {
viewTitle: '',
dialogVisible: false,
dialogUrl: [],
index: 0,
vinKey: 0,
// ---------
sid: '',
datas: null,
stateId: 0,
FormLoading: false,
listLoading: false,
temp: {}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {}
// ------------------------------------
}
},
methods: {
@ -180,22 +158,10 @@ export default {
type: 'error'
})
})
},
open(val) {
this.dialogVisible = true
this.dialogUrl = val
}
}
}
</script>
<style scoped>
/deep/ .el-col-3 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
</style>

76
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue

@ -49,18 +49,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<span>车架号</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ temp.vinNo }}</span>
</el-form-item>
</el-col>
<el-col :span="3">
<span>目标存放地点</span>
</el-col>
<el-col :span="9">
<el-col :span="21">
<el-form-item>
<span>{{ temp.targetLocation }}</span>
</el-form-item>
@ -104,41 +96,30 @@
</el-form-item>
</el-col>
<el-col :span="3">
<span>临牌</span>
<span>是否需要临牌</span>
</el-col>
<el-col :span="9">
<el-form-item>
<el-form-item>
<span>{{ temp.temporaryCard }}</span>
<span>{{ temp.proCardState }}</span>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="temp.insuranceStateKey == '1'">
<el-col :span="3">
<span>保单</span>
</el-col>
<el-col :span="21">
<img v-for="item in temp.policyImage"
style="cursor:pointer;width: 178px;height: 178px;"
:src="item" @click="open(temp.policyImage)">
</el-col>
</el-row>
<div class="title">
<span>车辆列表</span>
</div>
<el-table :key="vinKey" :data="temp.vins" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<el-dialog :visible.sync="dialogVisible" width="1000px"
:close-on-click-modal="false">
<div class="result-cont">
<el-carousel indicator-position="outside" style="height: 500px;">
<el-carousel-item v-for="item in dialogUrl" :key="item" style="height: 500px;">
<img style="width: 100%; height: 500px;" :src="item">
</el-carousel-item>
</el-carousel>
</div>
</el-dialog>
</div>
<!-- <span class="el-icon-picture-outline">流程图</span>-->
<!-- <flow :xmlData="xmlData" :taskData="taskList"></flow>-->
<!--End 添加修改部分-->
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
@ -170,29 +151,18 @@
<script>
import { getCarTransfer } from '@/api/supplychain/cunfangdidianbiangeng'
import req from '@/api/flow/cunfangdidianbiangeng'
import flow from '@/views/baseoutsourcingapplication/workflow/flow'
export default {
name: 'cunfangdidianbiangengHandle',
components: {
flow
},
data() {
return {
viewTitle: '',
dialogVisible: false,
dialogUrl: [],
index: 0,
vinKey: 0,
// ---------
sid: '',
datas: null,
stateId: 0,
FormLoading: false,
listLoading: false,
temp: {}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {},
// ------------------------------------
currentLink: true, //
@ -301,20 +271,6 @@ export default {
})
})
},
// ---------- ------------------------------
/** xml 文件 */
// getModelDetail(deployId) {
// // xml
// req.readXml(deployId).then((res) => {
// this.xmlData = res.data
// })
// },
// //
// getFlowViewer(procInsId) {
// req.getFlowViewer(procInsId).then((res) => {
// this.taskList = res.data
// })
// },
//
openAgree(val) {
this.operation = val

365
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengEdit.vue

@ -11,7 +11,7 @@
<div class="titwu">车辆存放地点变更申请</div>
<el-form ref="dataForm" :model="temp" label-position="right" class="formadd" :rules="rules">
<el-row style="border-top: 1px solid #e0e3eb;">
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="9">
@ -19,7 +19,7 @@
<span>{{ temp.applicantDate }}</span>
</el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>申请人</span>
</el-col>
<el-col :span="9">
@ -29,7 +29,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>现存放地点</span>
</el-col>
<el-col :span="9">
@ -39,7 +39,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>现存放地点负责人</span>
</el-col>
<el-col :span="9">
@ -51,22 +51,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<span><span class="icon">*</span>车架号</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ temp.vinNo }}</span>
<el-button size="small" type="primary" @click="selectVinNo" class="selectVinNoBtn">选择</el-button>
<!-- <el-select v-model="temp.vinNo" placeholder="请选择" filterable clearable class="addinputw">-->
<!-- <el-option v-for="item in vinNo_list" :key="item.vin" :label="item.vin" :value="item.vin"/>-->
<!-- </el-select>-->
</el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>目标存放地点</span>
</el-col>
<el-col :span="9">
<el-col :span="21">
<el-form-item prop="targetLocation">
<el-select v-model="temp.targetLocation" placeholder="请选择" clearable class="addinputw" @change="targetLocationChange">
<el-option v-for="item in warehouwarehouse_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/>
@ -75,55 +63,71 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>变更原因</span>
</el-col>
<el-col :span="21">
<el-input v-model="temp.changeReason" maxlength="125" placeholder="" class="addinputw" clearable/>
<el-form-item>
<el-input v-model="temp.changeReason" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>经办人</span>
</el-col>
<el-col :span="9">
<el-input v-model="temp.operator" maxlength="125" placeholder="" class="addinputw" clearable/>
<el-form-item prop="operator"><el-input v-model="temp.operator" maxlength="125" placeholder="" class="addinputw" clearable/></el-form-item>
</el-col>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span>申请费用()</span>
</el-col>
<el-col :span="9">
<el-input v-model="temp.applicantFunds" maxlength="125" placeholder="" class="addinputw" clearable @keyup.native="temp.applicantFunds = oninput(temp.applicantFunds,2)"/>
<el-form-item>
<el-input v-model="temp.applicantFunds" maxlength="125" placeholder="" class="addinputw" clearable @keyup.native="temp.applicantFunds = oninput(temp.applicantFunds,2)"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>保险状态</span>
</el-col>
<el-col :span="9">
<el-form-item prop="InsuranceStateKey">
<el-form-item>
<el-radio v-model="temp.InsuranceStateKey" label="0"></el-radio>
<el-radio v-model="temp.InsuranceStateKey" label="1"></el-radio>
</el-form-item>
</el-col>
<el-col :span="3">
<span>临牌牌照号</span>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>是否需要临牌</span>
</el-col>
<el-col :span="9">
<el-input v-model="temp.temporaryCard" maxlength="125" placeholder="" class="addinputw" clearable/>
</el-col>
</el-row>
<el-row v-show="temp.InsuranceStateKey == '1'">
<el-col :span="3">
<span>保单</span>
</el-col>
<el-col :span="21">
<upload ref="uploadImg" v-model="imgList" :limit="1" bucket="map" :upload-data="{type:'0001'}"/>
<el-form-item>
<el-form-item>
<el-radio v-model="temp.proCardStateKey" label="0"></el-radio>
<el-radio v-model="temp.proCardStateKey" label="1"></el-radio>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row>
</el-row>
<div class="title">
<div><span>车辆列表</span></div>
<div><el-button size="mini" type="primary" icon="el-icon-plus" @click="selectVinNo" class="btntopblueline">选择</el-button></div>
</div>
<el-table :key="vinKey" :data="temp.vins" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<!-- ======== 打开选择车架号 ======== -->
@ -155,15 +159,16 @@
<span>{{ scope.row.vin }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="买断状态">
<template slot-scope="scope">
<span>{{ scope.row.settlementStatusValue }}</span>
</template>
</el-table-column>
</el-table>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<pagination
v-show="vinNototal > 0"
:limit.sync="vinNoList.size"
:page.sync="vinNoList.current"
:total="vinNototal" class="pagination" @pagination="getvinNoList"/>
<pagination v-show="listvinNo.length > 0" :limit.sync="vinNoList.size" :page.sync="vinNoList.current" :total="vinNoList.total" class="pagination" @pagination="getvinNoList"/>
</div>
</el-dialog>
</div>
@ -177,43 +182,26 @@ import {
selectWarehouseByUserSid,
submitCarTransfer
} from '@/api/supplychain/cunfangdidianbiangeng'
import Upload from '@/components/uploadFile/uploadImg.vue'
import { getGressionUserList } from '@/api/cheliang/dictcommons'
import Pagination from '@/components/pagination'
export default {
name: 'cunfangdidianbiangengEdit',
components: {
Upload
Pagination
},
data() {
return {
viewTitle: '',
// ---------
sid: '',
datas: null,
stateId: 0,
FormLoading: false,
listLoading: false,
disabled: false,
location_list: [],
targetLocation_list: [],
imgList: [], //
vinNo_list: [], //
InsuranceState_list: [{
key: '0',
value: '否'
}, {
key: '1',
value: '是'
}],
warehouwarehouse_list: [], //
staff_list: [],
temp: {
sid: '',
// taskId: '',
// procInsId: '',
userSid: window.sessionStorage.getItem('userSid'),
// applyId: '',
userSid: '',
applicantName: '',
applicantDate: '',
location: '',
@ -230,21 +218,21 @@ export default {
operator: '',
InsuranceState: '',
InsuranceStateKey: '',
proCardState: '',
proCardStateKey: '',
temporaryCard: '',
policyImage: [],
instanceId: '',
taskId: ''
vins: []
}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
//
vinNoVisible: false,
tableKey: 0,
vinNototal: 1,
vinKey: 1,
index: 0,
vinNoLoading: false,
vinNoCount: 0,
vinNoChoice: [],
listvinNo: [],
vinNoList: {
@ -253,17 +241,16 @@ export default {
params: {
vin: '',
warehouseSid: '',
userSid: window.sessionStorage.getItem('userSid')
}
userSid: window.sessionStorage.getItem('userSid'),
vins: []
},
total: 0
},
rules: {
// vinNo: [{ required: true, message: '', trigger: 'change' }],
operator: [{ required: true, message: '经办人不能为空', trigger: 'change' }],
InsuranceStateKey: [{ required: true, message: '保险状态不能为空', trigger: 'blur' }],
location: [{ required: true, message: '现存放地点不能为空', trigger: 'change' }],
targetLocation: [{ required: true, message: '目标存放地点不能为空', trigger: 'change' }]
}
// ------------------------------------
}
},
mounted() {
@ -320,25 +307,11 @@ export default {
}
})
},
getVin(sid) {
const data = {
warehouseSid: sid,
userSid: window.sessionStorage.getItem('userSid')
}
getVinByWarehouseSid(data).then((res) => {
if (res.code === '200') {
this.vinNo_list = res.data
this.listvinNo = res.data
console.log('车架号', this.vinNo_list)
}
})
},
locationChange(val) {
const choosetItem = this.warehouwarehouse_list.filter((item) => item.dictValue === val)
this.temp.locationKey = choosetItem[0].dictKey
this.temp.locationSid = choosetItem[0].sid
this.vinNoList.params.warehouseSid = this.temp.locationSid
// this.getVin(this.temp.locationSid)
console.log('name:', this.temp.location, 'key:', this.temp.locationKey, 'sid:', this.temp.locationSid)
},
staffNameChange(val) {
@ -352,7 +325,26 @@ export default {
this.temp.targetLocationSid = choosetItem[0].sid
console.log('name:', this.temp.targetLocation, 'key:', this.temp.targetLocationKey, 'sid:', this.temp.targetLocationSid)
},
showEdit(sid, instanceId, taskId) {
showAdd() {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】车辆存放地点变更申请'
this.temp.applicantName = window.sessionStorage.getItem('name')
this.temp.userSid = window.sessionStorage.getItem('userSid')
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
var dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.temp.applicantDate = dayDate
this.getType()
this.getUser()
},
showEdit(sid) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
@ -366,18 +358,8 @@ export default {
getCarTransferInfo(data).then((res) => {
if (res.success) {
this.temp = res.data
this.temp.instanceId = instanceId
this.temp.taskId = taskId
this.temp.instanceId = res.data.procInstId
this.vinNoList.params.warehouseSid = this.temp.locationSid
if (this.temp.policyImage.length > 0) {
for (var i = 0; i < this.temp.policyImage.length; i++) {
const imgName = this.temp.policyImage[i].split('/')
this.imgList.push({
name: imgName[imgName.length - 1],
url: this.temp.policyImage[i]
})
}
}
}
})
this.getType()
@ -402,136 +384,69 @@ export default {
//
handlevinNo() {
this.vinNoList.current = 1
this.vinNoList.params.vins = this.temp.vins
this.getvinNoList()
},
//
getvinNoList() {
const _this = this
this.vinNoLoading = true
getVinByWarehouseSid(this.vinNoList)
.then(resp => {
_this.vinNoLoading = false
const data = resp.data
_this.vinNototal = data.total
_this.listvinNo = data.records
})
.catch(() => {
_this.vinNoLoading = false
})
getVinByWarehouseSid(this.vinNoList).then(resp => {
this.vinNoLoading = false
const data = resp.data
this.vinNoList.total = data.total
this.listvinNo = data.records
}).catch(() => {
this.vinNoLoading = false
})
},
//
handleSelectionvinNo(row) {
this.vinNoChoice = row
if (this.vinNoChoice.length > 1) {
this.$message({
showClose: true,
message: '仅可选择一个车架号!',
type: 'error'
})
return
}
const aa = []
row.forEach((element) => {
aa.push(element.vin)
})
this.vinNoChoice = aa
},
//
selectionvinNo() {
if (this.vinNoChoice.length > 1) {
if (this.vinNoChoice.length === 0) {
this.$message({
showClose: true,
message: '仅可选择一个车架号!',
message: '请至少选择一条记录!',
type: 'error'
})
return
}
if (this.vinNoChoice.length > 0) {
this.temp.vinNo = this.vinNoChoice[0].vin
this.vinNoVisible = false
} else {
this.$message({
showClose: true,
message: '请选择选择一个车架号!',
type: 'error'
})
this.temp.vins = this.vinNoChoice
this.vinNoVisible = false
}
// this.$refs.multipleTable.clearSelection();
},
//
vinNoindexMethod(index) {
var pagestart = (this.vinNoList.current - 1) * this.vinNoList.size
var pageindex = index + 1 + pagestart
return pageindex
},
getUrl() {
if (this.temp.InsuranceStateKey == '1') {
if (this.imgList.length > 0) {
console.log('保存imgList', this.imgList)
const img_list = []
for (var i = 0; i < this.imgList.length; i++) {
img_list.push(this.imgList[i].url)
this.temp.policyImage = img_list
console.log('保存img_list', img_list)
}
} else {
this.temp.policyImage = []
}
} else {
this.temp.policyImage = []
}
dataDelete(index) {
this.temp.vins.splice(index, 1)
},
// ------------------------------------------------------
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.temp = {
sid: '',
// taskId: '',
// procInsId: '',
userSid: window.sessionStorage.getItem('userSid'),
// applyId: '',
applicantName: '',
applicantDate: '',
location: '',
locationKey: '',
locationSid: '',
vinNo: '',
targetLocation: '',
targetLocationKey: '',
targetLocationSid: '',
changeReason: '',
applicantFunds: '',
operator: '',
InsuranceState: '',
InsuranceStateKey: '',
temporaryCard: '',
policyImage: [],
instanceId: '',
taskId: ''
}
this.imgList = []
this.vinNo_list = []
this.$emit('doback')
},
//
handleCreate() {
if (this.temp.vinNo == '') {
this.$message({
showClose: true,
message: '车架号不能为空!',
type: 'error'
})
return
}
if (this.temp.applicantFunds == '') {
if (this.temp.applicantFunds === '') {
this.temp.applicantFunds = '0'
}
if (this.temp.InsuranceStateKey == '0') {
if (this.temp.InsuranceStateKey === '0') {
this.temp.InsuranceState = '否'
this.temp.policyImage = []
this.imgList = []
}
if (this.temp.InsuranceStateKey == '1') {
if (this.temp.InsuranceStateKey === '1') {
this.temp.InsuranceState = '是'
}
this.getUrl()
if (this.temp.proCardStateKey === '0') {
this.temp.proCardState = '否'
}
if (this.temp.proCardStateKey === '1') {
this.temp.proCardState = '是'
}
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
@ -540,6 +455,7 @@ export default {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
@ -547,38 +463,35 @@ export default {
code: 1
}
}, '*')
} else {
this.$message({
showClose: true,
message: '保存失败!',
type: 'error'
})
}
})
}
})
},
handleSubmit() {
if (this.temp.vinNo == '') {
this.$message({
showClose: true,
message: '车架号不能为空!',
type: 'error'
})
if (this.temp.proCardStateKey === '' || this.temp.proCardStateKey === null) {
this.$message({ showClose: true, type: 'error', message: '请检查是否需要临牌需选择是或否' })
return
}
if (this.temp.InsuranceStateKey === '' || this.temp.InsuranceStateKey === null) {
this.$message({ showClose: true, type: 'error', message: '请检查保险状态需选择是或否' })
return
}
if (this.temp.applicantFunds == '') {
if (this.temp.applicantFunds === '') {
this.temp.applicantFunds = '0'
}
if (this.temp.InsuranceStateKey == '0') {
if (this.temp.InsuranceStateKey === '0') {
this.temp.InsuranceState = '否'
this.temp.policyImage = []
this.imgList = []
}
if (this.temp.InsuranceStateKey == '1') {
if (this.temp.InsuranceStateKey === '1') {
this.temp.InsuranceState = '是'
}
this.getUrl()
if (this.temp.proCardStateKey === '0') {
this.temp.proCardState = '否'
}
if (this.temp.proCardStateKey === '1') {
this.temp.proCardState = '是'
}
this.$refs['dataForm'].validate(valid => {
if (valid) {
// this.submitdisabled = true
@ -590,6 +503,7 @@ export default {
submitCarTransfer(this.temp).then(resp => {
// this.submitdisabled = false
if (resp.success) {
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
@ -612,27 +526,18 @@ export default {
</script>
<style scoped>
/deep/ .el-col-3 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.titwu{
font-size: 28px;
text-align: center;
padding: 30px 0 20px 0;
}
.selectVinNoBtn {
display: inline-block;
position: absolute;
top: 5px;
right: 5px;
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
.vinNoBtn {
float: right;
}

62
anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangengInfo.vue

@ -46,18 +46,10 @@
</el-col>
</el-row>
<el-row>
<el-col :span="3">
<span>车架号</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ temp.vinNo }}</span>
</el-form-item>
</el-col>
<el-col :span="3">
<span>目标存放地点</span>
</el-col>
<el-col :span="9">
<el-col :span="21">
<el-form-item>
<span>{{ temp.targetLocation }}</span>
</el-form-item>
@ -101,35 +93,29 @@
</el-form-item>
</el-col>
<el-col :span="3">
<span>临牌牌照号</span>
<span>是否需要临牌</span>
</el-col>
<el-col :span="9">
<el-form-item>
<el-form-item>
<span>{{ temp.temporaryCard }}</span>
<span>{{ temp.proCardState }}</span>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="temp.insuranceStateKey == '1'">
<el-col :span="3">
<span>保单</span>
</el-col>
<el-col :span="21">
<img v-for="item in temp.policyImage" style="cursor:pointer;width: 178px;height: 178px;" :src="item" @click="open(temp.policyImage)">
</el-col>
</el-row>
<div class="title">
<span>车辆列表</span>
</div>
<el-table :key="vinKey" :data="temp.vins" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
<el-dialog :visible.sync="dialogVisible" width="1000px" :close-on-click-modal="false">
<div class="result-cont">
<el-carousel indicator-position="outside" style="height: 500px;">
<el-carousel-item v-for="item in dialogUrl" :key="item" style="height: 500px;">
<img style="width: 100%; height: 500px;" :src="item">
</el-carousel-item>
</el-carousel>
</div>
</el-dialog>
</div>
</template>
@ -142,19 +128,12 @@ export default {
data() {
return {
viewTitle: '',
dialogVisible: false,
dialogUrl: [],
index: 0,
vinKey: 0,
// ---------
sid: '',
datas: null,
stateId: 0,
FormLoading: false,
listLoading: false,
temp: {}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {},
// ------------------------------------
//
@ -201,11 +180,6 @@ export default {
this.revokeList.taskId = obj.taskId
this.revokeList.taskDefKey = obj.taskDefKey
this.revokeList.userSid = window.sessionStorage.getItem('userSid')
//
this.transactState = obj.transactState
//
// this.getModelDetail(obj.deployId)
// this.getFlowViewer(obj.instanceId)
},
methods: {
handleReturn() {
@ -264,10 +238,6 @@ export default {
}, '*')
}
})
},
open(val) {
this.dialogVisible = true
this.dialogUrl = val
}
}
}

Loading…
Cancel
Save