Browse Source

供应链管理——车型管理

master
Zhao Qiqi 3 years ago
parent
commit
c18fb16d5c
  1. 30
      anrui-scm/anrui-scm-ui/src/api/cheliang/basemodelconfig.js
  2. 9
      anrui-scm/anrui-scm-ui/src/api/cheliang/basevehiclemodel.js
  3. 2
      anrui-scm/anrui-scm-ui/src/api/portal/Upload.js
  4. 27
      anrui-scm/anrui-scm-ui/src/api/portal/Upload_chexing.js
  5. 10
      anrui-scm/anrui-scm-ui/src/components/uploadFile/upload.vue
  6. 10
      anrui-scm/anrui-scm-ui/src/components/uploadFile/uploadImg.vue
  7. 242
      anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_chexing.vue
  8. 1
      anrui-scm/anrui-scm-ui/src/main.js
  9. 16
      anrui-scm/anrui-scm-ui/src/styles/el-form.scss
  10. 4
      anrui-scm/anrui-scm-ui/src/styles/index.scss
  11. 34
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue
  12. 482
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue
  13. 13
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexinglook.vue
  14. 118
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/changyongpeizhi.vue
  15. 88
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue
  16. 87
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingpeizhijiageweihuAdd.vue
  17. 74
      anrui-scm/anrui-scm-ui/src/views/cheliang/chexingpeizhi/changyongpeizhiAdd.vue

30
anrui-scm/anrui-scm-ui/src/api/cheliang/basemodelconfig.js

