From a8cdfedb70bbd21c04f44cc5e71676b67a7adc2c Mon Sep 17 00:00:00 2001
From: yunuo970428 <405378304@qq.com>
Date: Mon, 5 Sep 2022 18:03:13 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=AD=98=E6=94=BE=E5=9C=B0?=
=?UTF-8?q?=E7=82=B9=E5=8F=98=E6=9B=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../cunfangdidianbiangeng.vue | 8 +-
.../cunfangdidianbiangengAdd.vue | 271 +++++--------
.../cunfangdidianbiangengInfo.vue | 66 +---
.../cunfangdidianbiangeng.vue | 76 +---
.../cunfangdidianbiangengEdit.vue | 365 +++++++-----------
.../cunfangdidianbiangengInfo.vue | 62 +--
6 files changed, 289 insertions(+), 559 deletions(-)
diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue
index b84fce5d90..786a008095 100644
--- a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue
@@ -16,9 +16,9 @@
-
-
-
+
+
+
查询
@@ -53,7 +53,7 @@
-
+
diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
index 3a16f18222..3748362bc2 100644
--- a/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangengAdd.vue
@@ -52,22 +52,10 @@
-
- *车架号
-
-
-
- {{ temp.vinNo }}
- 选择
-
-
-
-
-
目标存放地点
-
+
@@ -90,7 +78,7 @@
*经办人
-
+
申请费用(元)
@@ -106,28 +94,41 @@
*保险状态
-
+
否
是
- 临牌牌照号
+ *是否需要临牌
-
+
+ 否
+ 是
+
-
-
- 保单
-
-
-
-
-
+
+
+
+
+
+ 删除
+
+
+
+
+
+ {{ scope.row }}
+
+
+
@@ -159,11 +160,16 @@
{{ scope.row.vin }}
+
+
+ {{ scope.row.settlementStatusValue }}
+
+
@@ -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 {
diff --git a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
index f38b20539a..dfa2c502ec 100644
--- a/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/workFlow/cunfangdidianbiangengFlow/cunfangdidianbiangeng.vue
@@ -49,18 +49,10 @@
-
- 车架号
-
-
-
- {{ temp.vinNo }}
-
-
目标存放地点
-
+
{{ temp.targetLocation }}
@@ -104,41 +96,30 @@
- 临牌
+ 是否需要临牌
- {{ temp.temporaryCard }}
+ {{ temp.proCardState }}
-
-
- 保单
-
-
-
-
-
+
+ 车辆列表
+
+
+
+
+
+ {{ scope.row }}
+
+
+
-
-
-
-
-
-
-
-
-
-
-
@@ -170,29 +151,18 @@