Browse Source

调整验车项目管理

master
yunuo970428 3 years ago
parent
commit
b190c42909
  1. 9
      anrui-scm/anrui-scm-ui/src/api/supplychain/yanchejiancha.js
  2. 7
      anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_yanchejiancha.vue
  3. 150
      anrui-scm/anrui-scm-ui/src/views/supplychain/yanchejianchaxiangmu/yanchejianchaAdd.vue
  4. 83
      anrui-scm/anrui-scm-ui/src/views/supplychain/yanchejianchaxiangmu/yanchejianchaInfo.vue

9
anrui-scm/anrui-scm-ui/src/api/supplychain/yanchejiancha.js

@ -38,6 +38,15 @@ export function fetchDetailsBySid(sid) {
})
}
// 删除附件
export function deleteFilesOss(data) {
return request({
url: '/base/v1/commonappendix/deleteFilesOss',
method: 'post',
params: { fullPath: data }
})
}
// 通过 验车单
export function submitCarInspectedInfo(data) {
return request({

7
anrui-scm/anrui-scm-ui/src/components/uploadFile/upload_yanchejiancha.vue

@ -125,13 +125,14 @@ export default {
//
this.filedUrl = this.fileUrl + file.response.data
// var uid = file.response.data
this.files.push({
const files = []
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.$emit('change', files)
this.$emit('eett', files)
// this.getUrl()
// SaveList(this.tempInfo).then(response => {
// if (response.success) {

150
anrui-scm/anrui-scm-ui/src/views/supplychain/yanchejianchaxiangmu/yanchejianchaAdd.vue

@ -15,9 +15,9 @@
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="wlInfo"><span>车辆检查项</span></div>
<div class="titwu"><span>车辆检查项</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row>
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="12">
<div class="span-sty spanOneWidth"><span>项目名称</span></div>
<el-form-item>
@ -56,62 +56,59 @@
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold;color: #ffffff">检查项内容</div>
<div class="baocun">
<el-button type="primary" size="small" icon="el-icon-plus" class="btntopblueline" @click="addExamine()">添加
</el-button>
<div class="title">
<div>检查项内容</div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addExamine()">添加</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.inspectdetail" :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="deleteExamine(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="排序号" align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.sortNo"></el-input>
</template>
</el-table-column>
<el-table-column label="内容" align="left" header-align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.itemContent"></el-input>
</template>
</el-table-column>
</el-table>
<div v-if="formobj.isImg == 1" class="tableStyle">
<div style="margin-left: 5px;font-weight: bold;color: #ffffff">照片实例</div>
<div class="baocun">
<el-button type="primary" size="small" icon="el-icon-plus" class="btntopblueline" @click="addPicture()">添加
</el-button>
<el-table :key="tableKey" :data="formobj.inspectdetail" :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="deleteExamine(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="排序号" align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.sortNo"></el-input>
</template>
</el-table-column>
<el-table-column label="内容" align="left" header-align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.itemContent"></el-input>
</template>
</el-table-column>
</el-table>
<div v-if="formobj.isImg == 1" class="title">
<div>照片实例</div>
<div>
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addPicture()">添加</el-button>
</div>
</div>
</div>
<el-table v-if="formobj.isImg == 1" :key="imgKey" :data="formobj.inspectimgtemp" :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="deletePicture(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="照片名称" align="left" header-align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.imgTitle"></el-input>
</template>
</el-table-column>
<el-table-column label="照片实例" align="center" width="250">
<template slot-scope="scope">
<div class="upload_img">
<upload_yanchejiancha ref="uploadMoreImg" v-model="imglist" bucket="map" @change="backData($event, scope.row)" :upload-data="{type:'0001',sid: scope.row.sid}"/>
</div>
<el-button type="primary" v-if="scope.row.imgTempUrl.length > 0" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-table v-if="formobj.isImg == 1" :key="imgKey" :data="formobj.inspectimgtemp" :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="deletePicture(scope.$index)">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="照片名称" align="left" header-align="center">
<template slot-scope="scope">
<el-input clearable placeholder="" v-model="scope.row.imgTitle"></el-input>
</template>
</el-table-column>
<el-table-column label="照片实例" align="center" width="250">
<template slot-scope="scope">
<div class="upload_img">
<upload_yanchejiancha ref="uploadMoreImg" v-model="imglist" bucket="map" @change="backData($event, scope.$index)" :upload-data="{type:'0001',sid: scope.row.sid}"/>
</div>
<el-button type="primary" v-if="scope.row.imgTempUrl.length > 0" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
@ -124,6 +121,7 @@
<div style="display: flex;flex-direction: column;justify-content: center;align-items: center;" >
<el-image style="cursor:pointer;width: 150px;height: 150px;margin-top: 5px" :src="item" @click="magnify(item)">
</el-image>
<el-button type="danger" size="mini" @click="handleDel(item)">删除</el-button>
</div>
</div>
</el-form-item>
@ -138,7 +136,7 @@
</template>
<script>
import { save, fetchDetailsBySid } from '@/api/supplychain/yanchejiancha'
import { save, fetchDetailsBySid, deleteFilesOss } from '@/api/supplychain/yanchejiancha'
import upload_yanchejiancha from '@/components/uploadFile/upload_yanchejiancha'
export default {
@ -214,19 +212,33 @@ export default {
deletePicture(index) {
this.formobj.inspectimgtemp.splice(index, 1)
},
backData(val, row) {
const aa = []
backData(val, index) {
console.log(val, 9999999)
if (val.length > 0) {
val.forEach((e) => {
aa.push(e.url)
this.formobj.inspectimgtemp[index].imgTempUrl.push(e.url)
})
row.imgTempUrl = aa
}
console.log(this.formobj, 777777)
},
handleLook(row) {
console.log(row, 9999999)
this.srcList = []
this.dialogImgVisible = true
this.srcList = row.imgTempUrl
},
handleDel(val) {
deleteFilesOss(val).then((res) => {
if (res.success) {
this.$message({ showClose: true, type: 'success', message: '删除成功!' })
this.srcList.forEach((e, index) => {
if (e === val) {
this.srcList.splice(index, 1)
}
})
}
})
},
magnify(row) {
this.dialogVisible = true
this.dialogUrl = row
@ -279,22 +291,12 @@ export default {
</script>
<style scoped>
.formaddcopy02 {
padding: 0px !important;
}
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 60px;
border-bottom: 1px solid #e0e3eb;
}
.tableStyle {
background-color: #018ad2;
.title {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.spanOneWidth {
width: 100px !important;

83
anrui-scm/anrui-scm-ui/src/views/supplychain/yanchejianchaxiangmu/yanchejianchaInfo.vue

@ -13,7 +13,7 @@
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="wlInfo"><span>分公司间调车申请</span></div>
<div class="titwu"><span>分公司间调车申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row>
<el-col :span="12">
@ -51,39 +51,39 @@
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div>检查项内容</div>
</div>
<el-table :key="tableKey" :data="formobj.inspectdetail" :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.sortNo }}</span>
</template>
</el-table-column>
<el-table-column label="内容" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.itemContent }}</span>
</template>
</el-table-column>
</el-table>
<div v-if="formobj.isImg == 1" class="title">
<div>照片实例</div>
</div>
<el-table v-if="formobj.isImg == 1" :key="imgKey" :data="formobj.inspectimgtemp" :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="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.imgTitle }}</span>
</template>
</el-table-column>
<el-table-column label="照片实例" align="center" width="250">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold;color: #ffffff">检查项内容</div>
</div>
<el-table :key="tableKey" :data="formobj.inspectdetail" :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.sortNo }}</span>
</template>
</el-table-column>
<el-table-column label="内容" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.itemContent }}</span>
</template>
</el-table-column>
</el-table>
<div v-if="formobj.isImg == 1" class="tableStyle">
<div style="margin-left: 5px;font-weight: bold;color: #ffffff">照片实例</div>
</div>
<el-table v-if="formobj.isImg == 1" :key="imgKey" :data="formobj.inspectimgtemp" :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="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.imgTitle }}</span>
</template>
</el-table-column>
<el-table-column label="照片实例" align="center" width="250">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleLook(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--End 添加修改部分-->
@ -178,23 +178,6 @@ export default {
</script>
<style scoped>
.formaddcopy02 {
padding: 0px !important;
}
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
border-bottom: 1px solid #e0e3eb;
}
.tableStyle {
background-color: #018ad2;
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.spanOneWidth {
width: 100px !important;
}

Loading…
Cancel
Save