@ -1,7 +1,7 @@
import request from '@/utils/request' import request from '@/utils/request'
import qs from 'qs' import qs from 'qs'
// 车型关联表条件查询 已改 // 车型与常用配置关联表条件查询 已改
export function pagerList(data) { export function pagerList(data) {
return request({ return request({
url: '/base/basevehmodelconfig/listPage', data, url: '/base/basevehmodelconfig/listPage', data,
@ -10,6 +10,15 @@ export function pagerList(data) {
}) })
} }
// 常用配置
export function getList(data) {
return request({
url: '/base/v1/basemodelconfig/pagerList', data,
method: 'post',
headers: { 'Content-Type': 'application/json' }
})
}
// PC-车型与常用配置建立关联关系 已改 // PC-车型与常用配置建立关联关系 已改
export function setRel(data) { export function setRel(data) {
return request({ return request({
@ -31,6 +40,25 @@ export function deleteRel(params) {
}) })
} }
// 价格维护修改回显 已改
export function fetchBySid(data) {
return request({
url: '/base/basevehmodelconfig/fetchBySid/' + data,
method: 'get',
params: data
})
}
// 价格维护编辑保存
export function update(data) {
return request({
url: '/base/basevehmodelconfig/update',
method: 'post',
data: data,
headers: { 'Content-Type': 'application/json' }
})
}
//添加 //添加
export function SaveList(data) { export function SaveList(data) {
return request({ return request({

9
anrui-scm/anrui-scm-ui/src/api/cheliang/basevehiclemodel.js

@ -41,6 +41,15 @@ export function details(data) {
}) })
} }
//编辑回显 已改
export function getAll(data) {
return request({
url: '/base/v1/basevehiclemodel/getAll/' + data,
method: 'get',
params: data
})
}
//车型列表导出 //车型列表导出
export function basefinbankExportExcel(data) { export function basefinbankExportExcel(data) {
return request({ return request({

2
anrui-scm/anrui-scm-ui/src/api/portal/Upload.js

@ -19,7 +19,7 @@ export const uploadFile = '/api/portal/file/upload'
// 移除图片 // 移除图片
export function deleteFilesOss(data) { export function deleteFilesOss(data) {
return request({ return request({
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss',data, url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', // data,
method: 'post', method: 'post',
data: qs.stringify(data), data: qs.stringify(data),
// headers: { 'Content-Type': 'multipart/form-data' } // headers: { 'Content-Type': 'multipart/form-data' }

27
anrui-scm/anrui-scm-ui/src/api/portal/Upload_chexing.js

@ -0,0 +1,27 @@
import request from '@/utils/request'
import qs from 'qs'
// 统一请求路径前缀
const base = process.env.VUE_APP_URL
// 文件上传接口
export const uploadFile = '/api/base/v1/basevehiclemodel/pictureUpload'
// 上传图片
// export function imageUpload(data) {
// return request({
// url: '/portal/file/upload',
// method: 'post',
// data,
// headers: { 'Content-Type': 'multipart/form-data' }
// })
// }
// 移除图片
export function deleteFilesOss(data) {
return request({
url: '/base/v1/baseVehicleAppendixs/deleteFilesOss', // data,
method: 'post',
data: qs.stringify(data),
// headers: { 'Content-Type': 'multipart/form-data' }
})
}

10
anrui-scm/anrui-scm-ui/src/components/uploadFile/upload.vue

@ -102,11 +102,11 @@
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log('aaaa1', newVal) console.log('aaaa1', newVal)
this.files = newVal this.files = newVal
if (this.stateName = 'xunidingjinAdd') { // if (this.stateName = 'xunidingjinAdd') {
if (this.files.length > 1) { // if (this.files.length > 1) {
this.files.splice(0, 1) // this.files.splice(0, 1)
} // }
} // }
console.log('aaaa2', this.files) console.log('aaaa2', this.files)
} }
} }

10
anrui-scm/anrui-scm-ui/src/components/uploadFile/uploadImg.vue

@ -93,11 +93,11 @@
handler(newVal, oldVal) { handler(newVal, oldVal) {
console.log('aaaa1', newVal) console.log('aaaa1', newVal)
this.files = newVal this.files = newVal
if (this.stateName = 'xunidingjinAdd') { // if (this.stateName = 'xunidingjinAdd') {
if (this.files.length > 1) { // if (this.files.length > 1) {
this.files.splice(0, 1) // this.files.splice(0, 1)
} // }
} // }
console.log('aaaa2', this.files) console.log('aaaa2', this.files)
} }
} }

242
anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_chexing.vue

@ -0,0 +1,242 @@
<template>
<div><!---->
<el-upload class="upload-demo" :headers="accessToken" :action="uploadFile" :accept="accept" :data="uploadData"
:on-success="uploadImgSuccess_FuJian" :on-remove="handleRemove" :file-list="fileList_FuJian"
:on-preview="handlePictureCardPreview" :show-file-list="false">
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</div>
</template>
<script>
import { uploadFile } from '@/api/portal/Upload_chexing.js'
import { getStorage } from '@/utils/auth.js' //token
import {
SaveList
} from '@/api/cheliang/basevehiclemodel'
import { mapGetters } from 'vuex'
export default {
model: {
prop: 'name',
event: 'change'
},
props: {
placeholder: {
type: String,
default: ''
},
bucket: {
type: String,
default: 'abc'
},
//
width: {
type: String,
default: '270px'
},
limit: {
type: Number,
default: 1
},
accept: {
type: String,
default:
'.jpg,.jpeg,.png,.bmp,.pdf,.JPG,.JPEG,.BMP,.PDF,.xls,.docx,.xlsx,.ppt,.pptx'
},
//
name: {
type: Array,
required: true
},
uploadData: {
type: Object,
default: {}
}
},
data() {
return {
dialogImageUrl: '',
dialogVisible: false,
accessToken: null,
uploadFile: uploadFile,
fileList_FuJian: [],
enclosure: '',
file_add: '',
file_catch: '',
files: [],
files_list: [],
filedUrl: '',
// fileUrl: fileUrl,
// showpicture:false,
isview: false,
nameArr: '',
loadding: false,
stateName: '',
/* uploadData: { modelSid: '' },*/
sid: ''
}
},
computed: {
...mapGetters([
'id',
'departmentCode',
'departmentLevel',
'departmentType',
'token'
])
},
watch: {
name: {
deep: true,
immediate: true,
handler(newVal, oldVal) {
console.log('aaaa1', newVal)
this.files = newVal
console.log('aaaa2', this.files)
}
}
},
mounted() {
this.$nextTick(() => {
this.Init()
})
},
created() {
this.uploadFile = uploadFile //
this.accessToken = {
token: getStorage()
}
},
methods: {
view() {
// window.open(this.filedUrl)
},
showImg(sid) {
// this.uploadData.sid = sid
},
//
Init() {
if (this.name !== undefined) {
this.files = []
for (var i = 0; i < this.name.length; i++) {
this.files.push({
name: this.name[i],
url: this.name[i]
})
}
}
},
// --
uploadImgSuccess_FuJian(response, file, fileList) {
let _this = this
console.log('您选择的file:', file)
// console.log('data:', _this.uploadData)
if (file.response.code === '200') {
this.loadding = false
//
this.filedUrl = this.fileUrl + file.response.data
// var uid = file.response.data
this.files.push({
name: file.response.data.sourceFileName,
url: file.response.data.fullUrl,
size: file.response.data.size
})
this.$emit('change', this.files)
this.$emit('eett', this.files)
// this.getUrl()
// SaveList(this.tempInfo).then(response => {
// if (response.success) {
// }
// })
}
},
removeImage(file, ImageFileList) {
this.files.splice(this.files.indexOf(file), 1)
const imgFiles = []
this.files.forEach((o) => {
imgFiles.push(o.url)
})
this.$emit('fileChange', this.files)
},
handleRemove(file, fileList) {
console.log('file:' + JSON.stringify(file))
console.log('fileList:' + JSON.stringify(fileList))
this.enclosure = ''
// 1. id(this.file_add)
this.getNewFileId(fileList)
// 2. id(this.file_catch)
this.getCatchFileId(file)
// 3. id
this.getFileId()
// 4. id
this.$emit('change', this.enclosure)
},
// this.file_add(id)
getNewFileId(fileList) {
// debugger
this.file_add = ''
for (var i = 0; i < fileList.length; i++) {
if (fileList[i].response && fileList[i].response.code === '200') {
this.file_add = this.file_add + fileList[i].response.data + ','
}
}
if (this.file_add !== '') {
this.file_add = this.file_add.substring(0, this.file_add.length - 1)
}
// console.log('1. this.file_add: ' + this.file_add)
},
// this.file_catchid
getCatchFileId(file) {
for (var i = 0; i < this.files_list.length; i++) {
if (this.file_catch !== '') {
// 1. id
if (this.files_list[i].name === file.name) {
// 2. file_catchfils_arry
var fils_arry = this.file_catch.split(',')
// 3. fils_arry this.files_list[i].id
var arry = []
fils_arry.forEach((element) => {
//
if (element !== this.files_list[i].id) {
arry.push(element)
}
})
// 4. file_catch
this.file_catch = arry.join(',')
}
}
}
// console.log('2. this.file_catch:' + this.file_catch)
},
// id
getFileId() {
// console.log('3. this.file_catch:' + this.file_catch + ',this.file_add:' + this.file_add)
if (this.file_catch !== '') {
if (this.file_add !== '') {
this.enclosure = this.file_catch + ',' + this.file_add
} else {
this.enclosure = this.file_catch
}
} else {
this.enclosure = this.file_add
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
},
//
uploadError() {
this.loadding = false
},
uploadProgrees(event, file, fileList) {
if (Number(event.percent) > 0) {
this.loadding = true
}
}
}
}
</script>
<style lang="scss" scoped></style>

1
anrui-scm/anrui-scm-ui/src/main.js

@ -77,6 +77,7 @@ function getUserInfo(){
window.sessionStorage.setItem('departmentSid',user.departmentSid); window.sessionStorage.setItem('departmentSid',user.departmentSid);
}) })
} }
getUserInfo(); getUserInfo();
function GetQueryString(name) { function GetQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')

16
anrui-scm/anrui-scm-ui/src/styles/el-form.scss

@ -7,7 +7,7 @@
.listconadd .title { .listconadd .title {
text-align: center; text-align: center;
font-size: 28px; font-size: 28px;
line-height: 90px; //line-height: 90px;
} }
.listaddtop { .listaddtop {
@ -23,7 +23,6 @@
} }
} }
.listconadd .demo-ruleForm { .listconadd .demo-ruleForm {
padding: 22px 28px; padding: 22px 28px;
} }
@ -60,8 +59,15 @@
} }
} }
.tleftb, .trightb { .tleftb {
border-top: 1px solid #e0e3eb !important; text-align: right;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
} }
.icon {
color: #e84026;
margin-right: 4px;
}

