Browse Source

验车、入库

master
Zhao Qiqi 3 years ago
parent
commit
06347f7cb6
  1. 2
      anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js
  2. 16
      anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue
  3. 12
      anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue
  4. 4
      anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue
  5. 90
      anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue

2
anrui-scm/anrui-scm-ui/src/api/supplychain/yancheguanli.js

@ -32,7 +32,7 @@ export function getCarInspectedInfo(data) {
// 验车管理详情回显
export function getCarInspected(data) {
return request({
url: '/terminal/supplychain/v1/carInspected/getCarInspected/{inspectedSid}' + data,
url: '/terminal/supplychain/v1/carInspected/getCarInspected/' + data,
method: 'get'
})
}

16
anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliAlready.vue

@ -48,6 +48,11 @@
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<!-- <el-table-column width="50px" type="selection" align="center"/>-->
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="操作" align="center" width="90px" class-name="small-padding fixed-width">
<template slot-scope="{row}"><!--v-show="!row.result"-->
<el-button size="mini" type="primary" @click="handleInfo(row)">查看</el-button>
</template>
</el-table-column>
<el-table-column width="180px" prop="vin" label="车架号" align="center"/>
<el-table-column prop="model" label="车型" align="center"/>
<el-table-column width="160px" prop="purchaseType" label="订单类型" align="center"/>
@ -74,6 +79,7 @@
</div>
</div>
</div>
<rukuguanli-info v-show="viewState == 6" ref="divinfo" @doback="resetState"/>
</div>
</template>
@ -81,6 +87,7 @@
import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import rukuguanliInfo from '@/views/supplychain/rukuguanli/rukuguanliInfo'
import { getUseOrgByUserSid, selectModelName } from '@/api/cheliang/basevehicle'
import { typeValues } from '@/api/supplychain/yancheguanli'
import { selectCarWarehousingList } from '@/api/supplychain/rukuguanli'
@ -91,7 +98,7 @@ export default {
ButtonBar,
Pagination,
pageye,
rukuguanliInfo
},
data() {
return {
@ -150,7 +157,7 @@ export default {
})
},
resetState() {
this.viewState = 1
this.viewState = 5
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
@ -190,6 +197,11 @@ export default {
}
this.getList()
},
handleInfo(row){
this.$refs['divinfo'].showInfo(row)
console.log('详情回显', row)
this.viewState = 6
},
loadList() {
const _this = this
this.tableLoading = true

12
anrui-scm/anrui-scm-ui/src/views/supplychain/rukuguanli/rukuguanliInfo.vue

@ -41,11 +41,7 @@
</el-col>
<el-col :span="9">
<el-form-item>
<el-select v-model="temp.warehouseKey" placeholder="请选择" filterable clearable class="addinputw"
@change="warehouseChange">
<el-option v-for="item in warehouse_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/>
</el-select>
<span>{{ temp.warehouse }}</span>
</el-form-item>
</el-col>
</el-row>
@ -54,9 +50,9 @@
<span>附件</span>
</el-col>
<el-col :span="21">
<img v-show="temp.warehouseImage ? true : false" v-for="item in temp.warehouseImage"
<img v-show="temp.image ? true : false" v-for="item in temp.image"
style="cursor:pointer;width: 178px;height: 178px;"
:src="item" @click="open(temp.warehouseImage)">
:src="item" @click="open(temp.image)">
</el-col>
</el-row>
</el-form>
@ -116,7 +112,7 @@ export default {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
getCarWarehousing(row.inspectedSid).then((res) => {
getCarWarehousing(row.warehousingSid).then((res) => {
if (res.success) {
this.temp = res.data
}

4
anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanli.vue

@ -19,14 +19,14 @@
<el-select v-model="listQuery.params.model" placeholder="请选择" filterable clearable class="addinputw">
<el-option v-for="item in modelName_list" :key="item.sid" :label="item.modelName" :value="item.sid"/>
</el-select>
<!-- <el-input v-model="listQuery.params.warehouseAttribute" placeholder="请输入存放地点属性" clearable/>-->
<!-- <el-input v-model="listQuery.params.warehouseAttribute" placeholder="请输入存放地点属性" clearable/>-->
</el-form-item>
<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.warehouseContract" placeholder="请输入负责人" clearable/>-->
<!-- <el-input v-model="listQuery.params.warehouseContract" placeholder="请输入负责人" clearable/>-->
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">

90
anrui-scm/anrui-scm-ui/src/views/supplychain/yancheguanli/yancheguanliAdd.vue

@ -17,10 +17,9 @@
<el-form-item prop="vin" label="车架号:">
<el-input
v-model="temp.vin"
:disabled="temp.orderType == '01'"
placeholder="请输入车架号"
class="addinputw"
readonly
:readonly="temp.purchaseKey !== '01'"
/>
</el-form-item>
</el-col>
@ -41,6 +40,7 @@
<el-input
v-model="temp.config"
type="textarea"
autosize
placeholder="请输入配置"
class="addinputw"
readonly/>
@ -121,13 +121,16 @@ export default {
vin: '',
config: '',
model: '',
inspectedSid:''
inspectedSid: ''
}, //
dialogFormVisible: false, //
dialogFormShowVisible: false, //
dialogStatus: '', //
vehiclePhoto: [],
rules: {}
rules: {
vin: [{ required: true, message: '车架号不能为空', trigger: 'blur' }], //
price: [{ required: true, message: '洗车费不能为空', trigger: 'blur' }] //
}
// ------------------------------------
}
},
@ -144,10 +147,32 @@ export default {
}
getCarInspectedInfo(data).then((res) => {
if (res.success) {
this.temp = res.data
this.temp.vin = res.data.vin
this.temp.config = res.data.config
this.temp.model = res.data.model
this.temp.inspectedSid = res.data.inspectedSid
this.temp.purchaseKey = res.data.purchaseKey
if (this.temp.carInspectedImage.length > 0) {
for (var i = 0; i < this.temp.carInspectedImage.length; i++) {
const imgName = this.temp.carInspectedImage[i].split('/')
this.imgList01.push({
name: imgName[imgName.length - 1],
url: this.temp.carInspectedImage[i]
})
}
console.log('imgList01', this.imgList01)
}
if (this.temp.factoryImage.length > 0) {
for (var i = 0; i < this.temp.factoryImage.length; i++) {
const imgName = this.temp.factoryImage[i].split('/')
this.imgList02.push({
name: imgName[imgName.length - 1],
url: this.temp.factoryImage[i]
})
}
console.log('imgList02', this.imgList02)
}
}
})
},
@ -200,16 +225,20 @@ export default {
getUrl() {
if (this.imgList01.length > 0) {
console.log('imgList01', this.imgList01)
const img01_list = []
for (var i = 0; i < this.imgList01.length; i++) {
this.temp.carInspectedImage.push(this.imgList01[i].url)
img01_list.push(this.imgList01[i].url)
this.temp.carInspectedImage = img01_list
}
} else {
this.temp.carInspectedImage = []
}
if (this.imgList02.length > 0) {
console.log('imgList02', this.imgList02)
const img02_list = []
for (var i = 0; i < this.imgList02.length; i++) {
this.temp.factoryImage.push(this.imgList02[i].url)
img02_list.push(this.imgList02[i].url)
this.temp.factoryImage = img02_list
}
} else {
this.temp.factoryImage = []
@ -227,8 +256,10 @@ export default {
vin: '',
config: '',
model: '',
inspectedSid:''
inspectedSid: ''
}
this.imgList01 = []
this.imgList02 = []
this.$emit('doback')
},
//
@ -237,6 +268,22 @@ export default {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.FormLoading = true
if (this.temp.carInspectedImage.length == 0) {
this.$message({
showClose: true,
message: '请上传验车相关照片!',
type: 'error'
});
return
}
if (this.temp.factoryImage.length == 0) {
this.$message({
showClose: true,
message: '请上传厂家验车单照片!',
type: 'error'
});
return
}
//
saveCarInspectedInfo(this.temp).then((response) => {
this.FormLoading = false
@ -244,22 +291,39 @@ export default {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
this.$notify({
title: '提示',
message: '添加失败',
type: 'error',
duration: 2000
})
this.$message({
showClose: true,
message: '添加失败!',
type: 'error'
});
}
})
}
})
},
handlePass() {
this.getUrl()
this.$refs['dataForm'].validate((valid) => {
if (valid) {
submitCarInspectedInfo(this.temp).then((response) => {
this.FormLoading = false
if (this.temp.carInspectedImage.length == 0) {
this.$message({
showClose: true,
message: '请上传验车相关照片!',
type: 'error'
});
return
}
console.log('照片02',this.temp.factoryImage)
if (this.temp.factoryImage.length == 0) {
this.$message({
showClose: true,
message: '请上传厂家验车单照片!',
type: 'error'
});
return
}
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')

Loading…
Cancel
Save