4
anrui-scm/anrui-scm-ui/src/styles/index.scss

@ -198,7 +198,7 @@ div:focus {
.el-col{ .el-col{
border-right: 1px solid $table-border-color; border-right: 1px solid $table-border-color;
border-bottom: 1px solid $table-border-color; border-bottom: 1px solid $table-border-color;
padding: 0px 15px 0px 15px !important; padding: 0 15px 0 15px !important;
min-height: 50px; min-height: 50px;
line-height: 50px; line-height: 50px;
font-size: 14px; font-size: 14px;
@ -226,7 +226,7 @@ div:focus {
.titcon .baocun{text-align: right;flex: 2;padding: 5px 20px;} .titcon .baocun{text-align: right;flex: 2;padding: 5px 20px;}
.addinputwda{width: 600px;} .addinputwda{width: 600px;}
.searchcon{margin: 0px 0 10px 0;} .searchcon{margin: 0px 0 10px 0;}
.searchcon .searchbtn{margin: 10px 0;} .searchcon .searchbtn{margin: 10px 0;border: #2cab69 1px solid;color: #2cab69;}

34
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexing.vue

@ -51,19 +51,6 @@
<el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue" <el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue"
:value="item.dictKey"/> :value="item.dictKey"/>
</el-select> </el-select>
<!-- <el-select-->
<!-- v-model="listQuery.params.vehicleFunctionKey"-->
<!-- placeholder="请选择"-->
<!-- clearable-->
<!-- class="addinputw"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in vehicleFunction_list"-->
<!-- :key="item.dictKey"-->
<!-- :label="item.dictValue"-->
<!-- :value="item.dictKey"-->
<!-- />-->
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="驱动"> <el-form-item label="驱动">
<el-select <el-select
@ -232,19 +219,21 @@
</el-table-column> </el-table-column>
<el-table-column label="发动机型号" align="center"> <el-table-column label="发动机型号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.engineType }}</span> <span>{{ scope.row.engineTypeValue }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型编码" align="center"> <el-table-column label="车型编码" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.otherConfig }}</span> <span>{{ scope.row.vehicleTypeCode }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车型照片" align="center" width="280px" class-name="small-padding fixed-width"> <el-table-column label="车型照片" align="center" width="280px" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="primary" @click="handleGetCheck(scope.row)">查看</el-button> <el-button size="mini" type="primary" @click="handleGetCheck(scope.row)">查看</el-button>
<div class="upload_img"> <div class="upload_img">
<upload ref="uploadImg" v-model="imgList" :limit="1" bucket="map" :upload-data="{type:'0001'}"></upload> <upload ref="uploadMoreImg" v-model="imgList" :limit="1"
bucket="map"
:upload-data="{type:'0001',modelSid: scope.row.sid}"></upload>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -291,7 +280,8 @@
deleteBySids, deleteBySids,
basefinbankExportExcel, basefinbankExportExcel,
brandDown, brandDown,
pullDown pullDown,
getAll
} from '@/api/cheliang/basevehiclemodel' } from '@/api/cheliang/basevehiclemodel'
import { setMIng, getMIng, getCHeap, setCHeap } from '@/utils/baocun' import { setMIng, getMIng, getCHeap, setCHeap } from '@/utils/baocun'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
@ -299,7 +289,7 @@
import chexingAdd from './chexingAdd' import chexingAdd from './chexingAdd'
import chexinglook from './chexinglook' import chexinglook from './chexinglook'
import chexingpeizhi from './relation/chexingguanlianchangyong' import chexingpeizhi from './relation/chexingguanlianchangyong'
import upload from '../../../components/uploadFile/upload' import upload from '../../../components/uploadFile/upload_chexing'
export default { export default {
name: 'Pinpaiguanli', name: 'Pinpaiguanli',
@ -604,13 +594,17 @@
console.log('图片列表', row.vehicleModelUrls) console.log('图片列表', row.vehicleModelUrls)
this.srcList = row.vehicleModelUrls this.srcList = row.vehicleModelUrls
}, },
handleUpload() { handleUpload(row) {
const sid = row.sid
// this.$refs.uploadMoreImg.uploadData.modelSid = 123456
// this.$refs['uploadMoreImg'].showImg(sid)
}, },
// //
handleCheck(row) { handleCheck(row) {
this.viewState = 4 this.viewState = 4
const sid = row.sid const sid = row.sid
console.log('详情sid', sid)
this.$refs['divinfo'].showInfo(sid, row) this.$refs['divinfo'].showInfo(sid, row)
}, },
// ID // ID

482
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexingAdd.vue

@ -195,7 +195,7 @@
} from 'vuex' } from 'vuex'
import { import {
SaveList, SaveList,
details, getAll,
getOrg, getOrg,
selectByOrgSid, selectByOrgSid,
namesDownBySid, namesDownBySid,
@ -210,29 +210,7 @@
name: 'PinpaiAdd', name: 'PinpaiAdd',
components: { Upload }, components: { Upload },
data() { data() {
// var validCascader = (rule, value, callback) => {
// if (this.useOrgArry.length == 0) {
// callback(new Error('使'))
// } else {
// callback()
// }
// }
return { return {
baseVehicleModelAppendixDtos: {
aa: {
modelSid: '', // sid
filePath: '' //
},
bb: {
modelSid: '', // sid
filePath: '' //
},
cc: {
modelSid: '', // sid
filePath: '' //
}
},
viewTitle: '', viewTitle: '',
// --------- // ---------
fieldShow: 0, // 0. 1. 2. fieldShow: 0, // 0. 1. 2.
@ -387,111 +365,90 @@
showEdit(sid, row) { showEdit(sid, row) {
console.log(sid) console.log(sid)
console.log('imgList', this.imgList)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].clearValidate() this.$refs['dataForm'].clearValidate()
}) })
this.viewTitle = '【修改】车型信息' this.viewTitle = '【修改】车型信息'
this.dialogStatus = 'update' this.dialogStatus = 'update'
this.temp.sid = sid
console.log('编辑回显', sid) console.log('编辑回显', sid)
details(sid).then(resp => { getAll(sid).then(resp => {
const data = resp.data const data = resp.data
this.temp = data this.temp = data
// this.useOrgArry = data.useOrg this.temp = JSON.parse(JSON.stringify(this.temp).replace(
}) /baseVehicleModelAppendixVos/g,
}, 'baseVehicleModelAppendixDtos'
// 使 )
usrOrgArryChange(e) { )
console.log('选中结果:' + JSON.stringify(e)) this.temp.sid = sid
var result = '' if (this.temp.baseVehicleModelAppendixDtos.length > 0) {
var result_Sid = '' for (var i = 0; i < this.temp.baseVehicleModelAppendixDtos.length; i++) {
if (e.length > 0) { var imgName = this.temp.baseVehicleModelAppendixDtos[i].filePath.split('/')
// this.imgList.push({
e.forEach((item) => { name: imgName[imgName.length - 1],
var last_id = item[item.length - 1] url: this.temp.baseVehicleModelAppendixDtos[i].filePath
// console.log('options'+JSON.stringify(this.options))
//
this.select_temp = '' //
this.select_temp_Sid = ''
this.findOrgId(last_id, this.options)
result = result + this.select_temp + ','
result_Sid = result_Sid + this.select_temp_Sid + ','
}) })
} }
if (result !== '') { console.log('123123', this.imgList)
result = result.substring(0, result.length - 1)
} }
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
}
this.temp.useOrgName = result
console.log('选中名称:' + this.temp.useOrgName)
},
//
createOrgChange(e) {
console.log('选中结果:' + JSON.stringify(e))
var result = ''
var result_Sid = ''
if (e.length > 0) {
//
e.forEach((item) => {
var last_id = item[item.length - 1]
// console.log('options'+JSON.stringify(this.options))
//
this.select_temp = '' //
this.select_temp_Sid = ''
this.findOrgId(last_id, this.options)
result = result + this.select_temp + ','
result_Sid = result_Sid + this.select_temp_Sid + ','
}) })
}
if (result !== '') {
result = result.substring(0, result.length - 1)
}
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
}
this.temp.useOrgName = result
console.log('选中名称:' + this.temp.useOrgName)
}, },
// --- //
findOrgId(id, options) { handleCreate() {
for (var i = 0; i < options.length; i++) { this.$refs['dataForm'].validate(valid => {
if (id == options[i].sid) { if (valid) {
this.select_temp = options[i].name // this.FormLoading = true
return true if (this.dialogStatus === 'add') {
this.getUrl()
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')
} else { } else {
//
if (options[i].children !== undefined) {
//
if (this.findOrgId(id, options[i].children)) {
return true
}
} }
})
} else {
const useOrg_array = this.temp.useOrg[0]
const useOrg_str = useOrg_array[useOrg_array.length - 1]
this.temp.useOrg = useOrg_str
this.updateUrl()
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
} }
})
} }
},
//
getZuZhi() {
getOrg().then(res => {
if (res.code === '200') {
this.options = res.data
this.zuzhi0(this.options)
} }
}) })
}, },
zuzhi0(data) { getUrl() {
data.forEach((e) => { console.log('已有图片', this.imgList)
if (e.children.length != 0) { for (var i = 0; i < this.imgList.length; i++) {
this.zuzhi0(e.children) console.log(this.temp)
} else { this.temp.baseVehicleModelAppendixDtos.push({
delete e.children modelSid: this.temp.sid,
this.dataArr.push(e) filePath: this.imgList[i].url
return })
console.log('保存的图片', this.temp.baseVehicleModelAppendixDtos)
} }
},
updateUrl() {
console.log('回显', this.imgList)
for (var i = 0; i < this.imgList.length; i++) {
const img_file = []
img_file.push({
modelSid: this.temp.sid,
filePath: this.imgList[i].url
}) })
this.temp.baseVehicleModelAppendixDtos = img_file
console.log('保存的图片', this.temp.baseVehicleModelAppendixDtos)
}
}, },
// ------------------------------------------------------ // ------------------------------------------------------
// //
@ -501,6 +458,7 @@
sid: '', // sid sid: '', // sid
vehicleTypeCode: '', // vehicleTypeCode: '', //
carBrandValue: '', carBrandValue: '',
brandName: '',
carBrand: '', // carBrand: '', //
vehicleType: '', // key vehicleType: '', // key
vehicleTypeValue: '', // value vehicleTypeValue: '', // value
@ -673,51 +631,6 @@
state: '' // state: '' //
} }
}, },
//
handleCreate() {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.FormLoading = true
if (this.dialogStatus === 'add') {
this.getUrl()
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
}
})
} else {
this.getUrl()
SaveList(this.temp).then(response => {
this.FormLoading = false
if (response.code === '200') {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
}
})
}
}
})
},
getUrl() {
console.log('已有图片', this.imgList)
for (var i = 0; i < this.imgList.length; i++) {
// var namese = this.imgList[i].name
// var nameArr = namese.split('.')
console.log(this.temp)
this.temp.baseVehicleModelAppendixDtos.push({
attachType: '0001',
modelSid: this.temp.sid,
filePath: this.imgList[i].url
})
console.log('保存的图片', this.temp.baseVehicleModelAppendixDtos)
}
},
getChang() { getChang() {
selectByOrgSid().then(res => { selectByOrgSid().then(res => {
if (res.code === '200') { if (res.code === '200') {
@ -725,36 +638,6 @@
} }
}) })
}, },
getPinPAi(sid) {
let bb = {}
this.facturer.forEach((e) => {
// eslint-disable-next-line eqeqeq
if (e.sid == sid) {
bb = {
name: e.manufacturerName,
sid: e.sid
}
}
})
const manufacturer = bb.name
switch (manufacturer) {
case '欧曼':
this.fieldShow = 1
break
case '陕西重汽':
this.fieldShow = 2
break
default:
this.fieldShow = 0
}
namesDownBySid({
manufacturerSid: sid
}).then(res => {
if (res.code === '200') {
this.Brand = res.data
}
})
},
getGong(value) { getGong(value) {
console.log('触发下拉框按钮', value) console.log('触发下拉框按钮', value)
let bb = {} let bb = {}
@ -811,62 +694,7 @@
}) })
this.temp.marketSegmentsValue = bb.name this.temp.marketSegmentsValue = bb.name
}, },
getCheliang() {
let bb = null
this.cleType.forEach(e => {
if (e.dictKey == value) {
bb = {
type: 'vehicleType',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.vehicleTypeValue = bb.name
if (this.temp.modelValue != undefined) {
this.temp.modelValue.forEach((e, index) => {
if (e.type == bb.type) {
this.temp.modelValue.splice(index, 1)
}
})
} else {
this.temp.modelValue = []
}
this.temp.modelValue.push(bb)
let ab = ''
this.temp.modelValue.forEach((e, index) => {
ab = ab + e.name
})
this.temp.modelName = ab
},
getChangpin(value) {
let bb = null
// name value
this.ctLine.forEach(e => {
if (e.dictKey == value) {
bb = {
type: 'productLine',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.productLineValue = bb.name
//
this.temp.modelValue.forEach((e, index) => {
if (e.type == bb.type) {
this.temp.modelValue.splice(index, 1)
}
})
this.temp.modelValue.push(bb)
let ab = ''
//
this.temp.modelValue.forEach((e, index) => {
ab = ab + e.name
})
this.temp.modelName = ab
},
getQudong(value) { getQudong(value) {
let bb = null let bb = null
this.eForm.forEach(e => { this.eForm.forEach(e => {
@ -1061,6 +889,187 @@
// }) // })
}, },
// ======== ========
//
getZuZhi() {
getOrg().then(res => {
if (res.code === '200') {
this.options = res.data
this.zuzhi0(this.options)
}
})
},
zuzhi0(data) {
data.forEach((e) => {
if (e.children.length != 0) {
this.zuzhi0(e.children)
} else {
delete e.children
this.dataArr.push(e)
return
}
})
},
// 使
usrOrgArryChange(e) {
console.log('选中结果:' + JSON.stringify(e))
var result = ''
var result_Sid = ''
if (e.length > 0) {
//
e.forEach((item) => {
var last_id = item[item.length - 1]
// console.log('options'+JSON.stringify(this.options))
//
this.select_temp = '' //
this.select_temp_Sid = ''
this.findOrgId(last_id, this.options)
result = result + this.select_temp + ','
result_Sid = result_Sid + this.select_temp_Sid + ','
})
}
if (result !== '') {
result = result.substring(0, result.length - 1)
}
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
}
this.temp.useOrgName = result
console.log('选中名称:' + this.temp.useOrgName)
},
//
createOrgChange(e) {
console.log('选中结果:' + JSON.stringify(e))
var result = ''
var result_Sid = ''
if (e.length > 0) {
//
e.forEach((item) => {
var last_id = item[item.length - 1]
// console.log('options'+JSON.stringify(this.options))
//
this.select_temp = '' //
this.select_temp_Sid = ''
this.findOrgId(last_id, this.options)
result = result + this.select_temp + ','
result_Sid = result_Sid + this.select_temp_Sid + ','
})
}
if (result !== '') {
result = result.substring(0, result.length - 1)
}
if (result_Sid !== '') {
result_Sid = result_Sid.substring(0, result_Sid.length - 1)
}
this.temp.useOrgName = result
console.log('选中名称:' + this.temp.useOrgName)
},
// ---
findOrgId(id, options) {
for (var i = 0; i < options.length; i++) {
if (id == options[i].sid) {
this.select_temp = options[i].name //
return true
} else {
//
if (options[i].children !== undefined) {
//
if (this.findOrgId(id, options[i].children)) {
return true
}
}
}
}
},
getPinPAi(sid) {
let bb = {}
this.facturer.forEach((e) => {
// eslint-disable-next-line eqeqeq
if (e.sid == sid) {
bb = {
name: e.manufacturerName,
sid: e.sid
}
}
})
const manufacturer = bb.name
switch (manufacturer) {
case '欧曼':
this.fieldShow = 1
break
case '陕西重汽':
this.fieldShow = 2
break
default:
this.fieldShow = 0
}
namesDownBySid({
manufacturerSid: sid
}).then(res => {
if (res.code === '200') {
this.Brand = res.data
}
})
},
getCheliang() {
let bb = null
this.cleType.forEach(e => {
if (e.dictKey == value) {
bb = {
type: 'vehicleType',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.vehicleTypeValue = bb.name
if (this.temp.modelValue != undefined) {
this.temp.modelValue.forEach((e, index) => {
if (e.type == bb.type) {
this.temp.modelValue.splice(index, 1)
}
})
} else {
this.temp.modelValue = []
}
this.temp.modelValue.push(bb)
let ab = ''
this.temp.modelValue.forEach((e, index) => {
ab = ab + e.name
})
this.temp.modelName = ab
},
getChangpin(value) {
let bb = null
// name value
this.ctLine.forEach(e => {
if (e.dictKey == value) {
bb = {
type: 'productLine',
name: e.dictValue,
vaule: e.dictKey
}
}
})
this.temp.productLineValue = bb.name
//
this.temp.modelValue.forEach((e, index) => {
if (e.type == bb.type) {
this.temp.modelValue.splice(index, 1)
}
})
this.temp.modelValue.push(bb)
let ab = ''
//
this.temp.modelValue.forEach((e, index) => {
ab = ab + e.name
})
this.temp.modelName = ab
},
getXuanJia(value) { getXuanJia(value) {
let bb = null let bb = null
this.pension.forEach(e => { this.pension.forEach(e => {
@ -1145,6 +1154,7 @@
// }) // })
// this.temp.speedRatio = cd // this.temp.speedRatio = cd
} }
} }
} }

13
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/chexinglook.vue

@ -23,7 +23,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="otherConfig"> <el-form-item prop="otherConfig">
<span>{{temp.otherConfig}}</span> <span>{{temp.vehicleTypeCode}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -33,7 +33,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="vehicleFunction"> <el-form-item prop="vehicleFunction">
<span>{{temp.vehicleFunction}}</span> <span>{{temp.vehicleTypeValue}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
@ -41,7 +41,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="series"> <el-form-item prop="series">
<span>{{temp.series}}</span> <span>{{temp.productLineValue}}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -161,7 +161,7 @@
</div> </div>
<template class="tablelist"> <template class="tablelist">
<el-table <el-table
:data="temp.list" :data="list"
:index="index" :index="index"
border border
style="width: 100%" style="width: 100%"
@ -174,7 +174,7 @@
/> />
<el-table-column prop="mNum" width="150" label="指导价" align="center"> <el-table-column prop="mNum" width="150" label="指导价" align="center">
<template slot-scope="props"> <template slot-scope="props">
<span>{{props.row.price}}</span> <span>{{props.row.guidedPrice}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mName" width="150" label="颜色" align="center"> <el-table-column prop="mName" width="150" label="颜色" align="center">
@ -293,6 +293,7 @@
index: 0, index: 0,
listLoading: false, listLoading: false,
temp: {}, // temp: {}, //
list: [],
templook: { titlea: '00000112' }, // templook: { titlea: '00000112' }, //
textMap: { textMap: {
update: '修改', update: '修改',
@ -328,6 +329,7 @@
// //
handleReturn() { handleReturn() {
this.temp = {} this.temp = {}
this.list = []
this.$emit('doback') this.$emit('doback')
}, },
@ -341,6 +343,7 @@
this.FormLoading = false this.FormLoading = false
if (response.success) { if (response.success) {
this.temp = response.data this.temp = response.data
this.list.push(response.data.baseModelConfigVo)
} }
}).catch(() => { }).catch(() => {

118
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/changyongpeizhi.vue

@ -5,7 +5,7 @@
<div class="tab-header webtop"> <div class="tab-header webtop">
<div>常用配置管理</div> <div>常用配置管理</div>
<div> <div>
<el-button type="primary" size="small" @click="handleCreate()">新增</el-button> <el-button type="primary" size="small" @click="handleCreate()">新增配置</el-button>
<el-button type="primary" size="small" @click="handleConfirm()">确认</el-button> <el-button type="primary" size="small" @click="handleConfirm()">确认</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> <el-button type="info" size="small" @click="handleReturn()">返回</el-button>
</div> </div>
@ -431,7 +431,7 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { pagerList, deleteBySids, pullDown } from '@/api/cheliang/basemodelconfig' import { getList, deleteBySids, pullDown, setRel } from '@/api/cheliang/basemodelconfig'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
import changyongpeizhiAdd from '../../chexingpeizhi/changyongpeizhiAdd' import changyongpeizhiAdd from '../../chexingpeizhi/changyongpeizhiAdd'
@ -519,6 +519,9 @@
update: '编辑', update: '编辑',
create: '创建' create: '创建'
}, },
rel_list: {},
modelSids: [],
configurationItemsSids: [],
sids: [], sids: [],
names: '', // [ {{names}} ] names: '', // [ {{names}} ]
chesid: '', chesid: '',
@ -599,8 +602,8 @@
this.names = name this.names = name
console.log('9639636', this.names) console.log('9639636', this.names)
}, },
showSetRel(setRelList){ showSetRel(modelSid){
this.rel_list.modelSid = modelSid
}, },
getType() { getType() {
// - // -
@ -657,13 +660,21 @@
console.log('下拉框请求后桥速比', res.data) console.log('下拉框请求后桥速比', res.data)
} }
}) })
// //
pullDown({ pullDown({
type: 'whether' type: 'whether'
}).then((res) => { }).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.airConditioner_list = res.data this.airConditioner_list = res.data
console.log('下拉框请求空调', res.data) console.log('下拉框请求空调', res.data)
this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data)
this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data)
this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data)
this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data)
} }
}) })
// //
@ -676,14 +687,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.baffleModel_list = res.data // this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'suspension' type: 'suspension'
@ -703,14 +714,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.tireCover_list = res.data // this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'saddle' type: 'saddle'
@ -748,14 +759,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.independentSources_list = res.data // this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data) // console.log('', res.data)
} // }
}) // })
// - // -
pullDown({ pullDown({
type: 'fuelTank' type: 'fuelTank'
@ -766,17 +777,18 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.multimedia_list = res.data // this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data) // console.log('', res.data)
} // }
}) // })
}, },
// //
handleReturn() { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.$emit('doback') this.$emit('doback')
}, },
// //
@ -789,17 +801,26 @@
this.pageState = 3 this.pageState = 3
}, },
handleSelectionChange(row) { handleSelectionChange(row) {
console.log('11row',row)
const aa = [] const aa = []
const bb = []
const cc = []
row.forEach((element) => { row.forEach((element) => {
aa.push(element.sid) aa.push(element.sid)
bb.push(element.modelSid)
cc.push(element.configurationItemsSid)
}) })
this.sids = aa this.sids = aa
this.modelSids = bb
this.configurationItemsSids = cc
console.log('选择的数据', this.sids) console.log('选择的数据', this.sids)
console.log('选择的数据', this.modelSids)
console.log('选择的数据', this.configurationItemsSids)
}, },
// //
getList() { getList() {
this.listLoading = true this.listLoading = true
pagerList(this.listQuery).then((response) => { getList(this.listQuery).then((response) => {
this.listLoading = false this.listLoading = false
if ( if (
response.code === '200' && response.code === '200' &&
@ -872,9 +893,28 @@
this.pageState = 4 this.pageState = 4
this.$refs['divadd'].showAdd() this.$refs['divadd'].showAdd()
}, },
// this.handleReturn('true')
handleConfirm() { handleConfirm() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行关联' })
return
}
if (this.sids.length > 1) {
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行关联' })
return
}
this.rel_list.configurationItemsSid = this.sids[0]
console.log('11111',this.rel_list)
setRel(this.rel_list).then(response => {
this.FormLoading = false
if (response.success) {
this.dialogFormVisible = false
this.handleReturn('true')
} else {
} }
})
}
} }
} }
</script> </script>

88
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingguanlianchangyong.vue

@ -691,13 +691,21 @@
console.log('下拉框请求后桥速比', res.data) console.log('下拉框请求后桥速比', res.data)
} }
}) })
// //
pullDown({ pullDown({
type: 'whether' type: 'whether'
}).then((res) => { }).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.airConditioner_list = res.data this.airConditioner_list = res.data
console.log('下拉框请求空调', res.data) console.log('下拉框请求空调', res.data)
this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data)
this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data)
this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data)
this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data)
} }
}) })
// //
@ -710,14 +718,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.baffleModel_list = res.data // this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'suspension' type: 'suspension'
@ -737,14 +745,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.tireCover_list = res.data // this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'saddle' type: 'saddle'
@ -782,14 +790,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.independentSources_list = res.data // this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data) // console.log('', res.data)
} // }
}) // })
// - // -
pullDown({ pullDown({
type: 'fuelTank' type: 'fuelTank'
@ -800,24 +808,24 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.multimedia_list = res.data // this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data) // console.log('', res.data)
} // }
}) // })
}, },
// //
handleJiage() { handleJiage(row) {
this.pageState = 2 this.pageState = 2
this.$refs['weihu'].showWeiHu(this.title) this.$refs['weihu'].showWeiHu(row.sid)
}, },
// //
handleGuanlian() { handleGuanlian() {
this.pageState = 3 this.pageState = 3
// this.$refs['changyongpeizhi'].showSetRel(this.setRelList) this.$refs['changyongpeizhi'].showSetRel( this.setRelList.modelSid)
}, },
// //
handleDelete() { handleDelete() {
@ -833,13 +841,7 @@
console.log('解除关系所需参数', this.checkRelieve_list) console.log('解除关系所需参数', this.checkRelieve_list)
this.checkRelieve_list.configurationItemsSid = this.configurationItemsSid_list[0] // this.checkRelieve_list.configurationItemsSid = this.configurationItemsSid_list[0] //
deleteRel(this.checkRelieve_list).then((response) => { deleteRel(this.checkRelieve_list).then((response) => {
if (response.code === '200') { if (response.success) {
this.$notify({
title: '提示',
message: '删除成功',
type: 'success',
duration: 2000
})
this.getList() this.getList()
} }
}) })

87
anrui-scm/anrui-scm-ui/src/views/cheliang/chexing/relation/chexingpeizhijiageweihuAdd.vue

@ -4,18 +4,14 @@
<div>价格维护</div> <div>价格维护</div>
</div> </div>
<div class="listconadd"> <div class="listconadd">
<el-form ref="dataForm" :model="temp" label-position="right" class="formadd" :rules="rules"> <el-form ref="weihuForm" :model="temp" label-position="right" class="formadd" :rules="rules">
<el-row class="tleftb_one"> <el-row class="tleftb_one">
<el-col :span="6" class="tleftb"> <el-col :span="6" class="tleftb">
<span><span class="icon">*</span>车型名称</span> <!--modelName--> <span><span class="icon">*</span>车型名称</span> <!--modelName-->
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item prop="modelName"> <el-form-item>
<el-select v-model="temp.modelName" placeholder="请选择" filterable clearable class="addinputw" <span>{{temp.modelName}}</span>
@change="getPinpai()">
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName"
:value="item.brandName"/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -24,9 +20,8 @@
<span><span class="icon">*</span>常用配置</span> <span><span class="icon">*</span>常用配置</span>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item prop="brandName"> <el-form-item>
<el-input v-model="temp.otherConfig" maxlength="125" placeholder="请输入" clearable class="addinputw" <span>{{temp.configName}}</span>
clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -36,8 +31,7 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item> <el-form-item>
<el-input v-model="temp.specifications" type="textarea" maxlength="125" placeholder="请输入" <span>{{temp.otherConfig}}</span>
class="addinputw" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -46,8 +40,8 @@
<span><span class="icon">*</span>厂家结算价</span> <span><span class="icon">*</span>厂家结算价</span>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item prop="carModel"> <el-form-item>
<el-input v-model="temp.specifications" type="textarea" maxlength="125" placeholder="请输入" <el-input v-model="temp.manufactorSettlementPrice" type="textarea" maxlength="125" placeholder="请输入"
class="addinputw" clearable/> class="addinputw" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -56,7 +50,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input v-model="temp.specifications" maxlength="125" placeholder="请输入" class="addinputw" clearable/> <el-input v-model="temp.guidedPrice" maxlength="125" placeholder="请输入" class="addinputw" clearable/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -73,12 +67,15 @@
import { import {
mapGetters mapGetters
} from 'vuex' } from 'vuex'
import {
fetchBySid,
update
} from '@/api/cheliang/basemodelconfig'
export default { export default {
name: 'chexingpeizhijiageweihu', name: 'chexingpeizhijiageweihu',
data() { data() {
return { return {
viewTitle: '',
// --------- // ---------
fieldShow: 0, // 0. 1. 2. fieldShow: 0, // 0. 1. 2.
// --------- // ---------
@ -100,7 +97,9 @@
createOrgArry: [], // createOrgArry: [], //
temp: { temp: {
sid: '', // sid sid: '', // sid
modelName: '' // ( 1) modelName: '', // ( 1)
manufactorSettlementPrice: '', //
guidedPrice: '' //
}, // }, //
templook: {}, // templook: {}, //
textMap: { textMap: {
@ -113,14 +112,6 @@
pdateChe: null, pdateChe: null,
pdateChang: null, pdateChang: null,
side: [], side: [],
options: [],
useOrg: [],
props: {
value: 'sid',
label: 'name',
children: 'children',
checkStrictly: true
},
dialogFormVisible: false, // dialogFormVisible: false, //
dialogFormShowVisible: false, // dialogFormShowVisible: false, //
dialogStatus: '', // dialogStatus: '', //
@ -135,28 +126,18 @@
}, },
methods: { methods: {
showWeiHu(modelName) { showWeiHu(sid) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].clearValidate() this.$refs['weihuForm'].clearValidate()
})
fetchBySid(sid).then(resp => {
if (resp.success) {
const data = resp.data
this.temp = data
this.temp.sid = sid
}
}) })
this.temp.modelName = modelName
}, },
// showEdit(sid, row) {
// console.log(sid)
// this.$nextTick(() => {
// this.$refs['dataForm'].clearValidate()
// })
// this.viewTitle = ''
// this.dialogStatus = 'update'
// this.temp.sid = sid
// console.log('', sid)
// details(sid).then(resp => {
// const data = resp.data
// this.temp = data
// this.useOrgArry = data.useOrg
// })
// },
// ------------------------------------------------------ // ------------------------------------------------------
// //
handleReturn(isreload) { handleReturn(isreload) {
@ -170,14 +151,26 @@
resetTemp() { resetTemp() {
this.temp = {} this.temp = {}
}, },
// //
handleCreate() { handleCreate() {
this.$refs['dataForm'].validate(valid => { this.$refs['weihuForm'].validate(valid => {
if (valid) { if (valid) {
const temp = {
sid: this.temp.sid,
manufactorSettlementPrice: this.temp.manufactorSettlementPrice,
guidedPrice: this.temp.guidedPrice
}
update(temp).then(resp => {
if (resp.success) {
const data = resp.data
this.temp = data
this.handleReturn('true')
} }
}) })
} }
})
}
} }
} }
</script> </script>

74
anrui-scm/anrui-scm-ui/src/views/cheliang/chexingpeizhi/changyongpeizhiAdd.vue

@ -674,13 +674,21 @@
console.log('下拉框请求后桥速比', res.data) console.log('下拉框请求后桥速比', res.data)
} }
}) })
// //
pullDown({ pullDown({
type: 'whether' type: 'whether'
}).then((res) => { }).then((res) => {
if (res.code === '200') { if (res.code === '200') {
this.airConditioner_list = res.data this.airConditioner_list = res.data
console.log('下拉框请求空调', res.data) console.log('下拉框请求空调', res.data)
this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data)
this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data)
this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data)
this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data)
} }
}) })
// //
@ -693,14 +701,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.baffleModel_list = res.data // this.baffleModel_list = res.data
console.log('下拉框请求导流罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'suspension' type: 'suspension'
@ -720,14 +728,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.tireCover_list = res.data // this.tireCover_list = res.data
console.log('下拉框请求护轮罩', res.data) // console.log('', res.data)
} // }
}) // })
// //
pullDown({ pullDown({
type: 'saddle' type: 'saddle'
@ -765,14 +773,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.independentSources_list = res.data // this.independentSources_list = res.data
console.log('下拉框请求护独立热源', res.data) // console.log('', res.data)
} // }
}) // })
// - // -
pullDown({ pullDown({
type: 'fuelTank' type: 'fuelTank'
@ -783,14 +791,14 @@
} }
}) })
// //
pullDown({ // pullDown({
type: 'whether' // type: 'whether'
}).then((res) => { // }).then((res) => {
if (res.code === '200') { // if (res.code === '200') {
this.multimedia_list = res.data // this.multimedia_list = res.data
console.log('下拉框请求多媒体', res.data) // console.log('', res.data)
} // }
}) // })
}, },
changeCarColor(value) { changeCarColor(value) {

Loading…
Cancel
Save